code to read image from webcam
이전 댓글 표시
hai frnds!!
i'm naveen.. i'm doing a face recognition project as major final year project in b.tech,i've been using the following code to acquire image through webcam but it shows a blank image in output...can any one help me? thanks
the code is:
vid = videoinput('winvideo');
preview(vid);
start(vid);
im=getdata(vid); % im = getsnapshot(vid); alternative use
figure,imshow(im);
plz suggest coorect code..
댓글 수: 1
Partha Ghosh
2012년 11월 8일
편집: Walter Roberson
2012년 11월 8일
im=getdata(vid);
When you do this it returns you a set of images in my case 10 RGB images hence you should use
imshow(im(:,:,:,i))
where I is the index of the image
답변 (1개)
Image Analyst
2011년 11월 25일
0 개 추천
Can you see the image when you use imaqtool?
카테고리
도움말 센터 및 File Exchange에서 National Instruments Frame Grabbers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!