Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

False Color Map using palette option

Hi all,

 

There's a palette option where you can create an 8-bit greyscale image into different "color maps". The same can be done prgramatically using property node. 
Now, I need either a "gradient" or "rainbow" type palette where I can set a range of colors to be mapped. 
For example I want the image below

ndvi3.png

to look something like this,

ndvi_3.jpg 
the above image takes shades from red to green. Any help is appreciated. 


0 Kudos
Message 1 of 8
(4,004 Views)
To create a User Palette, you need to create an array that will map each pixel in your image to a new color value of your choice.

The User Palette is an array of clusters with three integer elements in each cluster representing the red, blue, and green components of a color. Each cluster represents a mapping for one pixel intensity value in the image. For example, for an 8-bit image capable of 256 different intensity levels, you can have up to 256 color values in your palette, one color for each intensity value.
Ref:http://digital.ni.com/public.nsf/allkb/93C942F30387957D86257BBA0080DEF1
Thanks
uday
Message 2 of 8
(3,985 Views)

Can you fix broken link?

0 Kudos
Message 3 of 8
(3,105 Views)

Attached is a LabVIEW library where I mapped all of the MATLAB options for color palettes.  See if one of these works.  I don't remember what all of them look like.  I believe this copy is from LV 2011.

 

 

Randall Pursley
Message 4 of 8
(3,098 Views)

@rpursley8  a écrit :

Attached is a LabVIEW library where I mapped all of the MATLAB options for color palettes.  See if one of these works.  I don't remember what all of them look like.  I believe this copy is from LV 2011.


Thanks a lot for the sharing of these color palettes and the tester VI with an Intensity Graph and an Image Control, rpursley8

It's helpfull !

I am curious to know where do you find or how do you calculate the 256 values of RGB U32 for each palette.

I am searching the color table of 256 values corresponding to the Red (Positive) Blue (Negative) colormap (like the sreenshot)

Could you help me to build the colors table please ?

 

0 Kudos
Message 5 of 8
(2,398 Views)

I have found.

It's easy to add new color map to the .lvlib shared by Randall by downloading the color tables on a website like this : Color table gallery 

 

For instance, the files with the extension .rgb contains the 256 values of the colormap that I searched : RGB table of "CoolWarm" table 

0 Kudos
Message 6 of 8
(2,381 Views)

This will generate the color map you want

 

rpursley8_0-1617991788665.png

 

Randall Pursley
0 Kudos
Message 7 of 8
(2,340 Views)

Make sure when you add that new class for this color map that you do 'Make Current Value Default' once you put the values in the class control.

Randall Pursley
0 Kudos
Message 8 of 8
(2,306 Views)