LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Imaq: Image Display with SGL Data

Hello,

I am using an Image display. To create the image I use the "imaq array to image.vi". There I use the "image pixel (float)" entry. Now I can display the image in an Image Display.
My question is now how can I change the range of values that are displayed in the image.

For example: I'm working with an array of temperature values from 250 to 350K. But the range that interests goes only from 280 to 320K (this should be decided by the user later).
So I want the palete to begin at 280K and to stop at 320K.
How can I do that??

Before that I had Integer (16bit) values. There I easily used the 16-Bit Display Mapping and it worked fine. Unfortunately with SGL data it doesn't work like that.


Thank You.
Steffen
0 Kudos
Message 1 of 2
(2,747 Views)
Hi, Steffen,

There are many ways how to do this.
Easiest way is to set all values below 280K to 280K and all values above 320K to 320K. Then all below 280K will be displayed as black, and all above 320K will be displayed as white (becase Image Display for float data adjusted automatically for full range).
Method 2 - convert SGL data to U8 data by simple equation: Display(x, y) = (Src(x, y) - min) x 255/(max - min). Then you will get 8 bit image with desired range.
Method 3 - convert float data to I16 data, and then using normal 16 bit mapping for display window (but you will need to recalculate you float min max to I 16 min max).

All three methods illustrated on the diagram below: They produced exactly the same result.

best regards,

Andrey.
Message 2 of 2
(2,734 Views)