Image capturing in matlab

If you are using a laptop with a camera. Then this is how one can open the camera in MATLAB.

Web cameras are viewed by Matlab as adapters. So to use the webcam we need to know the adapter name of our webcam. In most cases it’s “winvideo”
So to know that: we type the following command.

So easily one can see that the installed adapters in my system are ‘coreco’ and ‘winvideo’
Now to use that adapter we need to make an object for it. This is how it’s done:




This creates an object to handle the web cam and can be henceforth used to operate the webcam.
The following simple command lets you preview the camera output.
voila, Now don’t blush. 🙂