Quantcast

Documentation Center

  • Trial Software
  • Product Updates

im2frame

Convert image to movie frame

Syntax

f = im2frame(X,map)
f = im2frame(X)

Description

f = im2frame(X,map) converts the indexed image, X, and the associated colormap, map, into a movie frame f.

  • If you specify X as an m-by-n array of integers, then im2frame uses the associated colormap, map, where map is a three-column array of values in the range [0,1]. Each row of map is a three-element RGB triplet that specifies the red, green, and blue components of a single color of the colormap.

  • If you specify X as an m-by-n-by-3 truecolor image, then map is optional and has no effect.

f = im2frame(X) converts the indexed image, X, into a movie frame f using the current colormap if X contains an indexed image.

For more information on image types, see Image Types.

Class Support

X must be of class uint8 or double.

Examples

Convert Image Sequence to Movie

Use im2frame to convert a sequence of images into a movie.

F(1) = im2frame(X1,map);
F(2) = im2frame(X2,map);
	...
F(n) = im2frame(Xn,map);
movie(F)

See Also

|

Was this topic helpful?