User`s guide
6 Working with Acquired Image Data
set(vid,'FramesPerTrigger',300)
3 Start the image acquisition object —Callthestart 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 the object continues logging the data to the memory buffer. After
logging the specified number of frames, the object stops running.
4 Bring the acquired data into the workspace — To verify that you
acquired the amount of data you wanted, use the optional
getdata syntax
that returns the timestamp of every frame acquired. The difference
between the first timestamp and the last timestamp should approximate
the amount of data you expecte d.
[data time] = getdata(vid,300);
elapsed_time = time(30 0) - ti me(1)
10.0467
5 Clean up — A lways rem ove image acquisition objects from mem ory, and
the variables that re ference them, when you n o longer need them.
delete(vid)
clear vid
Viewing Frames in the Memor y Buffer
To view sample frames from the memory buffer w ithout removing them, use
the
peekdata function.
The
peekdata function always returns the most recently acquired frames
in the memory buffer. For example, if you request three frame s,
peekdata
returns the most recently acquired frame in the buffer at the time of the
request and the two frames that immediately precede it.
The fo ll owing figu re illustrates this proces s. The command
peekdata(vid,3)
is called at three different times (T
1
,T
2
,andT
3
). The shaded frames indic ate
6-6