User`s guide
Getting Started Doing Image Acquisition Programmatically
1-17
FrameRate = 15
Gain = 2048
Shutter = 2715
Setting Object Properties
To set the value of a video input object property or a video source object property, you
reference the object property as you would a field in a structure, using dot notation.
Some properties are read only; you cannot set their values. These properties typically
provide information about the state of the object. Other properties become read only
when the object is running. To view a list of all the properties you can set, use the set
function, specifying the object as the only argument.
To implement continuous image acquisition, the example sets the TriggerRepeat
property to Inf. To set this property, enter this code at the MATLAB prompt.
vid.TriggerRepeat = Inf;
To help the application keep up with the incoming video stream while processing data,
the example sets the FrameGrabInterval property to 5. This specifies that the object
acquire every fifth frame in the video stream. (You might need to experiment with
the value of the FrameGrabInterval property to find a value that provides the best
response with your image acquisition setup.) This example shows how you can set the
value of an object property 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 object. (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'.)
To illustrate, the example assigns a value to the Tag property.
vid_src = getselectedsource(vid);
vid_src.Tag = 'motion detection setup';
Step 6: Acquire Image Data
After you create the video input object and configure its properties, you can acquire data.
This is typically the core of any image acquisition application, and it involves these steps: