12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

getframePurpose2getframeGet movie frameSyntaxDescriptionF = getframeF = getframe(h)F = getframe(h,rect)[X,Map] = getframe(...)getframe returns a movie frame. The frame is a snapshot (pixmap) of thecurrent 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 handleh.F = getframe(h,rect) specifies a rectangular area from which to copy thepixmap. rect is relative to the lower-left corner of the figure or axes h, in pixelunits. 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 twofields:• cdata – The image data stored as a matrix of uint8 values. The dimensionsof F.cdata are height-by-width-by-3.• colormap – The colormap stored as an n-by-3 matrix of doubles. F.colormapis empty on true color systems.To capture an image, use this approach:F = getframe(gcf);image(F.cdata)colromap(F.colormap)[X,Map] = getframe(...) returns the frame as an indexed image matrix Xand a colormap Map. This version is obsolete and is supported only forcompatible with earlier version of <strong>MATLAB</strong>. Since indexed images cannotalways capture true color displays, you should use the single output argumentform of getframe. To write code that is compatible with earlier version of2-210

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!