User`s guide

7 Working with Acquired Image Data
7-8
In addition, configure a large enough acquisition to allow several calls to peekdata
before it finishes.
vid.FramesPerTrigger = 300;
3
Start the image acquisition object — Call the start function to start the image
acquisition object.
start(vid)
The video object is now running but not logging.
isrunning(vid)
ans =
1
islogging(vid)
ans =
0
4
Use peekdata to view frames before a trigger — If you call peekdata before
you trigger the acquisition, peekdata can only return a single frame of data because
data logging has not been initiated and the memory buffer is empty. If more than one
frame is requested, peekdata issues a warning that it is returning fewer than the
requested number of frames.
pdata = peekdata(vid,50);
Warning: PEEKDATA could not return all the frames requested.
Verify that peekdata returned a single frame. A single frame of data should have
the same width and height as specified by the ROIPosition property and the same
number of bands, as specified by the NumberOfBands property. In this example, the
video format of the data is RGB so the value of the NumberOfBands property is 3.
whos
Name Size Bytes Class
pdata 96x128x3 36864 uint8 array
vid 1x1 1060 videoinput object