Polarity of the "PlanckO" parameter in FLIR thermal pictures

Started by hcoj, October 15, 2019, 03:05:05 PM

Previous topic - Next topic

hcoj

Hello,

I have some doubts about the polarity of the parameter "PlanckO" when reading metadata from FLIR .seq/.fff files.

I got some documents from FLIR how to convert the raw counts into temperatures.
In the end there are three formulas which implicate the parameter PlanckO.
(1) T = B / ln(R1 / (S-O) + F);
(2) W_atm = R / (e^(B / temperature_atm) - F ) + O;
(3) W_back = R / (e^(B / temperature_back) - F ) + O;

Calling exiftools with one of the .seq or the .fff file gives in my case PlanckO = -479.
Using this parameter to convert the data gives completely wrong temperature values.
Changing the polarity of the parameter to PlanckO = 479 gives exactly the same values like tools made by FLIR. So there might be some problem with the polarity.

I searched a little bit through internet and found this thread from the year 2013:
"enhancement: extract binary data from FLIR radiometric jpg"
https://exiftool.org/forum/index.php?topic=4898.60
In this thread there are basically the same formulas given (assumed R2 = 1)
(1) T_obj= B / ln(R1/(R2*(RAW_obj+O))+F)
(2) RAW_refl=R1/(R2*(e^(B/T_refl)-F))-O
(3) RAW_obj=(S-(1-Emissivity)*RAW_refl)/Emissivity
The main difference I can see is, that in formulas 1 and 2 the parameter O is of opposite polarity.

Having a look into the acient history of ExifTool from "Feb. 14, 2015 - Version 9.85"
there is an entry "Fixed decoding of FLIR:PlanckO (thanks Tomas)"

This might be coincidence, but I was wondering if there is any postprocessing of this PlanckO parameter.
Is this the raw value coming from the metadata or is "Fixed decoding of FLIR:PlanckO" an adaption
to the formula given in the thread, so values are always negative?
This would coincide with the phrase given in the thread above
"O    Planck O (offset) constant. Its a negative value."
PlanckO is given as "signed int" following the formula of FLIR, I can't tell if it can be positive as well.

To locate the error in one of the equations - my questions:
* Is the PlanckO the raw value coming from the .seq/.fff file ?
* Can I check with a hex-editor or some other tool this value at a certain position in the file?

Thank you and best regards.

Phil Harvey

There is no post-processing of PlanckO.  It is a signed 32-bit integer.  I didn't check what is was before, but likely either it was being decoded from the wrong offset or it was the wrong type (unsigned for example).

You can use the ExifTool -v3 option to see the file offset and the hex data stored in the file.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).