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?

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 ?

ok but 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.

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.