User`s guide

5 Acquiring Image Data
5-2
Acquiring Image Data
After completing chapters 3 and 4, you can see your adaptor included in the list of
adaptors returned by imaqhwinfo and you can create a video input object using the
videoinput function. Now it's time to acquire data from your device. In this chapter,
you flesh out the stub implementations of the adaptor class virtual functions that work
together to acquire data.
User Scenario
The following example shows how a toolbox user initiates the acquisition of image
frames. The example calls the videoinput function to create a video input object and
then calls the start function to start the object. Note in the summary that ten image
frames are acquired.
vid = videoinput('winvideo');
start(vid);
vid
Summary of Video Input Object Using 'IBM PC Camera'.
Acquisition Source(s): input1 is available.
Acquisition Parameters: 'input1' is the current selected source.
10 frames per trigger using the selected source.
'RGB555_128x96' video data to be logged upon START.
Grabbing first of every 1 frame(s).
Log data to 'memory' on trigger.
Trigger Parameters: 1 'immediate' trigger(s) on START.
Status: Waiting for START.
10 frames acquired since starting.
10 frames available for GETDATA.
Triggering
In the previous example, the start function opens the connection with the device but
does not actually cause the acquisition of image data. The toolbox uses triggers to control
image acquisition. By default, video input objects are configured with an immediate
trigger so, in the example, when you start the object, an immediate trigger fires.
The toolbox also supports two other types of triggers: manual and hardware. With a
manual trigger, after starting a video input object, you must call the trigger function to