LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I get a different color than black in Threshold?

I am using IMAQ threshold functions in my application. The user, however wants to be able to select between two different colors instead of one color and black. How can I do this?
PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 1 of 3
(2,990 Views)
Hello.

Sounds like you are essentially dealing with the display of binary images. What you see when you display a binary image is simply what is defined in the Color Palette for your image display. There are many different environments/displays (CWIMAQViewers in VB, LabVIEW Image Displays, etc), but the concepts remain consistent. Basically, when you map an image to binary, you change the pixel values to 0 and 1 (typically). The way the image displays work is that they map an 8 bit integer value to a specific RGB color. What you see in the LabVIEW image display when you select 'Binary' as the palette type is black for a pixel value of 0 (0R, 0G, 0B), and red for a pixel value of 1 (255R, 0G, 0B). This behavior can be changed, however,
by adjusting the color palette.

I have attached an example VI that demonstrates this concept (LabVIEW 7.0 format). You can map any color you wish to pixel values 0 and 1, and therefore should be able to get what you are looking for.

Regards,
Colin C.
Applications Engineering
Colin Christofferson
Community Web Marketing
Blog
0 Kudos
Message 2 of 3
(2,990 Views)
It worked! Thanks!
PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 3 of 3
(2,990 Views)