This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Using Events and Callbacks

You can enhance the power and flexibility of your image acquisition application by using event callbacks. An event is a specific occurrence that can happen while an image acquisition object is running. The toolbox defines a set of events that include starting, stopping, or acquiring frames of data.

When a particular event occurs, the toolbox can execute a function that you specify. This is called a callback. Certain events can result in one or more callbacks. You can use callbacks to perform processing tasks while your image acquisition object continues running. For example, you can display a message, analyze data, or perform other tasks. The start and stop callbacks, however, execute synchronously; the object does not perform any further processing until the callback function finishes.

Callbacks are controlled through video input object properties. Each event type has an associated property. You specify the function that you want executed as the value of the property.

The following topics describe using events and callbacks.