MATLAB IMAGE ACQUISITION TOOLBOX 3 Guide de l'utilisateur Page 198

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 408
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 197
7 Using Events and Callbacks
function display_f rame (obj,event)
sample_frame = peekdat a(obj,1);
imagesc(sample_frame);
drawnow; % force an update of the figure window
abstime = event.Data.A bsTime;
t = fix(abstime);
sprintf('%s %d:%d: %d', 'timestamp', t(4),t(5),t(6))
To see how this function can be used as a callback, see “Example: Viewing a
Sample Frame” on page 7-16.
Specifying Callback Functions
You associa te a callback function wi t h a specific event by setting the value
of the event’s callback property. The video input object supports callback
properties for all types of events.
You can specify the callback function as the value of the property in any of
three ways:
Text string
Cell array
Function handle
The fol lowing sections pr ovide m ore informatio n about each of these options.
Note To access the object or event structure passed to the callback function,
you must specify the function as a cell array or as a function handle.
7-14
Vue de la page 197
1 2 ... 193 194 195 196 197 198 199 200 201 202 203 ... 407 408

Commentaires sur ces manuels

Pas de commentaire