|
Re: Camera Is Spazzing Out!
One way to combat the camera locking onto fluorescent lighting or really bright lights is to make the camera code check the confidence level of the tracked blob. For us, when the camera "locked" onto any light other than the actual vision target it would have a very low confidence level and sort of "spaz out" (i.e. jerky). I made the code check the confidence level for a higher value and it seemed to fix the problem.
The code you need to change is in tracking.c, in the function Servo_Track() near the beginning. There's a line that looks like this:
if(T_Packet_Data.my != 0)
Which checks if the camera found a target, you simply change it to make sure the camera found a 'good' target like so:
if(T_Packet_Data.my != 0 && T_Packet_Data.confidence > some_value)
I just sort of tweaked around 'some_value' till I got good results. A confidence of 80-90 seems pretty good.
|