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.
>>imaqhwinfo

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:


>>obj1

=

videoinput(‘winvideo’);

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.
>>preview(obj1);
voila, Now don’t blush. 🙂
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s