| MATLAB Function Reference | ![]() |
Convert indexed or truecolor image into movie format
Syntax
F = im2frame(X,Map)
F = im2frame(truecolor_array)
Description
F = im2frame(X,Map)
converts the indexed image X and associated colormap Map into a movie frame F. X can be of type double or uint8 and must be specified with a colormap (Map). The colormap must have three columns, and must contain double-precision values between 0 and 1 (no NaNs or Infs ). The values in X must contain legal indices into that colormap.
uint8 images must have 0-based indices (so if the colormap is 7 rows long, X must contain values between 0 and 6). If it is double, it must contain 1-based indices into the colormap (so if the colormap is 7 rows long, X must contain values between 1 and 7). NaNs and Infs are illegal, as are negative
F = im2frame( converts the truecolor image into a movie frame F. truecolor_array)
truecolor_array must be an m-by-n-by-3 array of RGB values. It can be of type double or uint8 with values in the range:
Example
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
| ifftshift | imag | ![]() |