The toolbox includes two functions,
that work with a specific type of multi-dimensional array called a
multi-frame array. In this array, images, called frames in
this context, are concatenated along the fourth dimension. Multi-frame
arrays are either m-by-n-by-1-by-p,
for grayscale, binary, or indexed images, or m-by-n-by-3-by-p,
for truecolor images, where p is the number of
For example, a multi-frame array containing five, 480-by-640 grayscale or indexed images would be 480-by-640-by-1-by-5. An array with five 480-by-640 truecolor images would be 480-by-640-by-3-by-5.
To process a multi-frame array of grayscale images as an image
sequence, you can use the
You can use the
cat command to create a multi-frame
array. For example, the following stores a group of images in a single
A = cat(4,A1,A2,A3,A4,A5)
You can also extract frames from a multiframe image. For example,
if you have a multiframe image
MULTI, this command
extracts the third frame.
FRM3 = MULTI(:,:,:,3)
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.