GetFrame
Capture Movie Frame
Syntax
GetFrame
F = GetFrame
F = GetFrame (h)
F = GetFrame (h,rect)
Description
GetFrame returns a movie frame. The frame is a snapshot (pixmap) of the current axes or figure.
F = GetFrame Gets a frame from the current axes.
F = GetFrame (h) Gets a frame from the figure or axes identified by handle H.
F = GetFrame (h,rect) specifies a rectangular area from which to copy the Pixmap. Rect is relative to the lower left corner of the figure or axes h, in pixel units. Rect is a four-element vectors in the form [left bottom width height], where width and height define the dimensions of the Rectangle.
frame2im-return image data associated with movie frame Syntax
[X,map] = Frame2im (F)
Description
[X,map] = Frame2im (F) returnsthe indexed ImageX and associated ColorMap Map fromthe single movie frame F. If the frame containstrue-color data, Them-by-n-3matrix Map is empty. The functions getframe andim2frame Createa movie frame. Examples
Create and capture an image using GetFrame and Frame2im:
Peaks %make figure
f = getframe; %capture screen shot
[Im,map] = Frame2im (f); %return Associated image Data
if IsEmpty (map) %truecolor system
RGB = IM;
else %indexed system
RGB = Ind2rgb (im,map); %convert image Data
end