We would like to be able to calculate temperatures from the radiometric data for these Flir MWIR RJPEG files.
To this end, note that the RJPEG camera files have two data points for Counts, Radiance and Temperature in the Workspace xml data:
<segmentationValue unit="Counts" min="4107.3955078125" max="6884.330078125" />
<segmentationValue unit="Radiance" min="0.00013401229807641" max="0.00024988286895677" />
<segmentationValue unit="TemperatureC" min="18.424726486206" max="36.694522857666" />
<segmentationValue unit="TemperatureK" min="291.57473754883" max="309.84451293945" />
These values are the same in all the files, so they are apparently calibration related, rather than scene related.
To calculate temperatures, assume the equation is like the LWIR formulation:
tempK = B/ln((R1/R2)/(S-O) + F)
where: B, R1, R2, O, and F were parameters from the Flir LWIR metadata, ln is natural log, and S = signal level (or A/D level).
Not surprisingly, the form of this equation is the same as the Inverse Planck function. See the link below to NOAA calculator reference for the Inverse Planck function (wavelength version).
The equation above can be simplified by replacing R1/R2 with R. Also F was between 0.5 and 2.0 with the usual value being 1.0 (like in the Inverse Planck function). Note, F is added to numbers that are in a range of 20,000 to 40,000, so F doesn’t materially change the result and F = 1 may as well be used. Also, for the InSb detectors used in this MWIR camera, the A/D levels are called “Counts”. So we have:
tempK = B/ln(R/(Counts-O) + 1)
First, B can be solved for by comparing to the terms in the Inverse Planck function in the NOAA reference:
That is, B = c2/λ where c2 = 1.4387752e4
First, determine λ from radiance and temperature. Note that the radiance in the NOAA reference is in units of W/m^2 - sr μm, whereas the Flir values seem to be W/cm^2 sr μm. So the Flir values need to be multiplied by 10,000 (or just move the decimal point four places to the right). Plug the Flir min radiance (1.340122…) into the NOAA Inverse Planck calculator and tweak λ to get temperature = 291.5747… .
λ = 4.642 μm is pretty close and B = 1.4387752e4/4.642 or, B = 3099.4726 K
Now we need to determine R and O. From the xml data in the RJPEG files, we have two temperatures for two counts.
So to solve for R and O, basically we have two equations with two unknowns.
Solving these equations (not particularly interesting) we get:
R = 1.31769e8
O = 921.5458
Finally, converting to deg C temp we have:
tempC = 3099.4726 / ln(1.31769e8 / (Counts - 921.5458) + 1) -273.15
For the Snap-0012.jpg file, min counts = 4781 and max counts = 12386, so min temp = 23.78 C and max temp = 58.36 C.
This is for emissivity = 1.0.
For emissivity = 0.92 and reflected temperature = 293.15 K (values in the object parameters part of the Workspace block),
min temp = 24.09 C and max temp = 60.48 C.
These temperature values need to be compared with the values from Research Studio software to determine if this is an accurate method for determining temperatures.
https://ncc.nesdis.noaa.gov/data/planck.html