Machine Vision

Showing results for 
Search instead for 
Did you mean: 

compact colour spectrum to RGB


I would like to convert the array of the colour spectrum I get from the colour learn VI to to an RGB colour as one or 3 values. The help says that the output of the colour learn VI is

Color Spectrum returns the color features found in the image region. These features represent the color information in the image region in a compact form.

How can I do that?



0 Kudos
Message 1 of 7

Hello  again,

Please I need help.

 To complete my request I would prefer I get a single value that represent a colour  between the red and violet and the rainbow colours in between. Something like a colour represented between 0 and 100 or 1000.

To give an example, I would like to see the difference from left to right or right to ledt (between the blue and the yellow) in a numeric scale of 100 or 1000..

0 Kudos
Message 2 of 7

I need help please.



0 Kudos
Message 3 of 7

You need to convert the RGB color to Hue, Saturation, and Intensity.  The Hue value is what you are asking for, with a range from 0 to 255.



Bruce Ammons
Ammons Engineering
Message 4 of 7

Thanks for your reply. I tried to follow your advice. I used the VI attached with the png picture and I tried to move the rectangle from the right to the left but the values I get are not increasing or decrising, they were random especially when I move from the blu to the yellow.


Download All
0 Kudos
Message 5 of 7

Hi ziedhosni,


Can you provide a little more detail on what the goal is of your application? Are you trying to determine the color of each rectange, or something else?



Rahul B.
0 Kudos
Message 6 of 7

Indeed, I want to determine the color in the rectangle. The problem is that the determination of the color between the yellow and the blue is hard as I see because I can see a difference between the neat blue and the neat yeallow but the colors in between are random according to the rgb or HSL..

Do you have any idea how to sort this problem out?


0 Kudos
Message 7 of 7