User`s guide

1 Getting Started
by referencing the property as you would reference a field in a MATLAB
structure.
vid.FrameGrabInterval = 5;
To set the value of a video source object property, you must first use the
getselectedsource function to retrieve the o bject. (You can also get the
selected source by searching the video input object
Source property for the
video source object that has the
Selected property set to 'on'.)
Toillustrate,theexampleassignsavaluetothe
Tag property.
vid_src = getselected source(vid);
set(vid_src,'Tag','motion dete ction setup');
Step 6: Acquire Image Data
After you create the video input object and configure its properties, you can
acquire data . This is typical ly th e core of an y image acquisit ion applicati on ,
and it involves these steps:
Starting the video input object You start an object by calling the
start function. Starting an object p repares the object for data a cquisition.
For example, starting an object locks the values of certain object properties
(they becom e read only). Starting a n object does not initiate the acquiring
of image frames, however. The initiation of data logging depends on the
execution of a trigger.
The follow ing example calls the
start function to start the video input
object. Objects stop when they have acquired the requested number of
frames. Because the example specifies a continuous acquisition, you must
call the
stop function to stop the object.
Triggering the acquisition To acquire data, a video input object must
execute a trigger. Triggers can occur in several ways, depending on how
the
TriggerType property is configured. For ex ample, if you specify an
immediate trigger, the object executes a trigger automatically, immediately
after it s tarts. If you specify a manual trigger, the object waits for a call
to the
trigger function before it initiates data acquisition. For more
information, see Chapter 5, “Acquiring Image Data”.
1-16