From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ colour image scale

Solved!
Go to solution

Hi,

 

I'm trying to plot an image using a 2D array of data points using IMAQ.

Creating a greyscale image is quite simple, but is it possible to display the image as a spectral colour image? i.e. red corresponds to higher values, blue to lower values, and green in between, with a colour scale visible.

 

All the colour functions for IMAQ seem to want an RGB input or some other encoding, but all I have is raw numerical data. Maybe I need to convert it somehow....

 

Thanks,

Steve

0 Kudos
Message 1 of 4
(3,511 Views)

Hello Steve, 

 

Thank you for posting on our forums. I believe this example may prove to be of some use for your application. If I am understanding you correctly, currently you raw numerical data in the form of a 2D array, and would like to convert this data into an image. The linked example demonstrates how to convert an array of pixel values to either a grayscale or color image. 

 

Is this what you are looking for? 

Huntington W
National Instruments
Applications Engineer

***Don't forget to give Kudos and Accepted as Solution where it is deserved***
0 Kudos
Message 2 of 4
(3,488 Views)
Solution
Accepted by topic author MOI_maker

Right-click your image display indicator and select "Palette >> Rainbow".  This does exactly what you are looking for.

If the result is not satistying, you can create a custom palette and tell the image display to use it by wiring your palette to the property node "User Palette".  Further details can be taken from the Vision Concepts Manual. Details covering palettes (also the rainbow palette) are here.

0 Kudos
Message 3 of 4
(3,487 Views)

This is exactly what I needed, thanks.

 

I knew there would be a simpleoption, but I was just missing it... Smiley Happy

0 Kudos
Message 4 of 4
(3,477 Views)