DJI H20T thermal radiometric jpeg file

Started by Jonathan McGillivray, July 09, 2020, 06:56:25 AM

Previous topic - Next topic

jdavis

Looks like I can not change those settings in the M3T. So they are basically just defaults, which are useless really.

https://dl.djicdn.com/downloads/DJI_Mavic_3_Enterprise/20230303/DJI_Mavic_3E_3T_User_Manual_EN.pdf

Phil Harvey

OK, thanks for checking.

I tried modifying the file by hand and downloaded the DJI thermal analysis tool to see what changed in the display.  The second 25 is the reflected temperature, and I'm going to assume the first 25 is the ambient temperature (though not displayed by the DJI software).  I've added the code to extract these and the other parameters.  I figure they may be useful at some point since the DJI software goes to the effort to display them.

- 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 ($).

knussear

#47

Quote from: remi_beauvais on October 13, 2020, 04:40:18 AMHi everyone!

I've combined all your incredible findings in a script so you don't have to!
So, in the link below you can find a little tool that can look into a folder with the source JPG and create the tiff with temperature x10 in a subfolder.
It works on windows with a portable version of python.

I'm getting an error when trying this.
C:\Users\knussear\Documents\Argentina\traitement_temperature>.\python_portable\WPy32-3850\python-3.8.5\python.exe extract_temp.py
C:/Users/knussear/Documents/Argentina/Flight2Thermal/DJI_0001.jpg
Traceback (most recent call last):
  File "extract_temp.py", line 100, in <module>
    image_raw = read_image(imagepath)
  File "extract_temp.py", line 34, in read_image
    APP4 = im.applist[14][1]
IndexError: list index out of range

C:\Users\knussear\Documents\Argentina\traitement_temperature>pause
Press any key to continue . . .

Any idea how to resolve this?

rszostak

I didn't noticed it in this conversation, but i think it can be useful:

H20T ThermalCalibration binary data contains vector of numbers that look like some calibration curve after interpretation as int16 and plotting:

b_thermal_calibration = subprocess.check_output(['exiftool', '-b', '-ThermalCalibration', img_path])
thermal_calibration = np.frombuffer(b_thermal_calibration, dtype=np.int16)
plt.plot(thermal_calibration)
output.png

rszostak

#49
I want to share with you the results of my experiments with H20T camera.

389 images were taken of a homogeneous target with a constant temperature (dark fabric chair seat).
I extracted the temperatures using the DJI TSDK. As the target is homogeneous I averaged the temperature for the whole image.
For the same images, I extracted the raw data from the EXIF (ThermalData). I interpreted them as int16 and also averaged for the whole image.

The comparison of results shows the image below.
output.png


You can see that with time as the internal components of the camera warm up, the measured with TSDK temperature converges to a certain equilibrium.
The raw data fluctuates significantly. The rapid changes appear to be related to the FFC correction.

Most of EXIF tags values does not change with time. Tags that have different values among images are:
['SourceFile', 'FileName', 'FileSize', 'FileModifyDate', 'FileAccessDate', 'FileCreateDate', 'ModifyDate', 'DateTimeOriginal', 'CreateDate', 'GPSLatitudeRef', 'GPSLongitudeRef', 'ThumbnailLength', 'AbsoluteAltitude', 'RelativeAltitude', 'GimbalPitchDegree', 'FlightRollDegree', 'FlightYawDegree', 'FlightPitchDegree', 'LRFStatus', 'LRFTargetDistance', 'LRFTargetAlt', 'LRFTargetAbsAlt', 'MPImageLength', 'MPImageStart', 'ThermalData', 'ThumbnailImage', 'PreviewImage']None of them are thermal calibration related. Even ThermalCalibration tag have the same binary bits for each photo. Where then the FFC information can be stored (to decode rapid changes in RAW data)? Is it possible that this information is encoded in the file, but outside the EXIF standard, so exiftool does not extract it?

All images can be downloaded here: https://aghedupl-my.sharepoint.com/:u:/g/personal/rszostak_agh_edu_pl/Ecqkog2BQntGhiBQ9miorBQBGX0od16t-AOOdnL2nSV4bQ?e=OSGnUD

kaido

Hi,

Have you had any luck with DJI mavic 3T/30T thermal data extraction?

Phil Harvey

There is a lot of unknown information in the DJI APP4 segment.  I've found some interesting unknown values, and share them here for your opinion.  One of the parameters seems to correspond with the jumps you see in your raw values -- the "Test8" tag in the attached CSV file.  Here is the command I used to generate this file:

exiftool -config dji_test.config rjpg -fileorder filename -csv -test'*' > out.csv

I've also found 7 other interesting floats that seem to increase monotonically through the images (Test1-Test7).  Maybe you can figure out what these mean.  If you come up with anything, we can give them a name and add them to the production ExifTool.

- 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 ($).

kaido

Phil,

First run didn't show anything
output
rjpg/DJI_20230520113922_0575_T.JPG

https://drive.google.com/drive/folders/1PvH_6VQf3Bl7fvbljV-YRo4d6gr5At3F?usp=sharing

I'll do tomorrow some pictures with temperature measurements Fluke FLK-IRR1-SOL hopefully we have some data with what we can compare results.

Kaido

Phil Harvey

> exiftool -config ~/Desktop/dji_test.config ~/Desktop/ -ext jpg -test"*"
======== /Users/phil/Desktop/H20T_DJI_20200513193136_0004_THRM.JPG
Test 1                          : 26.9140625
Test 2                          : 28.0625
Test 3                          : 42.4279174804688
Test 4                          : 25.578125
Test 5                          : 17.3046875
Test 6                          : 26.9296875
Test 7                          : 27.8515625
Test 8                          : 26.9375
======== /Users/phil/Desktop/DJI_20230520113922_0575_T.JPG
======== /Users/phil/Desktop/Mavic_3T_DJI_20230524111538_0398_T.JPG
======== /Users/phil/Desktop/MAVIC2-ENTERPRISE-ADVANCED_dji__DJI_0068__thermal.jpg

- 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 ($).

kaido

Phil,

images here with: air temp ~15C, panel temp ~30C, shot from screen and two IR pictures sky and panel+sky

https://drive.google.com/drive/folders/1PvH_6VQf3Bl7fvbljV-YRo4d6gr5At3F?usp=sharing

temp_test folder


Br,
Kaido

Phil Harvey

My last post was to address rszostak's question about the calibration jumps in the DJI H20T images.

- 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 ($).

kaido

Phil,

looks like DJI uses InfiRay IR sensor is it possible they use same style data structure?

https://www.infiray.com/products/m600-thermal-hand-scanner.html - it looks like M3T IR sensor spec

Phil Harvey

Do you mean DJI using InfiRay structure, or visa versa?

If so, then which DJI model(s)?  There isn't much consistency in the DJI metadata.

Also, I don't have many InfiRay samples.

- 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 ($).

kaido

dji uses infiray sensor and data structure. mavic 3t

Phil Harvey

ExifTool decodes all of the APP segments in my M3T sample.  APP3 is the raw thermal data just like InfiRay, but the other APP segments are different from InfiRay.

- 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 ($).