Originally Posted by chris31
How fast can the camera track. Do i need to write some code to make it be able to track better. I havent yet set up the camera so i dont know how fats it really reacts.
You're free to modify/re-write the code any way you see fit. The camera, out of the box, tracks pretty well and can potentially be made faster by adjusting the two proportional gain values that are documented in tracking.h. You might also consider adding some more intelligence to the tracking algorithm. As an example, consider implementing some kind of forward predictor of where the center of the green blob (also known as the centroid) will be in the next
t-packet and move the servos ahead
of time. If the centroid moves 30 pixels to the left between the last t-packet and the current t-packet, it might be safe to assume that the centroid will move around 30 pixels left in the next frame. With that knowledge, command the servos such that the camera will move, say, half that distance left so that the calculated error on the next t-packet will be much smaller. If you don't understand this, don't worry as it's advanced stuff you'll get later in college if you take a control theory class.