09-27-2013 06:42 PM
Hi all,
I am using a FLIR SC305 IR camera and would like to apply a custom pseudo color palette to images I save to disk.
1) The camera is 14bit and the images are cast as I16 type.
2) I would like to save images in *.png format and maintain 14bit quantization.
3) I am using the vision development toolkit.
Thanx in advance,
Karl
09-28-2013 12:11 PM
The two things you are wanting to do are mutually exclusive in a single image. Let me explain, and then I will give you a possible work around(s).
Color images on a PC are represented as 24-Bit RGB, where each pixel is asinged three 8-Bit values representing the intensity of each of the three primary colors (red, green, blue).
A FLIR camera outputs 14-Bit data as an i16-Bit grey gcale image, where 0 is equal to the lowest temperature in the current CASE (Temperature Range), 32767 is in the middle of that CASE. The next value up from there is -32768, and the temperature continues up to -1, the hotest temperature in the CASE. 0 ... 32767,-32768 ... -1
Even when you are looking at this 14-Bit data on a PC monitor, you are looking at an 8-Bit image, because the monitor cannot display anything other than 8-Bit values for each channel of the RGB pixel (0-255,0-255,0-255).
If you want to have a color image for use in presentations and reports, but need to retain the 14-bit daqta of the original measurement, you need to do all of the following:
Copy the image to an i16 array
Cast the original image to a new RGB copy
Copy the array as custom data, into the RGB image with a key like "i16Array"
Write the image as PNG With Vision Info, making sure to wire in the color palette look up table.
When loaded into any application, the image will appear as an ordinary color iamge, but when loaded into a program written in LabVIEW, the i16-bit data can be extracted using the i16Array key, and copied back into an IMAQ image reference of type i16, for analysis or viewing.
09-30-2013 02:16 PM
Hello MoviJOHN,
Thank you for the reply. Perhaps I need to provide more detail. One thing I would like to do is apply the palette the user selects in the image display provided by the vision tools.
I guess I am not sure what it means to "Copy the array as custom data, into the RGB image" or what "key like "i16Array"" is.
I am wondering if I need to use a lookup table to remap 14bit values into I16 space. It seems like I would also need the palette information used in the vision tools image display front panel indicator. I am curently using the standard palettes provided with the tool as well as the FLIR palette I found somewhere on Nationals site.
Perhaps the keylike file is a lookup table?
Thanx,
Karl