Error: Undefined function 'getsnapshot' for input arguments of type 'double'.
이전 댓글 표시
I'm doing a program that captures a picture by pressing a button, but when I execute the code the error appears:
Undefined function 'getsnapshot' for input arguments of type 'double'.
global vid
global work_area
a = getsnapshot(vid);
imagenGray = rgb2gray(a);
foto = a;
Idetector = vision.CascadeObjectDetector();
BOX = step(Idetector,foto);
cortar = imcrop(imagenGray,BOX(1,:));
work_area = imresize(cortar,[64,48]);
axes(handles.axes1);
imshow(foto);
rectangle('position',BOX(1,:),'edgecolor','b','linewidth',2);
algun consejo?
댓글 수: 1
Image Analyst
2018년 3월 6일
You forgot to show us the line of code where you assigned vid. It should look similar to
vidobj = videoinput(theCameraAdaptor, 1, highestResFormat);
답변 (1개)
Walter Roberson
2018년 3월 6일
0 개 추천
You did not initialize the global variable vid
카테고리
도움말 센터 및 File Exchange에서 Matrox Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!