After countless times of me waving bright lights at the camera, I think I’ve finally got the camera to follow it. (After having it run away from lights…) However, I’m still confused when it comes to WPILib’s CameraInitializationData structure… so many members. The three that most concern me are the first six, which WPILib’s API.h labels as:
unsigned char redMin, redMax, greenMin, greenMax, blueMin, blueMax;
The WPILib website has this line from their “tracking FRC green target” sample:
{ 85,115,15,17,100,145,0,1,0,1,0,0,128,128,128,1,16,8,5,30,15,5 }
Now, I’m reading this as:
red = 85 to 115
green = 15 to 17
blue = 100 to 145
I’m assuming that the topmost range for the min/max is 255. (is this correct?) Using that, that seems to be a dark purple. Certainly not green. Taking raw pictures with the camera also seems to say the only the outer fridges of the light are green - the center is pure white (over expose?). (We haven’t taken pictures from a distance… we just got the lights wired in a way that they’re actually mobile…) The problem is that nothing I use seems to work. That array does. Why?
Also, what are all the pan and tilt values near the end of the initialization array? Should the camera be sending back pan/tilt values in the TPacket? (Are these leftovers from a previous year when the servos were plugged into the camera itself?) (I seem to get 127 or 128 (can’t remember) all the time, or 0 if there’s a connection failure.) I’m currently using mx and my to compute a servo offset.
Thanks in advance for all the help… I hope I haven’t missed something somewhere. (It took me a while to find the lens on the camera…)