RGB = frame2im(F)
[X, map] = frame2im(F)
| Parameter | Description |
|---|---|
| F | a structure: Movie frame, represented as a structure with two fields: cdata: An array of uint8 values storing the image data. colormap: The colormap. This field is empty ([]) for truecolor (RGB) images. A movie frame structure can be created using the im2frame and getframe functions. |
| Parameter | Description |
|---|---|
| RGB | m-by-n-by-3 numeric array: Truecolor image (uint8). |
| X | m-by-n numeric matrix: Indexed image (uint8). |
| map | c-by-3 numeric matrix: Colormap corresponding to the indexed image X, returned as a c-by-3 numeric matrix with values in the range [0, 1]. Each row of the matrix represents an RGB triplet defining the red, green, and blue components of a colormap color. |
RGB = frame2im(F) extracts the truecolor (RGB) image from the movie frame F.
[X, map] = frame2im(F) retrieves the indexed image X and its corresponding colormap map from the movie frame F.
f = figure();
s = surf(peaks);
F = getframe(f)
RGB = frame2im(F);
figure;
imshow(RGB);
| Version | Description |
|---|---|
| 1.13.0 | initial version |