User`s guide
Retrieving Timing Information
7-25
To see an example, see “Determining the Frame Delay Duration” on page 7-25.
Getting the Absolute Acquisition Time
When you use the getdata function, you can optionally specify three return values.
The first contains the image data, the second contains a vector of relative acquisition
times, and the third is an array of structures where each structure contains metadata
associated with a particular frame.
[data time meta ] = getdata(vid);
Each structure in the array contains the following four fields. The AbsTime field contains
the absolute time the frame was acquired. You can also retrieve this metadata by
using event callbacks. See “Retrieving Event Information” on page 8-8 for more
information.
Frame Metadata
Field Name Description
AbsTime Absolute time the frame was acquired, returned in MATLAB clock
format
[year month day hour minute seconds]
FrameNumber Frame number relative to when the object was started
RelativeFrame Frame number relative to trigger execution
TriggerIndex Trigger the event is associated with. For example, when the object
starts, the associated trigger is 0. Upon stop, it is equivalent to the
TriggersExecuted property.
Determining the Frame Delay Duration
To illustrate, this example calculates the duration of the delay specified by the
TriggerFrameDelay property.
1
Create an image acquisition object — This example creates a video input object
for a Data Translation image acquisition device using the default video format. To
run this example on your system, use the imaqhwinfo function to get the object
constructor for your image acquisition device and substitute that syntax for the
following code.