Go to Post Super Bowl, P-Diddy, Diet Pepsi. Super Bowl of Smarts, Dave Lavery, Diet Coke. - Gary Dillard [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 03-21-2016, 11:45 AM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,069
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Help with GRIP HSL values?

Your vision target is overexposed in this image. Notice how the green washes out to white on the target on the right. This happens because there are blue (and even a small amount of red) components to the light emitted by your green LED ring, and you are saturating the green subpixels on your imager.

Digital cameras work by having an array of subpixels that measure light levels for a particular frequency band of light and location on the imaging plane. Each subpixel on your camera measures red, green, or blue light separately, and then nearby subpixels are combined to give RGB values to the final image. The problem is that each subpixel can only measure so little (ex. 0) or so much (ex. 255) light in a given part of the spectrum. You can manipulate the exposure time of the camera to affect how much light hits the sensor in total. Note that brightness/gain is NOT the same thing as exposure time - exposure time affects how much light can hit the sensor, while gain/brightness effectively multiply that amount of light by a constant.

If your LED light emits 90% green light, 9% blue light, and 1% red light (totally made up numbers), imagine what happens at different exposure times. At one exposure time, you might measure R=1, G=90, B=9.

This is decisively green and easy to segment in HSL/HSV (even though it is fairly dark). At another exposure time, R=10, G=900 (but gets capped at 255 by your sensor), B=90.

This is now slightly more blue looking, but still pretty green. At another exposure time, R=100, G=9000 (capped at 255), B=900 (capped at 255).

Now this is azure. At another exposure time, R=1000 (capped at 255), G=90000 (capped at 255), B=9000 (capped at 255).

This is white, and obviously bad for segmentation.

I would try to fix this before worrying about color thresholding (most USB or Ethernet cameras allow you to fix the exposure time one way or another). Once you get a consistent, non-saturated color in your image, thresholding becomes much easier (because the range of hues that you are interested in becomes very narrow).
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:41 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi