cory-garms / thermal_conversion_demo

Tutorial on how to use thermal_parser and exiftool to convert DJI radiometric JPG to TIF with temp values and append GPS metadata
MIT License
6 stars 2 forks source link

DJI mavic 3T #2

Open JonPak opened 9 months ago

JonPak commented 9 months ago

Hi,

does it work with DJI mavic 3T model thermal images?

I get this error, any advice on how to solve this:

(thermal_env) D:\Downloads\thermal_conversion_demo-main\thermal_conversion_demo-main>python tir_convert.py Traceback (most recent call last): File "tir_convert.py", line 24, in temperature = thermal.parse_dirp2(image_filename=i) File "D:\Downloads\thermal_conversion_demo-main\thermal_conversion_demo-main\thermal.py", line 789, in parse_dirp2 assert return_status == Thermal.DIRP_SUCCESS, 'dirp_set_measurement_params error {}:{}'.format(image_filename, return_status) AssertionError: dirp_set_measurement_params error images\DJI_20230825215003_0007_T.JPG:-3

(thermal_env) D:\Downloads\thermal_conversion_demo-main\thermal_conversion_demo-main>

harryhouna commented 9 months ago

Hi,

thank you for the code. For me it seems to be working with the provided demo image, but with DJI Mavic 3T images I get a similar error as described above. Error pasted below:

Traceback (most recent call last): File "C:\thermal_conversion\tir_convert.py", line 24, in temperature = thermal.parse_dirp2(image_filename=i) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\thermal_conversion\thermal.py", line 789, in parse_dirp2 assert return_status == Thermal.DIRP_SUCCESS, 'dirp_set_measurement_params error {}:{}'.format(image_filename, return_status) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: dirp_set_measurement_params error images\DJI_20230921173941_0001_T.JPG:-3

harryhouna commented 9 months ago

Okay it seems that there is some differences in the image exif-data (ZH20T - M3T). K1 - KK parameters are missing completely below Thermal data. Would it be possible to get this working with M3T as well? Exampleimage-exif.txt M3T-exif.txt