LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to change colour of image mask?

Hi,
I have a vi that thresholds an image.  I want the saturated areas to show up as red.  I have the mask showing up as black right now.  What can I do?  
 
I'm using Labview 7.1.  Attached is the vi and a pict of the front panel. 
 
Thanks!
S

Message Edited by sau on 03-23-2006 10:55 AM

Download All
0 Kudos
Message 1 of 8
(6,109 Views)

Just customize the palette used to display your image : the color used to display the saturated region (white = RVB 255,255,255) should be replaced by red (RVB 255,0,0).
That's what the attached vi is doing.

Chilly Charly    (aka CC)
0 Kudos
Message 2 of 8
(6,094 Views)

Hi CC,

Thanks.  I'm looking into the display properties now.  I can change the colour of the transparent area in the mask but I can't change the opaque part to red.  I tried applying red to the ROI Colour in the properties menu but that did nothing.

Any ideas?

Thanks,

sau

0 Kudos
Message 3 of 8
(6,085 Views)
Hi sau -

You can create a custom palette for any Image Display indicator by creating a property node for that indicator:
  1. From the block diagram, right-click the indicator and select Create » Property Node » Palette » User Palette.
  2. Place the property node and change its property to Write.
  3. Create a control (or constant) from the input and set your custom RGB values.
David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 4 of 8
(6,067 Views)
Thanks David,
I've tried that already according to CC's instructions.  I can get the mask to display red but when it's mask + image, no red shows up. 

I'm starting from the Mask Example vi at   \National Instruments\LabVIEW 7.1\examples\Vision\2. Functions\Image Management.  I'd like something to be red in the Masked Image display. 

Maybe I'm missing something simple??

sau

0 Kudos
Message 5 of 8
(6,052 Views)
Hi sau -

All three of your image buffers in the program are grayscale.  You cannot mask a color value onto a grayscale image.  Try casting the images as RGB before applying the mask.  (You may have to mask each plane separately and recombine the image afterward.)
David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 6 of 8
(6,038 Views)

Hi David,

Thanks for the info.  With that and some more thinking, I figure out my problem!  I needed the mask but I didn't want the opaque part to be opaque so I ended up adding 1 to the mask to make it transparent.  I'm attaching picts of my results and the code here incase anyone sees any glaring mistakes.

Thanks for al the help!

Message Edited by sau on 04-07-2006 01:01 PM

Download All
0 Kudos
Message 7 of 8
(6,025 Views)

Hello,

I have been looking for help about mask, and I have found your message, and I have the same problem as you had. If you can show me how did you solve it I would be great...I now thet your message is long time ago, but maybe you can help me...I have a mask with the values I want to colour with valuue of 255, when I mask my original image and my mask, it doesn´t work, and I do not know why...

thank you very much

0 Kudos
Message 8 of 8
(5,677 Views)