Image Processing Toolbox    

Multiframe Image Arrays

For some applications, you may need to work with collections of images related by time or view, such as magnetic resonance imaging (MRI) slices or movie frames.

The Image Processing Toolbox provides support for storing multiple images in the same array. Each separate image is called a frame. If an array holds multiple frames, they are concatenated along the fourth dimension. For example, an array with five 400-by-300 RGB images would be 400-by-300-by-3-by-5. A similar multiframe intensity or indexed image would be 400-by-300-by-1-by-5.

Use the cat command to store separate images into one multiframe file. For example, if you have a group of images A1, A2, A3, A4, and A5, you can store them in a single array using

You can also extract frames from a multiframe image. For example, if you have a multiframe image MULTI, this command extracts the third frame.

Note that in a multiframe image array, each image must be the same size and have the same number of planes. In a multiframe indexed image, each image must also use the same colormap.

Multiframe Support Limitations

Many of the functions in the toolbox operate only on the first two or first three dimensions. You can still use four-dimensional arrays with these functions, but you must process each frame individually. For example, this call displays the seventh frame in the array MULTI.

If you pass an array to a function and the array has more dimensions than the function is designed to operate on, your results may be unpredictable. In some cases, the function simply processes the first frame of the array, but in other cases the operation does not produce meaningful results.

See the reference pages for information about how individual functions work with the dimensions of an image array. For more information about displaying multiframe images, see Displaying and Printing Images.


  RGB Images Summary of Image Types and Numeric Classes