Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

threshold displaying

Hi everybody,

I`m trying to display a thresholded image but it looks red and black,what have I to  change to have a thresholded image white and black??

Thank you very much!!!

Mat
0 Kudos
Message 1 of 6
(4,052 Views)
The obvious answer, if you're working with a U8 grayscale image, is to have the replacement value be 255 instead of 1. That'll display as white in either the binary or grayscale palette. If the image is I16, then you can use the 16 bit display mapping to have the value 1 mapped as 255 (using the given range option). If the image has a value of either 0 or 1, you could use the IMAQ multiply and multiply the image by 255. 
 
Beyond these, I don't know of any way to modify the binary palette so that the value of 1 is mapped to white instead of red. There is a palette option called user-defined, but I couldn't find anything in the Labview help about how to use it or set it up. 
Message 2 of 6
(4,040 Views)
Yes what music2131 says is correct.In order to reduce confusion,labVIEW displays the binary image in red and black instead of white and black.
Message 3 of 6
(4,031 Views)
Mat -

music2131's suggestion is probably the easiest to do.

For reference, you can supply a user-defined palette.  To do this, you need to create a Property Node on the Image Display Control, set the Palette Type to User Defined, and then pass the palette to use in to the User Palette property.  If you want to take an existing palette and just modify the entries, you can call IMAQ GetPalette to get the palette values, edit them as desired, and use that palette to pass in to the User Palette property.

Greg Stoll
Vision R&D
National Instruments
Greg Stoll
LabVIEW R&D
Message 4 of 6
(4,012 Views)
Hi mat,
           This is one way i use to convert it into a black and white.Check the attachment
Message 5 of 6
(4,010 Views)
thanks so much to averybody!!
0 Kudos
Message 6 of 6
(4,007 Views)