Temperture range in Thermal images in jpg comment

Hello ,

We are using a thermal camera with automatic adjustment and without any corrections applied.
I realize that in every jpg image an extended comment section is availlable (try e.g. image magick idenify to see them). In the comments you can also find variables TRM and TPM. According to the Software manual these variables give the range of the thermal image or the color palette. The manual gives only a range (0..1024 (=10bits)) for this variables but no a unit. If Iinterpret these numbers as Kelvin or tenth of degCelsius temperatures they are by far to high.

So my questions are:
What represent these numbers ?
Can I use them to calculate brightness temperartures in the image?
Is this anywhere documented ?

best regards,

Hello jhs,

I received some feedback from our development team regarding your question. I hope the following explanation helps clarify the meaning of the TRM and TRP values.

Developer Feedback

  • TRM represents the measured thermal signal range within the image.
  • TRP represents the thermal signal range currently mapped to the color palette.

It is important to note that neither value represents a temperature in °C or Kelvin.

Instead, both are 10-bit display-oriented representations of the camera’s internal 14-bit thermal raw data:

Raw value ≈ Comment value × 16

When automatic contrast adjustment is enabled, the TRP values change continuously according to the thermal scene. As a result, the same color in the palette does not correspond to a fixed temperature from one image to the next.

Therefore, it is not possible to calculate per-pixel temperatures from the TRM/TRP values together with the rendered JPEG image. TRM only provides the two global endpoints of the thermal signal range, while the displayed image has already undergone:

  • Color palette mapping
  • Possible non-linear image processing
  • JPEG compression

How to obtain accurate temperature values

If you require actual radiometric temperature measurements, you should use:

  • a radiometric (-TR) camera operating in Linear Mode, and
  • store the thermal raw-data JPEG comment, or alternatively
  • use the camera’s radiometry or spot-temperature output.

Conclusion

The TRM and TRP values are useful for understanding how the camera automatically adjusts the thermal image and color palette. However, they are not temperature values and should not be used for radiometric measurements.

I hope this helps. If you have any further questions, please let us know.

Maybe I should first clarify what our intention is:

The goal is to use these thermal images for scientific research. We have some 10tsnd images from a Mobotix thermal camera looking into the sky. In parallel we have narrow band IR thermometer spot measurements in the sky, scans of microwave brightness temperatures from which we can derive temperature and water vapor profiles in the atmosphere. As we dont have the raw output (radiances) from the thermal camera we have to start from the colour images. I have an education in physics, especially physics of the atmoshpere and mathematics. I know about the principles of radiative transfer in the atmosphere and the measurement of radiances and irrandiances donwto the electrical and physical principles. I believe it is worth to think about whether it is possible to use this device as a scientific instrument. And to term it correctly I am not interested in ‘temperatures’ but instead in brightness temperatures or if you want: i am interested in radiances.

I understand that TRM and TRP give the ranges of raw values coming out of a 14bit AD-converter, reduced by dividing by 16.

I would like to understand what physical property these raw value stands for:
Is it the temperature difference in e.g. a Bolometer or is it a direct measure for a radiance ?
Are there exact or only roughly known calibration curves?
Do I need reference measurements ?

Or maybe you can just explain how you get from the raw values to the temperature readings you present for example here:

And you dont need to explain what role emissivity and transmission plays.
I am interested in the way from the raw values to the radiances.

And as an example:

Hello,

I have a preliminray raw solution:

The colorbar at the bottom of the images is running from blue (=cold) via cyan, green, yellow, red to magenta (lets say ‘warm’) and continous via pink to white (=‘hot’). The part unitl ‘warm’ is a spectrum. I guessed that in the HSV (Hue,saturation,value) color system the parameter hue (given as angle in 0..360°) would change monotnonously. This appeared to be correct: Hue decreases in the pallete from left to right except that somewhere at - I think red - it jumped from 0° back to 360°. But that is the common definition of hue: red=0°. For the colors to the right of magenta the hue value remains more or less constant, but I ignore this for the moment. I get rid of the jump by calculating hx = (hue+80) mod 360 i.e. shifitng the hue value by 80° and remapping it to 0…360° with the modulo function. To make it an incresing function I calculate hxx = 360-hx. The whole image can now be transformed to HSV and with
hxx = 360 - (hue+80) mod 360.
I get for every pixel a single value which describes its position in the color bar: the higher the value the more to the right. From parameter TRP I take for every image the current raw values for the cold (TRP.min) and hot end (TRP.max) of the pallette. Allthough hxx does not increase linear with the x-coordinate in the pallette I assume as a first approach that it is linear. So we could caluclate the relative position in the palette as
x = (hxx-hxx_min)/(hxx_max-hxx_min)
where hxx_min and hxx_max are the min and max values of hxx in the palette. From x we can calculate the position of the raw value in the current TRP.min, TRP.max interval, again by assumming that this is given by a linear relation:
pxl_raw = TRP.min + (TRP.max-TRP.min) * x
I apply these calculation to every image in the animation linked above and pick the pxl_raw value in the center of every image. All these center pixel values are then plotted versus TSL i.e. the temperature value in the center of the sensor which is also provided in the image comment section:

That means that pxl_raw and Brightness temperature in TSL are closely related. The set of images used here is not optimal to derive a relation for pxl_raw to TS but it already gives an idea.
The larger scatter at the hot end is due to the +/- constant hue values at the hot end of the palette, which I ignored for the moment. It should be possible to get rid of that by including the V-Value from the HSV color system at higher Hue values when calculating hxx. The slight S-form in the middle Temperature range is due to the non-linearity of the hue curve in the palette. The scatter in the middle of the curve is probably pixel missmatching as we observe here clouds with sharp edges resulting in strong temperature gradients in the image.

So I have another question:
How many pxels are used to determine TSL ?
The camera software is currently set to produce images of size 2048x1536.
But this is for sure a blown up size.
I dont know what the acutal size of the thermal image sensor is.

I can give some info about the camera:
NAM=mobs16-2b
SNO=10.28.60.218
SWV=MX-V5.4.8.4-r2

Hello jhs,

thank you for sharing your analysis. It’s an interesting approach and I appreciate the effort you have put into investigating the thermal palette.

As mentioned previously, our development team recommends using the Thermal Raw Mode for applications where accurate temperature values are required. The TRM and TRP values are intended for display purposes and are therefore not suitable for deriving temperatures.

For convenience, I’ve attached the PDF again describing how to enable Thermal Raw Data, extract the raw values from the JPEG comment and convert them into temperature values.
ThermalRawData 1.pdf (93.1 KB)

To enable Thermal Raw Data, activate the following option in the camera:

Regarding your question about the thermal sensor resolution:

Based on the information you provided, I can only identify the camera as a MOBOTIX S16. Since the S16 is a modular platform, different sensor modules can be connected, so I cannot determine the exact thermal sensor type from the information available.

If a TR thermal sensor is installed, its native resolution is either:

  • 336 × 252 pixels (CIF), or
  • 640 × 512 pixels (VGA).

The configured image size of 2048 × 1536 is therefore only the output resolution of the generated JPEG and not the native thermal sensor resolution.

You can identify the installed thermal sensor in the Camera Status page (yellow “i” icon in the upper-right corner of the browser interface).

Regarding your question about TSL (how many detector pixels are used to calculate it), I don’t have a confirmed answer at the moment and would rather not speculate. I’ll check this with our development team and get back to you.

lg Jörg

Hello Mx-JoergS,

Thanky for your clear answer.
Her comes the camera info:

Image Sensor L: Thermal TR, L43,F1.4, SN 9021290
R: color 6MP, L43/B079,F1.8, SN 6364454

The images come with names starting with S16-2_R079SkyThermal_...jpg
I guess R079 is then the model name.

As a humble recommendation from my side
Camera model and properties could also be put into the jpeg comment. I searched them there but found only what i posted yesterday. And for all who are wondering how to access the jpeg comment: It is a block of plain text between the short jpeg header and the binary image data. A simple text editor allows you to read it. And your python or whatever code can read it also easily as text file.

Of course I could change the camera settings. But the camera has run for some time producing the thermal colour images only. As I wrote: We have some thousands of them.

You wrote that you would attach a pdf document but I cannot find it.
Did you forgot that, or am I missing to find it ?

best regards.

My fault now it is added in the original post

thanks a lot!

I read in the footer of the document “Vertraulich / Confidential” …