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!