User`s guide

7 Working with Acquired Image Data
7-26
vid = videoinput('dt',1);
2
Configure properties — For this example, configure a trigger frame delay large
enough to produce a noticeable duration.
vid.TriggerFrameDelay = 50
3
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. The
start function returns control to the command line immediately but data logging
does not begin until the trigger frame delay expires. After logging the specified
number of frames, the object stops running.
4
Bring the acquired data into the workspace — Call the getdata function
to bring frames into the workspace. Specify a return value to accept the timing
information returned by getdata.
[data time ] = getdata(vid);
The variable time is a vector that contains the time each frame was logged,
measured in seconds, relative to the execution of the first trigger. Check the first
value in the time vector. It should reflect the duration of the delay before data
logging started.
time
time =
4.9987
5.1587
5.3188
5.4465
5.6065
5.7665
5.8945
6.0544
6.2143
6.3424
5
Clean up — Always remove image acquisition objects from memory, and the
variables that reference them, when you no longer need them.