Leton 3.5 Compressed Image

Hi

Quick question, is it possible to send the thermal image back to a device without compressing it? My understanding is that if I want to gather temperature values from the image in a post processing stage then I can’t compress the image?

Thanks,
Gar

You can compress the image. However, you need to know what scale the temperature values are between. Since values are 14-bits but we only have 8-bit pixels we scale values to fit 8 bits. This temperature information is lost unless you capture that scale.

So in my case I set the min temperature to -10 and the maximum temperature to 140. I then set the minimum greyscale value to 0 and the maximum value to 255. If I compress an image that has been taken using these settings can I interpret a pixel as temperature value using your function in a post processing stage?

def map_g_to_temp(g):
    return ((g * (max_temp_in_celsius - min_temp_in_celsius)) / 255.0) + min_temp_in_celsius

So if I send a compressed image to another device but I know the temperature scales and the greyscales, can I extract a temperature value for a pixel without the compression having lost data?

Yes. Jpeg will add a little bit of noise but otherwise you are correct.

Thats great, thank you.

Apologies for coming back to this question so soon but I was reading an article on compression of thermal images Understanding Proprietary Infrared Image Files that says

The JPEG image file, commonly used for photographs and other complex still-images on the Web, is an image that has lossy compression…Note: It should be noted that “lossy” file compression is NOT acceptable for thermographic images since there is no acceptable level of loss of image data because the image is the data.

.

Is knowing the temperature scales and greyscales enough to navigate this issue?

Also it mentions that Flirs .jpg extension is different to the traditional .jpg extension which would not be capable of storing radiometric data as well as explicitly needing to use Flirs software to extract this information:

The standard image file formats (.BMP, .TIF, .JPG, or .GIF) were designed for use within popular image viewing software such as Microsoft Paint, Adobe Photoshop, or Jasc Paint Shop Pro; these formats were not designed to facilitate sophisticated analysis of the radiometric data stored within IR image files.

(Note: Do not be confused. FLIR uses file extensions of .JPG, and .TIF which are also used as extensions for digital photo files; however, the FLIR file structure for the radiometric image is completely different. You cannot get radiometric data out of FLIR .JPG or .TIF files without using FLIR’s Proprietary software).

Any thoughts on this?

Jpeg will cause the temperature readings to be slightly off. If you don’t want this don’t jpeg compress the image. Use the BMP file format instead.