Products > Thermal Imaging

Radiometric JPG & ATS file formats

<< < (9/10) > >>

Lol. Yeah, that's about the extent of my searching talents.  I've just been looking with hex fiend for anything that looks suspicious but this model stores in 14 bit range not 16 bit range like the LWIR cams and so the cal constants would be completely different.  Need and haystack is indeed what it is like.

Regarding earlier questions on model numbers, apparently there are 4 models in the A858x series having the four combinations of two spectral ranges and two apertures. The A8581 has a spectral range of 3 to 5 μm and an aperture of f/2.5. This and other info is in the User Manual attached below.

Regarding temperature calculations and other meta data, I noticed some patterns in the files that were previously uploaded. However it would be difficult reverse Engineering the file lacking more info from Flir. In the User Manual Section 2.3 it says:

"The A6000 and A8500 are stand-alone imaging cameras that interface to a host PC, Mac or Linux system running FLIR Research Studio software using Gigabit Ethernet. An SDK is available, which makes it possible for the system designer to write their own camera controller and acquire image data with their own custom application."

Wouldn't an SDK provide info on temperature calculations, or would the SDK be at a higher level?

I haven't used their SDK, so I cannot say, but I doubt they will make the conversion process easy.

The question came up earlier about how to locate the start of the radiometric data after the FLIR APP1 segments have been pieced together in these RJPG files. I came up with an algorithm (or maybe its just a heuristic) for accomplishing this. If you look at these files with a Hex editor you will see a number of metadata blocks, or just call them blocks. For example you will see the following blocks:


There might also be other blocks, and there can even be no-name (empty) blocks.
The algorithm is simple: walk the blocks and test for the name “Pixels”.  Eventually you arrive at the Pixels block.

As gtatters noted in an earlier post, the radiometric data starts 717 bytes from the Pixels block start. This is true for files that come directly from the camera. If the file has been edited in Research Studio, the radiometric data starts 621 bytes from the Pixels block start. Actually, it looks like there is either a 128-byte header or a 32-byte header on the radiometric data, accounting for 96 byte difference. I haven’t found anything in the files that is a flag for this difference.

I modified my radiometric data extraction program to find the start of the radiometric data using the “walk the blocks” algorithm noted above. The file attached to this post is a Unix executable command-line Mac app of the radiometric data extraction program. It should run on any Mac. The easiest way to use this program is to drag the Unix executable to an open Terminal window, then drag the RJPG file to the window and hit return. A few lines are printed about the RJPG file, and a TIFF file is created with the radiometric data with a .tiff extension. The TIFF file is placed in the same directory as the RJPG file. The program is named “RJPG_tiff_camera” to reflect the fact that it works for files directly from the camera. It won’t work correctly on files after they have been edited in Research Studio.

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.


[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Go to full version