您的位置:首页 > 编程语言 > MATLAB

matlab getframe frame2im 存储坐标到图片

2012-01-18 12:35 387 查看
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 vector 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: