Main Content

stop

Stop video input object

Description

stop(videoinput) halts an acquisition associated with the video input object videoinput. The stop function:

  • Sets the Running property of the object to "Off"

  • Sets the Logging property of the object to "Off", if needed

  • Executes the StopFcn callback of the object.

An image acquisition object also stops running under one of these conditions:

  • Acquisition of the requested number of frames. Acquisition is complete when

    FramesAcquired = FramesPerTrigger * (TriggerRepeat + 1).

    FramesAcquired, FramesPerTrigger, and TriggerRepeat are properties of the videoinput object.

  • Occurrence of a run-time error.

  • Expiration of the object's Timeout value.

The EventLog property of the object records the stop event.

example

Examples

collapse all

Create a video input object.

vid = videoinput("winvideo");

Specify the acquisition duration. Set the FramesPerTrigger property to 100.

vid.FramesPerTrigger = 300;

Start the video acquisition. Because the object uses an immediate trigger (the default), acquisition begins when the object starts.

start(vid);

Stop the video acquisition.

stop(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 video input objects in the array to their original configurations.

Version History

Introduced before R2006a