User`s guide
peekdata
Purpose Most recently acquired image data
Syntax data = peekdata(obj, frames)
Description data = peekdata(obj, frames) returns data containing the latest
number of frames specified by
frames.Iffram es is greate r than the
number of frames currently acquired, all available frames are returned
with a warning message stating that the requested number of frames
was not available.
obj mustbea1-by-1videoinputobject.
data is returned as an H-by-W-by-B-by-F matrix where
H
Image height, as specified in the object’s
ROIPosition
property
W
Image width, as specified in the object’s
ROIPosition
property
B
Number of color bands, as specified in the
NumberOfBands
property
F
Number of frames returned
data is ret
urned to the MATLAB workspace in its native data type
using the
color space specified by the
ReturnedColorSpace property.
You can us
e the MATLAB
image or imagesc functions to view the
returned
data. Use
imaqmontage to view mul tiple fra mes a t once.
peekdata
is a nonblocking function that immediately returns image
frames an
d e xecution control to the MATLAB workspace. Not all
requeste
d data might be returned.
Note peek
data
provides a look at the data; it d oes not remove data
from the
memory buffer. The object’s
FramesAvailable property value
is not af
fected by the number of frames returned by
peekdata.
12-41