Main Content

start

Obtain exclusive use of image acquisition device

Description

start(videoinput) obtains exclusive use of the image acquisition device associated with the videoinput object and locks the configuration of the device. Using the start command to begin running the object is a necessary first step to acquire image data. To control data logging, use the TriggerType property. To configure the trigger settings of the object, use the triggerconfig function.

For more information about the video input acquisition, see Algorithm.

example

Examples

collapse all

Construct a video input object.

vid = videoinput("winvideo",1);

Configure the trigger properties for the object by setting the trigger type to "manual". When you set the trigger type to "manual", data logging occurs when you call the trigger function..

triggerconfig(vid,"manual")

Start the videoinput object to acquire image data, pause for 5 seconds, and then display the number of acquired frames. Observe that no frames are acquired.

start(vid)
pause(5)
vid.FramesAcquired
ans = 
0

Trigger the acquisition, wait until the image acquisition stops, and then display the number of acquired frames. Observe that 10 frames are acquired.

trigger(vid)
wait(vid)
vid.FramesAcquired
ans = 
10

Remove the videoinput object from memory.

delete(vid)

Input Arguments

collapse all

Video input, specified as a single videoinput object or an array of videoinput objects.

If an error occurs, the function restores any configured videoinput objects in the array to their original configurations.

Algorithms

collapse all

Version History

Introduced before R2006a