LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LOAD IMAGE and IDENTIFY its Color

Hello everyone,

 

i have some trouble on how to load image file, then identify he color. using only standard tool in LabVIEW, can somebody please help me on how to do it. Thanks in Advance



Thank you & Best regards
syrpimp

=======================================================
“You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley
0 Kudos
Message 1 of 8
(3,676 Views)

Attach your VI showing how you are trying to do it now.

 

There are functions in the Graphics and Sound palette for loading different image files.  What type of file are you trying to read?

 

What color are you trying to identify?  Is the whole image file a single color, or are you trying to pick out a particular pixel from that file?

0 Kudos
Message 2 of 8
(3,659 Views)

Hi 

 

it was multiple color in one image, i want to show the "string" color message(e.g. if it was pointed in red color of image, there is an text box to show the text in "red", "yellow", etc. ) if the mouse pointer is place on the color of the image, and yes I was trying to pick out a particular pixel from that file?

 

 

I used the attached file that is from ni Site:example by  Example_Scrubber_Stephan



Thank you & Best regards
syrpimp

=======================================================
“You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley
0 Kudos
Message 3 of 8
(3,643 Views)

Hi syrpimp,

 

the VI already does the image loading, displaying and colorpicking for you. Most of your work is already done!

 

i want to show the "string" color message(e.g. if it was pointed in red color of image, there is an text box to show the text in "red", "yellow", etc.)

All you need is develop an algorithm to "translate" the color value (given as U32, containing RGB values) into a text saying something like "mostly green" or "seems to be yellow"!

Can you provide such an algorithm? What have you tried so far?

 

Hint: Read wikipedia!

Hint: In your VI you already get the R, G, and B value!

Hint: convert RGB to HSV values!

Last hint: use the H value to determine the color "position"…

 

Btw. when doenloading a VI named "LV2009" I don't expect it to be saved using LV2015…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(3,637 Views)

Hello 

 

 i did typcast, but i dont know how to do it, u32 converted to character. but can you help me, how to do next. im sorry. 

 

typecast.JPG



Thank you & Best regards
syrpimp

=======================================================
“You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley
0 Kudos
Message 5 of 8
(3,626 Views)

Hi syrpimp,

 

don't use typecast! Which kind of result do you expect when you typecast an U32 value into string???

 

I repeat my hints:

Hint: Read wikipedia!

Hint: In your VI you already get the R, G, and B value!

Hint: convert RGB to HSV values!

Last hint: use the H value to determine the color "position"…

Do those hints in the very same order and your task is solved…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 8
(3,618 Views)

Thanks 



Thank you & Best regards
syrpimp

=======================================================
“You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley
0 Kudos
Message 7 of 8
(3,591 Views)

Hi syrpimp,

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 8
(3,584 Views)