MATLAB Function Reference Previous page   Next Page

Get movie frame



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 the 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 vector in the form [left bottom width height], where width and height define the dimensions of the rectangle.

F = getframe(...) returns a movie frame, which is a structure having two fields:

To capture an image, use this approach:


Usually, getframe is used in a for loop to assemble an array of movie frames for playback using movie. For example,

Capture Regions

Note that F = getframe; returns the contents of the current axes, exclusive of the axis labels, title, or tick labels. F = getframe(gcf); captures the entire interior of the current figure window. To capture the figure window menu, use the form F = getframe(h,rect) with a rectangle sized to include the menu.


Make the peaks function vibrate.

See Also

frame2im, image, im2frame, movie

Bit-Mapped Images for related functions

Previous page  getfield get (memmapfile) Next page

© 1994-2005 The MathWorks, Inc.