NotYet = false;
C = webcamlist;
cam=webcam(C{3});
preview(cam);
while ~NotYet
tic;pause(0.10);toc;
I = snapshot(cam);
faceDetect = vision.CascadeObjectDetector();
bbox=step(faceDetect,I);
if ~isempty(bbox)
NotYet = true;
break;
end
end
closepreview;
clear('cam');
face = imcrop(I,bbox);
imwrite(face, 'face.png');
how to avoid these error while presenting to external
Error in imshow (line 222)
images.internal.imageDisplayParseInputs({'Parent','Border','Reduce'},preparsed_varargin{:});
Error in imcrop>parseInputs (line 252)
imshow(a,cm);
Error in imcrop (line 93)
[x,y,a,cm,spatial_rect,h_image,placement_cancelled] =
parseInputs(varargin{:});
Error in DetectFaceandEyes (line 19)
face = imcrop(I,bbox);

댓글 수: 4

John D'Errico
John D'Errico 2016년 5월 7일
What error do you get? Show the COMPLETE error message, rather than force others to try to recreate it.
Error in imshow (line 222)
images.internal.imageDisplayParseInputs({'Parent','Border','Reduce'},preparsed_varargin{:});
Error in imcrop>parseInputs (line 252)
imshow(a,cm);
Error in imcrop (line 93)
[x,y,a,cm,spatial_rect,h_image,placement_cancelled] =
parseInputs(varargin{:});
Error in DetectFaceandEyes (line 19)
face = imcrop(I,bbox);
Error in Trianing (line 10)
DetectFaceandEyes;
Above link have my Whole Code
Thanks For your reply
What is:
bbox
size(I)
Don't use semicolons. Tell us what that shows in the command window. Oh, and read this.
bbox =
564 165 265 265
ans =
720 1280 3
sometimes it works and sometimes doesn't
software shows warning or error without semicolons

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기

태그

질문:

2016년 5월 7일

댓글:

2016년 5월 7일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by