User`s guide
Bringing Image Data into the MATL AB Workspace
getdata Blocks Until Frames Become Available
Example: Acquiring 1 0 Seconds of Image Data
This example shows how you can configure an approximate time-based
acquisition using the
FramesPerTrigger property:
1 Create an im age acquisition object — Th i s example creates a video
inputobjectforaWindowsimageacquisition device. To run this example
on yo ur system, use the
imaqhwinfo function to get the object constructor
for your image acquisition device and substitute that syntax for the
following code.
vid = videoinput('win video',1);
2 Configure properties — To acquire 10 seconds of data, determine the
frame rate of your im ag e acquisition device and then multiply the fram e
rate by the number of seconds of data you want to acquire. The product of
this multiplica tion is the valu e of the
FramesPerTrigger property.
Forthisexample,assumeaframerateof30framespersecond(fps).
Multiplyi ng 30 by 10, you need to s et th e
FramesPerTrigger property to
the value 300.
6-5