detecttechnologies / thermal_base

Decoding and common processing for thermographs / thermograms. Currently supports FLIR's TIFF and PNG encoded metadata, and DJI-encoded metadata
MIT License
54 stars 9 forks source link

meta data is overwirtten with constant data #6

Open najtin opened 2 years ago

najtin commented 2 years ago

Hi, i just stumbled upon this project so i am not sure if i understand correctly.

To me this seems wrong: https://github.com/detecttechnologies/thermal_base/blob/main/thermal_base/thermal_base.py#L110-L125

I am going to try to built it myself and report back.

najtin commented 2 years ago

It seems like someone had at least partial success in reverse engineering the important meta data: https://exiftool.org/forum/index.php?topic=11401.0

rsnk96 commented 2 years ago

Hey @najtin

Yes absolutely, it would be better if we can extract the formula params from the metadata itself for the DJI encoding too. Would you be interested in contributing the same?

najtin commented 2 years ago

Yes i will take a look into that. Though i have no experience in reverse engineering and it would be a side project for me. :D

rsnk96 commented 2 years ago

Haha well, all the best, hope you figure it out! 🙂

omritz commented 2 years ago

Hi, Regarding the same issue, DJI released SDK that allows extracting the information from images taken by H20T and XTS but does not yet support M2EA. According to this thread, one of their developers says they will release a version that supports M2EA in the second half of 2021. The formula that DJI used to calculate the temperatures in deg C is different than the one that you should use for FLIR data.

rsnk96 commented 2 years ago

Thanks for sharing @omritz . Will look into integrating that!

rsnk96 commented 2 years ago

Hey @omritz - the DJI SDK has been integrated by @agarwalkunal12 for fetching the raw sensor values 😃

rsnk96 commented 2 years ago

Can you test it out, and share how it compares to using the DJI Thermal Analysis tool?

omritz commented 2 years ago

Thanks for the update. When I test it with the new M2EA support and adjust the same parameters, the results are not the same as the DJI thermal analysis tool. For the same image: DJI Thermal Analysis - max=55.3, min=16.8, avg=35.1 Thermal_base - max=38.2, min=26.7 , avg=32.2

rsnk96 commented 2 years ago

@agarwalkunal12 - any thoughts on this? Could this be because of the assumptions made for the missing metadata?

nrontsis commented 2 years ago

Perhaps this could be because DJI's SDK is not called when M2EA images are processed by thermal_tools?