User`s guide
7 Working with Acquired Image Data
7-14
vid.VideoResolution
ans =
[640 480]
4
Bring a single frame into the workspace — Call the getsnapshot function to
bring a frame into the workspace.
frame = getsnapshot(vid);
The dimensions of the returned data reflect the image resolution and the value of the
NumberOfBands property.
vid.NumberOfBands
ans =
1
size(frame)
ans =
480 640
5
Start the image acquisition object — Call the start function to start the image
acquisition object.
start(vid)
The object executes an immediate trigger and begins acquiring frames of data.
6
Bring multiple frames into the workspace — Call the getdata function to
bring multiple image frames into the MATLAB workspace.
data = getdata(vid,10);
The getdata function brings 10 frames of data into the workspace. Note that the
returned data is a four-dimensional array: each frame is three-dimensional and the
nth frame is indicated by the fourth dimension.
size(data)
ans =
480 640 1 10