Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

After get RGB values from a pixel, hoe could I write its color name?

Solved!
Go to solution

Team,

I'm quite new to LabVIEW and I`m working on a application using USB webcam to capture the color of object.

So far it is completed but now I need to write the name of the color on the screen.

Please, somebody could help to identify if IMAQ or Labview have that feature?

To help with undestanding:

Below you can see the example.

R = 236

G = 0

B = 116

And the color name is pink.

But the problem is how to get the name using some feature available. 

 

 

 Nova Imagem.jpg

 

Thank you.

Regards,

JCG 

0 Kudos
Message 1 of 5
(4,743 Views)
Solution
Accepted by topic author caplled

There is no such function, but you could create one fairly easily.

 

I would divide each color component by 64 and round to get a 2 bit value for each color.  Combining these (multiply/shift and add) would give you a 6 bit integer, which would give you 64 color combinations.  Create an array of 64 strings with the names of the colors and index out the correct name.  You would have to go through manually the first time and assign a name to each color, but that wouldn't be too bad.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 2 of 5
(4,726 Views)

Hi Bruce,

Good idea.

Thanks a lot.

JCG

0 Kudos
Message 3 of 5
(4,689 Views)

Hello Bruce,

 

Can u share that VI.

 

Regards,

Vivek G.

0 Kudos
Message 4 of 5
(3,095 Views)

I never created the VI, but you should be able to quite easily.  Just follow the directions in my earlier post.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 5 of 5
(3,090 Views)