This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

implay

Play movies, videos, or image sequences

Use the implay function to open the Video Viewer app, which plays MATLAB® movies, videos, or image sequences (also called image stacks). Using Video Viewer you can select the movie or image sequence that you want to play, jump to a specific frame in the sequence, change the frame rate of the display, or perform other viewing activities. You can open multiple Video Viewers to view different movies simultaneously.

The figure shows the Video Viewer app containing an image sequence.

Syntax

implay
implay(filename)
implay(I)
implay(___,fps)

Description

implay opens the Video Viewer app. To select the movie or image sequence that you want to play, use the Video Viewer File menu.

implay(filename) opens the Video Viewer app, displaying the content of the file specified by filename. The file can be an Audio Video Interleaved (AVI) file. The Video Viewer reads one frame at a time, conserving memory during playback. The Video Viewer does not play audio tracks.

implay(I) opens the Video Viewer app, displaying the first frame in the multiframe image specified by I.

implay(___,fps) specifies the frame rate at which you want to view the movie or image sequence.

Examples

Play Three Types of Videos

Animate a sequence of images.

load cellsequence
implay(cellsequence,10);

Visually explore a stack of MRI images.

load mristack
implay(mristack);

Play an AVI file.

implay('rhinos.avi');

Input Arguments

collapse all

File name of AVI file, specified as a character vector or string scalar.

Data Types: char | string

Multiframe image sequence, specified as one of the following.

  • A MATLAB movie structure

  • A binary or grayscale image sequence, specified as an m-by-n-by-1-by-k array or an m-by-n-by-k array

  • A truecolor (RGB) image sequence, specified as an M-by-N-by-3-by-K array.

I can be numeric but uint8 is preferred. The actual data type used to display pixels may differ from the source data type.

Frame rate, in frames-per-second, specified as a positive number. If omitted, the Video Viewer uses the frame rate specified in the file or the default value, 20.

Tips

  • You can also open the Video Viewer app through the Apps tab. Navigate to the Image Processing and Computer Vision group and click Video Viewer.

Introduced in R2007b