MATLAB Functions Help Desk

getframe

Purpose

Get movie frame

Synopsis

Description

getframe returns a column vector containing one movie frame. The frame is a snapshot (pixmap) of the current Axes.

M = getframe gets a frame from the current Axes.

M = getframe(h) gets a frame from the Figure or Axes graphics object identified by h.

M = 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 graphics object identified by h, in pixel units. rect is a four-element vector in the form [left bottom width height], where width and height define the dimensions of the rectangle.

[X,Map] = getframe(...) returns the frame as an indexed image matrix X and a colormap Map. In this case, h is a handle to a Figure or Axes object. You display the image matrix using image or imagesc.

Remarks

Usually, getframe is put in a for loop to assemble movie matrix M for playback using movie. To prevent excessive memory use, use moviein to allocate movie matrix M before building the movie. This generates an appropriate size matrix of zeros.

Examples

Make the peaks function vibrate:

See Also

movie, moviein



[ Previous | Help Desk | Next ]