Camera Tracking

Rookie programmer. Need to learn how to use the camera for vision tracking. I learned how to detect a specific color and create a script from it but dont know how to make the robot respond and move to the detected color. Please Help.

(I’ve never done vision programming)

But I think what you should do is divide the camera into three sections: left, right, and center. If you see the color in the left one, send a small value to the joystick x value in arcade drive (or whatever you have there). If it’s the right one, send a negative value, and if it’s in the middle zone send a 0.

Is that helpful?

You should try to code out the position of the color source since the camera probably picks one up and make the camera try to make its position equal the color source position.

This tutorial might be helpful: http://decibel.ni.com/content/docs/DOC-14729