View Single Post
  #13   Spotlight this post!  
Unread 01-02-2006, 21:34
bush's Avatar
bush bush is offline
Registered User
AKA: Aaron
FRC #0710 (Pine Crest School)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Fort Lauderdale, Florida
Posts: 42
bush has a spectacular aura aboutbush has a spectacular aura about
Send a message via AIM to bush
Re: Camera Is Spazzing Out!

Quote:
Originally Posted by maniac_2040
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.

That's an excellent idea. Why didn't I think of this???