Error while using webcam from my laptop
34 views (last 30 days)
I have installed OS Generic Video Interface Support package to use laptop camera.By running 'webcam' in command window, The camera details in my laptop are displayed with the fol. error:The camera did not return a frame for this resolution.So I am not able to preview camera capturing video nor Matlab is able to detect my webcam.can i know soln for this at the earliest?
Prannay Jain on 7 Feb 2017
OS Generic Video Interface Support package is used for Image Acquisition Toolbox which does not provide 'webcam' command. To use 'webcam' command, install 'MATLAB Support Package for USB Webcams' instead of 'OS Generic Video Interface Support package'.
Refer to the following documentation link to install Webcam support package:
Since you would like to use laptop camera, you can still use 'OS Generic Video Interface' to preview the camera using the following MATLAB code:
>> v = videoinput('winvideo',1);
I am assuming you are on Windows machine. If you are on mac, replace 'winvideo' with 'macvideo'.
I hope this will help you in previewing the camera.