LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Replace One Color With Another in Color Table

Solved!
Go to solution

Hello - I've written a simple VI that when one moves the cursor, it grabs the 'color' value at that location and allows one to replace it and all locations of similar color value with a replacement color.  I first normalize the image to between 0 and 255 to correspond with 256 values in an 8-bit image.   For a simple image, I have just a 2-color (binary) image composed of 0 and 255.

 

I move the cursor, which indexes the image and grabs the value corresponding to a gray value between 0 and 255.  I then use this as the index to the new color, and replace the color at that index with the replacement color.

 

When I move the cursor, it indicates to me whether I am on a '0' or '255' but the color replacement is not made properly (although the color ramp does seem to indicate it should be).

 

This would seem to be a simple task.  What am I doing improperly?

 

Thanks,

 

Don

0 Kudos
Message 1 of 16
(3,702 Views)

Your example is missing subVIs and won't open.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 16
(3,690 Views)

Hi Mark

 

 

I used LabVIEW 2009 64-bit to create the LLB which appears to have caused the problem with missing subVIs.  I redid the save with LabVIEW 2010 32-bit.   See if this works.

 

Don

0 Kudos
Message 3 of 16
(3,685 Views)

I don't have LV 2010 insatlled yet. We generally don't make the transition right away.

 

These are realtively small VIs so just attach them individually saved for 2009.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 16
(3,677 Views)

Here are the 3 subVIs (I guess the forum only allows 3 attachments).  Next message contains the top level VI to run....Don

0 Kudos
Message 5 of 16
(3,664 Views)