This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Return image data associated with movie frame


[X,Map] = frame2im(F)


[X,Map] = frame2im(F) returns the indexed image data X and associated colormap Map from the single movie frame F. The output Map is a three-column matrix where each row of the matrix is an RGB triplet value that defines one color of the colormap. If the frame contains true-color data, then Map is empty. The functions getframe and im2frame create a movie frame.


collapse all

Create a surface plot.


Use getframe to capture the plot as a movie frame. Then, convert the captured movie frame to image data.

F = getframe;
[X,map] = frame2im(F);

Introduced before R2006a