Arduino Robot Car(with ping sensor) + Web Cam Object recognition

My and my friend ar trying to put a web cam on a robot car and make the car follow a specif color (blue) the car is working fine its avoiding all the obstacoles, we are trying to make the car using a web cam to folllow the color(blue) the color recognition is working fine. The question is : The car algoritm is in C the basic arduino programing language, and the color recognition is in MatLab, can we combine the two and uploaded on to the arduino?

for the car we are using a : Arduino uno, and 4 ping sensors for the color recognition we are using : a leptop with a web cam and matlab

Is there possible to combine and uploade both on the arduino and work ?

Have you figured out how to interface the webcam to the Arduino?

we want to buy a small cam like this and use on the car !

wath do you think ?

wath do you think ?

I think reading 128 pixels at about 100us per pixel will be slow. How are you going to distinguish colours?

we have a code made in matlab for color recognition and the camera can select a specific color (ex: Blue) and wanth the car to follow ( ex: a blue object like a ball). is possible to introduce matlab code in my existing C++ code of arduino. C++ and matlab or we need to crete or just matlab or C++ and uploaded into arduino ?

Let me rephrase the question: How are you going to distinguish colours with a monochrome linescan camera? Filter wheel?

sorry mabey that camera is not the one but with a difrent camera like this one

Well, yes, using a camera that is smarter and more expensive than the Arduino, I think you'd be able to do what you want.

ok but :smiley: but can we combine the two code C++ and Matlab, and uploaded both on the arduino and work autonom ? ( matlab code to recognize the color and use C++ motor functions to drive the car toward the color ) ?

The Arduino doesnt have enought ram to do image processing, nor it as the power to do it. You can convert the Matlab code, but it as a lot of complex functions that will take way more flash than the usual 32Kb that an Arduino Uno/duemilanove as. You can process the data in a computer/laptop/netbook and then send it to Arduino via serial, the Arduino cant ever in its life do image processing.

I don't know, I've never used the CMUcam, but I suspect that you'd be better be concentrating on your CMUcam code, and just using the Arduino to drive the motors and read the sonars.

The Arduino doesnt have enought ram to do image processing, nor it as the power to do it

Now that's just defeatist.

ok if the arduino can process an image, can we strap on the car the leptop with the web cam and with the matlab software, and send the data to ardunino so the arduino know how to drive to the color ?

Yes, but the Arduino code is almost trivial compared to the rest of the stuff.

Doing bare metal things, with no C++ overhead, and using a line sensor of up to 128bits it can do something, but what data can be extracted from a simple line CCD, it cant follow or track anything, maybe it can say where is brightest or something like that, but not much more.

Using a laptop, the laptop process's all the data and then send via serial commands to drive the robot.

but what data can be extracted from a simple line CCD,

Width/length of some thresholded a line.

Ok thank you we will try to strap the leptop to the car. We will keep up up to date if you are interested ! :D

Use Roborealm to do the colour tracking and you can use c code as wll in Roborealm to move the motors. It supports Arduino and most cameras. Here is the link: And here is an related link And here is another