05-13-2018 09:03 PM
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
05-13-2018 09:48 PM
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?
05-14-2018 12:56 AM
Hi RavensFan ,
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
05-14-2018 01:19 AM - edited 05-14-2018 01:22 AM
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…
05-14-2018 02:35 AM
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.
05-14-2018 03:00 AM
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…
05-14-2018 08:18 PM
Thanks GerdW for the hint and info. I already did it, but my problem now is, how to highlight/select only some area of the image, how to do it? thanks very much.
05-15-2018 01:21 AM