View Single Post
  #11   Spotlight this post!  
Unread 13-04-2016, 09:54
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Dealing with bright lighting at competitions and vision

Thanks for posting the images.

The images you posted have virtually no green in them because the colors are being washed out due to the bright lights. The tape is essentially the same as the tower's gray colors. Despite what CSI shows like to claim, you can't fix everything by tapping computer keys or waving your hand in front of your face. Image processing is best done on images that are in focus, have good contrast, and don't contain lots of extraneous details. For color images, contrast also means good saturation (not washed out).

If you compare to the pictures that are part of the example code, you'll see that they are darker. This is affected by the exposure and brightness settings on the camera, and as others have mentioned, you can also use a Neutral Density filter (a gray plastic sheet) to block some of the light similar to sun glasses. This will increase saturation of color and allow the HSV filter to mask properly and not include bricks and mortar of the tower to be considered part of the target.

Also, the retroreflective material returns light emitted near the camera lens to the camera lens. So if you have mounted something else like a flashlight near the camera, you are diluting the green and washing it out.

Once you have a high contrast, saturated image, the task is far easier, and the rest of your code should work much better. If you need more help setting up your camera, post the camera setup code or a description of it.

Greg McKaskle
Reply With Quote