Matlab GetFrame frame2im Store coordinates to picture

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.