DJI H20T thermal radiometric jpeg file

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

Previous topic - Next topic

juan.bueno

Hello to everyone, I'm new in this forum. I would like to know if there is any news regarding the extraction of the temperature values ​​of the DJI M2EA

ccg91982

Tengo el mismo problema, sin experiencia en Python, y con una necesidad extrema de poder transformar las imágenes térmicas de M2EA. Si lo llego a saber no lo compro.

Gracias a todos por esta linea de trabajo, me parecéis excepcionales.

Fedro

#32
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.


Hi Rémi,
really thank you for your solution, I was able to convert the images thanks to your tool.

The thing I noticed next is that the converted tiff images have no longer all the geographic coordinates that the jpg images had.

Is there a way to transcribe the geographic coordinates on the new tiff images? this would be useful for photogrammetric processing with pix4d software or others.

Thank you,
Fedro

Phil Harvey

Hi Fedro,

Quote from: Fedro on November 12, 2021, 07:52:40 AM
Is there a way to transcribe the geographic coordinates on the new tiff images?

You should be able to do that with ExifTool:

exiftool -tagsfromfile %d%f.jpg "-gps*" -ext tif DIR

(assuming you are using a ".TIF" extension)

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

Tavana81

Quote from: juan.bueno on September 09, 2021, 05:10:07 AM
Hello to everyone, I'm new in this forum. I would like to know if there is any news regarding the extraction of the temperature values ​​of the DJI M2EA
Has anyone extracted the formula of thermal calculation of the m2ea .

sebastianbarria

The method to get the temperatures from the m2ea is the same as the m300... the thermal information is not inside the metadata (rawThermalImage) but in the blocks.
In this forum there's a code to read those temperatures... or maybe this link could help:
https://github.com/gtatters/Thermimage/blob/master/R/raw2temp.R
(I'm not expert in python, so I can't help you that much)
Good luck!

rroldan

Hi everyone. I know this post is old, but related with the topic, we've just released a tool to convert RJPG images to TIFF images with radiometric and all metadata information.
Please, visit https://thermo-converter.com/ to learn more.

jdavis

#37
Phil, I'm using exiftool 12.40, I'm trying to read the APP4 data from a DJI thermal image as you did below.

jdavis@openactive-desk:~/Downloads/jonny-house/IronBow Thermal Ortho Mavic 3 T 90ft$ exiftool -dji:all -G DJI_20221027130834_0001_T.JPG
[APP3]          Thermal Data                    : (Binary data 655360 bytes, use -b option to extract)
[APP5]          Thermal Calibration            : (Binary data 23818 bytes, use -b option to extract)



Am I doing something wrong? Or did DJI maybe change the file format? Thanks!

Phil Harvey

I would say that your model likely doesn't store the information mentioned.  But if you could upload an image I could take a look.

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

jdavis

Hey Phil,
 Sorry I forgot to get back with you! Here is an image. Its from a DJI Mavic 3. I have loads of them, so if you need anymore, or from any other dji thermal drone let me know!DJI_20221027130834_0001_T.JPG

Phil Harvey

Your file contains an unrecognized APP4 segment which may contain some useful information.  The format is very different form the APP4 which has been decoded for the ZH20T:

JPEG APP4 (256 bytes):
   a884f: ff d2 d1 ff 69 69 72 70 00 00 00 00 00 00 00 00 [....iirp........]
   a885f: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
   a886f: 00 00 c8 41 00 00 a0 40 33 33 73 3f 00 00 00 3f [...A...@33s?...?]
   a887f: 00 00 c8 41 00 00 00 00 00 00 00 00 00 00 00 00 [...A............]
   a888f: 2c 01 20 00 80 2c 01 80 00 00 00 00 00 00 00 00 [,. ..,..........]
   a889f: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
   a88af: e8 1f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
   a88bf: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
   a88cf: 01 03 00 00 00 4d 69 6e 69 5f 36 34 30 00 00 00 [.....Mini_640...]
   a88df: 00 00 00 00 00 03 05 01 0a 00 02 00 00 80 02 00 [................]
   a88ef: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
   a88ff: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
   a890f: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
   a891f: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
   a892f: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
   a893f: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]

Starting at offset 0xa886f (32 bytes from the start of APP4), there are 6 floating-point numbers that look interesting:

       25
        5
     0.95
      0.5
       25

Any idea what these are?

We could probably decode this information with more samples having as many known parameters as possible.

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

jdavis

Here you can see in the parameters section what those values are:

25 = reflected temp
0.5 = humidity
5 = distance
0.95 = emissivity

Thanks!

VirtualBox_WinDev2302Eval_10_03_2023_09_23_57.png

Phil Harvey

Great!

Do you have any samples of images where these values are different?  Specifically, I would like to know whether the first 25 or the last 25 represents the reflected temperature (and then what the other 25 represents).

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

Phil Harvey

BTW, feel free to send me any DJI samples that you have that I don't already have.  Here is a list of models for which I have samples (the "Model" tag):

FC1102
FC2103
FC220
FC2204
FC2403
FC300C
FC300S
FC300X
FC300XW
FC330
FC6310
FC7203
FC7303
FLIR
M3T
MAVIC2-ENTERPRISE-ADVANCED
PHANTOM VISION FC200
XT2
ZH20T

You can email them to philharvey66 at gmail.com

Thanks.

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

jdavis

I just checked images from two different cameras, both on an M3T and they have the exact same values. I'm going to get a pilot to change the settings in the flight app and see if they show up in the exif. I'll let you know when I have the information. thanks.