Log in

View Full Version : Pre-programmed RGB values


bush
28-01-2006, 21:11
I'm using Kevin's streamlined camera code. camera.h defines the default min/max RGB values that are used by Track_Color(). The mean RGB value is 100R, 16G, 122B (or #64107A in base 16). THIS IS THAT COLOR.. This obviously isn't green. I'm sure these are in fact the correct colors to use (I haven't tested yet), but I want to make sure I am understanding all of the code correctly.

I don't consider myself an expert on cameras, but my only guess would be that the color being programmed into the camera is the negative of the actual color we are tracking. Come to think of it, I think I remember learning somewhere that purple and green are complements.

In any event, somebody please explain :)

Alan Anderson
28-01-2006, 21:47
Read the code a little more closely, with manual in hand to find out what the control registers mean, and you might find the spot where it puts the camera in YCrCb color mode. The values you see aren't RGB values. Does that help?

bush
28-01-2006, 22:04
Ah in State 9 :)
I missed that before, thanks.

Kevin Watson
28-01-2006, 22:13
Ah in State 9 :)
I missed that before, thanks.It's also mentioned in the handy CMUcam2 FAQ: http://kevin.org/frc/camera.

-Kevin