Play movies, videos, or image sequences
implay opens the Video Viewer app. You can use Video Viewer to show MATLAB® movies, videos, or image sequences (also called image stacks). To select the movie or image sequence that you want to play, use the Video Viewer File menu. To play the movie, jump to a specific frame in the image sequence, or change the frame rate of the display use the Video Viewer toolbar buttons or menu options. You can open multiple Video Viewers to view different movies simultaneously.
The following figure shows the Video Viewer app containing an image sequence.
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 array specified by I. I can be a MATLAB movie structure, or a sequence of binary, grayscale, or truecolor images. A binary or grayscale image sequence can be an M-by-N-by-1-by-K array or an M-by-N-by-K array. A truecolor image sequence must be an M-by-N-by-3-by-K array.
implay(..., FPS) specifies the rate at which you want to view the movie or image sequence. The frame rate is specified as frames-per-second. If omitted, the Video Viewer uses the frame rate specified in the file or the default value 20.
I can be numeric but uint8 is preferred. The actual data type used to display pixels may differ from the source data type.
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.