View Single Post
  #11   Spotlight this post!  
Unread 11-03-2013, 18:38
tp2357 tp2357 is offline
Registered User
AKA: Tyler Pawlaczyk
FRC #0340 (Greater Rochester Robotics)
Team Role: Programmer
 
Join Date: Mar 2012
Rookie Year: 2011
Location: North Chili, NY
Posts: 5
tp2357 is an unknown quantity at this point
Re: My auto aim system depends on specific lighting, how to fix?

Something else that might help is changing the color representation from Red-Green-Blue (or Blue-Green-Red, if you're an OpenCV user) to Hue-Saturation-Value.

Thinking about it geometrically, RGB (or BGR) maps colors as a cube, with the corner on the origin being black, and the corner opposite diagonal from it being white. HSV, on the other hand, plots colors as a Cylinder. With Hue (the type of color, i.e. red, green, blue) being a value rotated around the centre of the cylinder, and saturation ranges, on has a color as it appears in all lights. If you set a wide range for the value (how light or dark the color is i.e. how close the image is to being black) you have a more light-difference representations of the colors that you're looking for. Just be sure that you convert back to your original color representation notation, or you'll run into problems there.

I hope this helps, i'd be more than willing to answer any questions you may have on top of this.
__________________
Java, Embedded C and LISP.