User`s guide
17 Functions — Alphabetical List
17-22
getsnapshot
Immediately return single image frame
Syntax
frame = getsnapshot(obj)
[frame, metadata] = getsnapshot(obj)
Description
frame = getsnapshot(obj) immediately returns one single image frame, frame,
from the video input object obj. The frame of data returned is independent of the
video input object FramesPerTrigger property and has no effect on the value of the
FramesAvailable or FramesAcquired property.
The object obj must be a 1-by-1 video input object.
frame is returned as an H-by-W-by-B matrix where
H Image height, as specified in the ROIPosition property
W Image width, as specified in the ROIPosition property
B Number of bands associated with obj, as specified in the NumberOfBands
property
frame is returned to the MATLAB workspace in its native data type using the color
space specified by the ReturnedColorSpace property.
You can use the MATLAB image or imagesc function to view the returned data.
[frame, metadata] = getsnapshot(obj) returns metadata, a 1-by-1 array of
structures. This structure contains information about the corresponding frame. The
metadata structure contains the field AbsTime, which is the absolute time the frame was
acquired, expressed as a time vector. In addition to that field, some adaptors may choose
to add other adaptor-specific metadata as well.