how to capture an image using usb webcamera in matlab

Photo of author

By Jackson Taylor


code 
imaqhwinfo
imaqhwinfo(‘winvideo’)
imaqhwinfo(‘winvideo’,1)
vid = videoinput(‘winvideo’,1,’RGB24_640x480′);
frame=getsnapshot(vid);
imshow(frame)