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

  • 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 31
1 Getting Started
Note The example uses functions in Image Processing Toolbox.
% Create video input obje ct.
vid = videoinput('dcam ',1,'Y8_1024x768')
% Set video input object prop erties for this app lication.
% Note that example uses both SET method and dot notation metho d.
set(vid,'TriggerRepeat',Inf);
vid.FrameGrabInterval = 5;
% Set value of a video source obj ect property.
vid_src = getselecteds ource(vid);
set(vid_src,'Tag','motion dete ction setup');
% Create a figure window.
figure;
% Start acquiring frames.
start(vid)
% Calculate difference image and disp lay it.
while(vid.FramesAcquired<=100) % Stop after 1 00 frames
data = getdata(vid,2) ;
diff_im = imabsdiff(d ata(:,:,:,1),data(:,:,:,2));
imshow(diff_im);
end
stop(vid)
1-18
Vue de la page 31
1 2 ... 27 28 29 30 31 32 33 34 35 36 37 ... 407 408

Commentaires sur ces manuels

Pas de commentaire