Log in

View Full Version : RGB colors in camera.h


X-Istence
11-01-2006, 21:42
Hey,

I am wondering, in camera.h it has the following set:

#define R_MIN_DEFAULT 85 // Rmin for call to Track_Color()

#define R_MAX_DEFAULT 115 // Rmax for call to Track_Color()

#define G_MIN_DEFAULT 15 // Gmin for call to Track_Color()

#define G_MAX_DEFAULT 17 // Gmax for call to Track_Color()

#define B_MIN_DEFAULT 100 // Bmin for call to Track_Color()

#define B_MAX_DEFAULT 145 // Bmax for call to Track_Color()

Are the lower values what we are looking for? Or are we looking for stuff that is not green?

As far as I remember from RGB, 0,255,0 is looking for green, while 255,0,255 is looking for a mix of red and blue, which would be magenta.

I am using the slimlined, sleek version of Kevin Watson's code, just to simplify things for now.

Mr.Fahrenheit
11-01-2006, 21:48
You need to find out your own values for the light because it is not pure green so 0,255,0 will not find or track the color. Use the GUI to find the mean of the colors where the light is when seen.

X-Istence
11-01-2006, 21:50
You need to find out your own values for the light because it is not pure green so 0,255,0 will not find or track the color. Use the GUI to find the mean of the colors where the light is when seen.


Cheers. Will play around with it then :D.

X-Istence
11-01-2006, 21:53
Replying to my own post, Kevin Watson posted this:

You should be able to use the default color values in camera.h with the green target.

in http://www.chiefdelphi.com/forums/showpost.php?p=431012&postcount=4

So i should be good to go out of the box :D.

DanDon
11-01-2006, 21:56
Replying to my own post, Kevin Watson posted this:



in http://www.chiefdelphi.com/forums/showpost.php?p=431012&postcount=4

So i should be good to go out of the box :D.

With regards to my experience with the code, the camera tracks out of the box, the only thing that you need to worry about is hooking up the servos to the correct pwms, and if you're not using pwm01 and pwm02, then remember to change the definitions in tracking.h.

Good luck,

X-Istence
11-01-2006, 21:59
With regards to my experience with the code, the camera tracks out of the box, the only thing that you need to worry about is hooking up the servos to the correct pwms, and if you're not using pwm01 and pwm02, then remember to change the definitions in tracking.h.

Good luck,


I figured that part out :D.

Thank you.