MATLAB IMAGE ACQUISITION TOOLBOX 3 Guía de usuario Pagina 32

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 408
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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
Vista de pagina 31
1 2 ... 27 28 29 30 31 32 33 34 35 36 37 ... 407 408

Comentarios a estos manuales

Sin comentarios