Have you ever wanted to process your image and then do some processing and then move your robot?
well this can be easily done through MATLAB. Get Matlab 7.You must check if you have the data acquisition toolbox in your version. that you have installed.
TO FIND IF YOU HAVE DATA ACQUISITION
Just get to the Matlab Start menu
That shows that the toolbox exixts.
Type “imaqhinfo” in command window to see this
Notice that the adaptor is ‘Winvideo’
Any webcam you connect is accessed through this adaptor. Now the main part
1)Connect your webcam to the computer through the USB.
vid = videoinput(‘winvideo’, 1, ‘RGB24_320x240’);
Specify the adaptor name and resolution
2) Open Preview window to view video at runtime
This will open a window similar to yahoo messenger Webcam interface. And you will be able to view the video demo the webcam at runtime
data = getsnapshot(vid);
This command will store the image of that instant into the variable data in a matrix of 320X240.
That’s it , now that you have the image of what your robot is looking at or probably the desired object, you may carry on processing and provide proper control signals to your Parallel Ports . If You are new to parallel ports read here.
comment your thoughts, don’t keep them to yourself!!!
Madan – Your host 🙂