Main Content

Video Viewer

View videos and image sequences

Description

The Video Viewer app plays movies, videos, or image sequences. The app offers basic video playback aids, including the ability to jump to a specific frame, to adjust the frame rate of the display, and to play in forwards and reverse directions.

Using this app, you can adjust other aspects of the video display and explore video data in more depth.

  • Get information about frame size, color format, data type, and frame count.

  • Change the colormap of grayscale and binary image sequences.

  • Adjust the display range of grayscale image sequences.

  • Open a Pixel Region tool that displays an extreme close-up view of a small region of pixels in the target image.

  • Export a frame to the Image Viewer app.

  • View video signals in Simulink® models (requires Simulink). For more information, see View Video in Simulink (Computer Vision Toolbox).

Video Viewer does not play audio tracks.

Video Viewer app

Open the Video Viewer App

  • MATLAB® Toolstrip: On the Apps tab, under Image Processing and Computer Vision, click the Video Viewer app icon.

  • MATLAB command prompt: Enter implay.

Examples

Play Three Types of Videos

Animate a sequence of grayscale images at 10 frames per second.

load cellsequence
implay(cellsequence,10)

Visually explore a stack of grayscale MRI images.

load mristack
implay(mristack)

Play an AVI file.

implay('rhinos.avi')

Related Examples

Programmatic Use

expand all

implay opens the Video Viewer app in an empty state.

  • To load a video from a file, select File > Open.

  • To load an image sequence stored as a variable in the workspace, select File > Import from Workspace.

implay(filename) opens the Video Viewer app and loads the content of the Audio Video Interleaved (AVI) file with file name filename. Specify filename as a character vector or string scalar. The AVI file determines the default frame rate.

implay(I) opens the Video Viewer app and displays the first frame in the multiframe image sequence I. Specify I as one of these values:

  • An m-by-n-by-k numeric or logical array representing a grayscale or binary image sequence of k frames, respectively.

  • An m-by-n-by-1-by-k numeric or logical array representing a grayscale or binary image sequence of k frames, respectively.

  • An m-by-n-by-3-by-k numeric array representing a truecolor (RGB) image sequence of k frames.

  • A MATLAB movie structure. For more information, see immovie.

For numeric data, the preferred data type of I is uint8. The actual data type used to display pixels may differ from the source data type.

The default frame rate is 20 frames per second. To change the frame rate, specify the second input argument, fps.

implay(___,fps) also specifies the frame rate fps in frames per second. Specify fps as a positive number.

More About

expand all

Introduced in R2014b