Face Detection using Webcam run your code recusrsively.
Mostrar comentarios más antiguos
Hi I am implementing face detection in a live video feed.Now my code runs perfect when i debug it it is just when i actually run it does not show my imshow() function i-e nothing figure is not shown but my webcam is running(The light is on).
if true
FDetect = vision.CascadeObjectDetector;
x=0;
vidDevice = imaq.VideoDevice('winvideo', 1, 'YUY2_640x480', ... % Acquire input video stream
'ROI', [1 1 640 480], ...
'ReturnedColorSpace', 'rgb');
while(x<1)
rgbFrame=step(vidDevice);
BB = step(FDetect,rgbFrame);
imshow(rgbFrame);hold on
for i = 1:size(BB,1)
rectangle('Position',BB(i,:),'LineWidth',5,'LineStyle','-','EdgeColor','r');
end
hold off
end
end
Respuesta aceptada
Más respuestas (1)
irtiza
el 23 de Feb. de 2014
Categorías
Más información sobre Image Preview and Device Configuration en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!