Exif tool on H20T thermal imge from DJI

Started by Kofi, October 13, 2021, 10:26:34 PM

Previous topic - Next topic

Kofi

Hello all,

I am extracting exif info from a DJI H20T thermal imagery and get following result:
---- ExifTool ----
ExifTool Version Number         : 12.12
Warning                         : [minor] Bad MakerNotes directory
Warning                         : [minor] Bad format (29551) for MakerNotes entry 0
Warning                         : [minor] Unknown APP3 segment
Warning                         : [minor] Unknown APP3 segment
Warning                         : [minor] Unknown APP3 segment
Warning                         : [minor] Unknown APP3 segment
Warning                         : [minor] Unknown APP3 segment
Warning                         : [minor] Unknown APP3 segment
Warning                         : [minor] Unknown APP3 segment
Warning                         : [minor] Unknown APP3 segment
Warning                         : [minor] Unknown APP3 segment
Warning                         : [minor] Unknown APP3 segment
Warning                         : [minor] Unknown APP3 segment
Warning                         : [minor] Unknown APP4 segment
Warning                         : [minor] Unknown APP5 segment
---- System ----
File Name                       : DJI_20210628094134_0001_T.JPG
Directory                       : C:/Users/paul.pelletier/Documents/Drone Reunion/Exemple H20T
File Size                       : 965 KiB
File Modification Date/Time     : 2021:10:13 11:13:34-05:00
File Access Date/Time           : 2021:10:13 11:14:33-05:00
File Creation Date/Time         : 2021:06:28 09:41:34-05:00
File Permissions                : rw-rw-rw-
---- File ----
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Image Width                     : 640
Image Height                    : 512
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
---- IFD0 ----
Image Description               : default
Make                            : DJI
Camera Model Name               : ZH20T
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Software                        : 02.04.01.01
Modify Date                     : 2021:06:28 09:41:34
Y Cb Cr Positioning             : Centered
XP Comment                      : 0.9.142
XP Keywords                     : single
---- ExifIFD ----
F Number                        : 1.0
Exif Version                    : 0230
Date/Time Original              : 2021:06:28 09:41:34
Create Date                     : 2021:06:28 09:41:34
Components Configuration        : Y, Cb, Cr, -
Aperture Value                  : 1.0
Max Aperture Value              : 1.0
Flash                           : No Flash
Focal Length                    : 13.5 mm
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 640
Exif Image Height               : 512
File Source                     : Digital Camera
Scene Type                      : Directly photographed
Digital Zoom Ratio              : 1
Focal Length In 35mm Format     : 58 mm
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : Normal
Device Setting Description      : (Binary data 4 bytes, use -b option to extract)
Serial Number                   : 1W9DI140010160
Lens Info                       : 13.5mm f/1
---- InteropIFD ----
Interoperability Index          : R98 - DCF basic file (sRGB)
Interoperability Version        : 0100
---- GPS ----
GPS Version ID                  : 2.3.0.0
GPS Latitude Ref                : South
GPS Latitude                    : 20 deg 54' 32.18"
GPS Longitude Ref               : East
GPS Longitude                   : 55 deg 28' 35.18"
GPS Altitude Ref                : Above Sea Level
GPS Altitude                    : 205.167 m
GPS Status                      : Measurement Active
GPS Map Datum                   : WGS-84
---- IFD1 ----
Compression                     : JPEG
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Thumbnail Offset                : 1178
Thumbnail Length                : 7050
Thumbnail Image                 : (Binary data 7050 bytes, use -b option to extract)
---- XMP-rdf ----
About                           : DJI Meta Data
---- XMP-xmp ----
Modify Date                     : 2021:06:28 09:41:34
Create Date                     : 2021:06:28 09:41:34
---- XMP-tiff ----
Make                            : DJI
Camera Model Name               : ZH20T
---- XMP-dc ----
Format                          : image/jpg
---- XMP-drone-dji ----
Version                         : 1.2
Gps Status                      : Normal
Altitude Type                   : GpsFusionAlt
GPS Latitude                    : 20 deg 54' 32.18" S
GPS Longitude                   : 55 deg 28' 35.18" E
Absolute Altitude               : +205.167
Relative Altitude               : +12.500
Gimbal Roll Degree              : +0.00
Gimbal Yaw Degree               : +102.30
Gimbal Pitch Degree             : -42.80
Flight Roll Degree              : +1.10
Flight Yaw Degree               : +96.60
Flight Pitch Degree             : -1.00
Flight X Speed                  : 0.0
Flight Y Speed                  : 0.0
Flight Z Speed                  : 0.0
Cam Reverse                     : 0
Gimbal Reverse                  : 0
Self Data                       :
---- XMP-crs ----
Version                         : 7.0
Has Settings                    : False
Has Crop                        : False
Already Applied                 : False
---- MPF0 ----
MPF Version                     : 0100
Number Of Images                : 2
Image UID List                  : (Binary data 66 bytes, use -b option to extract)
Total Frames                    : 1
---- MPImage1 ----
MP Image Flags                  : Representative image, Dependent parent image
MP Image Format                 : JPEG
MP Image Type                   : Baseline MP Primary Image
MP Image Length                 : 827836
MP Image Start                  : 0
Dependent Image 1 Entry Number  : 0
Dependent Image 2 Entry Number  : 2
---- MPImage2 ----
MP Image Flags                  : Dependent child image
MP Image Format                 : JPEG
MP Image Type                   : Large Thumbnail (VGA equivalent)
MP Image Length                 : 152214
MP Image Start                  : 836028
Dependent Image 1 Entry Number  : 0
Dependent Image 2 Entry Number  : 0
Preview Image                   : (Binary data 152214 bytes, use -b option to extract)
---- Composite ----
Aperture                        : 1.0
Image Size                      : 640x512
Megapixels                      : 0.328
Scale Factor To 35 mm Equivalent: 4.3
GPS Altitude                    : 205.1 m Above Sea Level
GPS Latitude                    : 20 deg 54' 32.18" S
GPS Longitude                   : 55 deg 28' 35.18" E
Circle Of Confusion             : 0.007 mm
Field Of View                   : 34.5 deg
Focal Length                    : 13.5 mm (35 mm equivalent: 58.0 mm)
GPS Position                    : 20 deg 54' 32.18" S, 55 deg 28' 35.18" E
Hyperfocal Distance             : 26.06 m

I am wondering if anyone knows what the warning lines at beginning of output mean?

Thanks for any input,

JimM

Can you post the file that this data came from?
Thanks.

StarGeek

Quote from: Kofi on October 13, 2021, 10:26:34 PM
I am wondering if anyone knows what the warning lines at beginning of output mean?

Jpegs can contain blocks of data other than image data.  Some of these are application-specific, APPn (where n is a number). You can see some of the APPn blocks on the Jpeg tags page.  For example, EXIF and XMP data will be contained in an APP1 block.  IPTC IIM/Legacy data are held in the APP13 Photoshop block.

What these warnings mean is that there are APPn blocks that exiftool can't identify.  Looking at the the Jpeg tags page, it looks like DJI raw thermal data is normally held in the APP3 block.  Since a jpeg block has a maximum size of 64k and the thermal image is probably much bigger than that, the thermal image is probably spread across mulitple APP3 blocks, which is why the warning for APP3 is popping up so many times.

If you can post a sample, then it can be checked to see if it's some sort of new format or possibly some sort of corruption.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Kofi

Star Geek and JimM,

thanks for the informative post. I am posting an example image for your review....It would be great if some of the info from the thermal like max temperature, etc... could be extracted from these blocks if they are readable....


StarGeek

Ah, I should have noticed.  The version of exiftool you're using is nearly a year old (Dec. 4, 2020).  Using version 12.30, I get these warnings
---- ExifTool ----
Warning                         : Short directory size for MakerNotes (missing 280890 bytes)
Warning                         : [minor] Bad MakerNotes directory
Warning                         : [minor] Bad format (29551) for MakerNotes entry 0
Warning                         : [minor] Boolean value for XMP-crs:HasSettings should be capitalized
Warning                         : [minor] Boolean value for XMP-crs:HasCrop should be capitalized
Warning                         : [minor] Boolean value for XMP-crs:AlreadyApplied should be capitalized
Warning                         : Invalid value for IFD1 tag 0x0103 Compression
Validate                        : 7 Warnings (5 minor)

which can for the most part be ignored.  It looks like the ability to decode this data was added in 12.15.

Here's the DJI data available
C:\>exiftool -g1 -a -s -dji:all Y:\!temp\aa\c\DJI_20210628094134_0001_T.JPG
---- DJI ----
ThermalData                     : (Binary data 655360 bytes, use -b option to extract)
K1                              : -129.407562255859
K2                              : 30.4086513519287
K3                              : 509.986968994141
K4                              : 0
KF                              : 79.6283645629883
B1                              : 0
B2                              : -820.799987792969
ObjectDistance                  : 5
RelativeHumidity                : 70
Emissivity                      : 100
Reflection                      : 230
AmbientTemperature              : 21
D2                              : -945
KJ                              : 100
DB                              : 0
KK                              : 253
ThermalCalibration              : (Binary data 32768 bytes, use -b option to extract)


Quote from: Kofi on October 14, 2021, 08:53:37 AM
It would be great if some of the info from the thermal like max temperature, etc... could be extracted from these blocks if they are readable....

From my understanding, that requires processing the ThermalDataj, which exiftool doesn't do.  Try searching these forums for some threads on the subject.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Kofi

Thanks so much StarGeeks,

as I am relatively new to this. I typically extract my info with these options exiftool(-a -u -g1 -w txt)

I see you have used -s -dji:all options, could you explain their meaning?

I will download latest exiftool...

StarGeek

The -s (-short) option displays the actual tag names.  By default, exiftool will display the tag descriptions, which can differ significantly from the actual names, especially when using a language other than English (see FAQ #2).

-dji:all displays all tags in the DJI group.  See the second paragraph on the -TAG option
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Kofi

Very helpful explanation,

I am learning, thanks again :)