11-25-2013 06:11 AM
Hello,
I am using Vision Builder 2012 for identifying colours of LEDs. I have created .vbai which first acquires an image. Then there are few LEDs which colours are green, red and yellow. I have added measure colours step for each LED. What could be the best way to test that a LED has correct colour? Should I use RGB as the color space? I am passing numeric results to LabVIEW which performs the test itself. In Labview I parse Numeric Measurement out from the Step Results VBAI Interface - Get Inspection result.vi. Is there colour spesific values of each colour?
Is there any other way to do this?
BR,
Jick
11-25-2013 08:08 AM
Instead of using RGB color space, I would use HSL. Then you can just look at the Hue value to determine the color. The HSL color space is more resistant to lighting changes and you can get the color in a single value instead of having to take into account all three color plane values like you do with RGB. Once you haver the Hue value, you can check if it's in range for the various colors. It's important to note that red wraps around so it might cover ranges from 240-255 and from 0- 20 or so.
Hope this helps,
Brad
11-27-2013 02:36 AM
This might be a good idea. Thanks.
Additionally I need to analyze a LED which is switched off (black/dark ROI). I am wondering if it can also be analyzed using hue avg value or should I measure for example intensity instead of it? Using hue avg gives something aroung 200 but is it reliable measurement?
BR,
Jick
11-27-2013 08:06 AM
Hue is good for measuring color. If you want to measure how might/dim something is, use Intensity, it will give you a better differentiation between on/off.
11-27-2013 01:59 PM
Hi Jick.
Brad is right. If your LED is dark, you will typically measure noise on the hue channel. Avoid this by first checking the intensity. If intensity is low, do not expect the hue value to be that precise.