Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

False Color Images using IMAQ Vision Tools

Hi,
I'm using IMAQ Vision Tools to display images. I have a 2D-Array (data type DBL) with positive and negative values. I want to display this array as a color image where negative values are blue and positive values are red, values around zero should appear as black. I want to specify the range, too (like range from -10 to +10, -10 should be blue, +10 red, 0 black).
I did it by using two for loops to calculate a 32bit unsigned integer value for each value in my array, creating a 32bit unsigned integer array and display it with IMAQ ArraytoColorImage. But this would take too long, my application is time critical, especially when I have large arrays. Is there a more convenient and faster way to solve my problem?


Thanks in advance,

Gernot
0 Kudos
Message 1 of 3
(3,730 Views)
Gernot,

The easiest way to do what you want is to use a intensity graph instead of the Vision tools. You can define your color scale just the way you described. The downside is that the update rate may be too slow for your application.

I know for greyscale images you can define a custom palette, which matches up a specific color for each intensity. You may be able to do this with double precision images as well. If not, you could quickly map your values to a greyscale using a multiplier and offset, then use your own custom palette.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 3
(3,730 Views)
Bruce,

thanks for your answer. I have to do all the imaging stuff in Vision, so there's no possibility for me to use an intensity graph. Anyway, even though I learned a lot in the past few months in LabVIEW and Vision I'm still not that good in color imaging. Could you please explain this palette thing a little bit more?
And I have another question as well, maybe you know something about that ... I have to copy an image into another image (like an overlay). Therefor the black color in my colored image should be the transparent color. Is transparency possible using Vision?

Thanks in advance for your help ...

Gernot
0 Kudos
Message 3 of 3
(3,730 Views)