LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Color Sensing with RGB

I am using an EV3 sensor to try and detect which type of marble is placed under the sensor. They vary in size and color but all give me different enough values that i believe i can differentiate between them with just RGB values. My question is how do i set a comparison for the output values of the RGB for a certain range. IE if red is near 40, green near 12, and blue near 5 I know it will be a big red. Thanks for the help. 

0 Kudos
Message 1 of 2
(3,550 Views)
Calculate the difference between each of the color values and known values for possible colors. The smallest overall difference is the color that you are closest to. Sort of like calculating the residuals for a curve fit.

How many colors do you have to distinguish?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 2
(3,516 Views)