This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

Convert Multiframe Image to Movie

To create a MATLAB® movie from a multiframe image array, use the immovie function. This example creates a movie from a multiframe indexed image.

mov = immovie(X,map);

In the example, X is a four-dimensional array of images that you want to use for the movie.

To play the movie, use the implay function.


This example loads the multiframe image mri.tif and makes a movie out of it.

mri = uint8(zeros(128,128,1,27)); 
for frame=1:27
	[mri(:,:,:,frame),map] = imread('mri.tif',frame);

mov = immovie(mri,map);

    Note   To view a MATLAB movie, you must have MATLAB software installed. To make a movie that can be run outside the MATLAB environment, use the VideoWriter class to create a movie in a standard video format, such as, AVI.

Was this topic helpful?