Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Temperature values for DJI ZH20T are not correct #14

Open
lvEnertis opened this issue May 12, 2022 · 9 comments
Open

Temperature values for DJI ZH20T are not correct #14

lvEnertis opened this issue May 12, 2022 · 9 comments

Comments

@lvEnertis
Copy link

lvEnertis commented May 12, 2022

I am testing the thermal_base library with some images from a DJI ZH20T, and the temperatures that I get are not what I was expecting.
Basically all the values exported in image.thermal_np are negative, and there shouldnt be any negative value for the image I am using.

Is there anything I am missing?

Is the convertion to celsius tested for the DJI cameras?

If you need one example of image, I can send to an email.
I tried attaching it here, but seems that we lose the metadata info.

Thanks!

@rsnk96
Copy link
Member

rsnk96 commented May 12, 2022

For review + @agarwalkunal12

And @lvEnertis - can you share a sample image from the camera here?

@lvEnertis
Copy link
Author

This is one image from the camera.

example

If the metadata is not preserved by sharing here, I can send it to a email.

Thank you for looking into it.

@rsnk96
Copy link
Member

rsnk96 commented May 12, 2022

Can you zip it and attach it, like this?
detecttechnologies/Thermal-Image-Analysis#8 (comment)

@lvEnertis
Copy link
Author

Here it is!

example.zip

@enertisbd
Copy link

Hello,

Just writting to know if there is any update on this issue.

Thank you!

@ChrisDAT20
Copy link

When you look into the function extract_temperatures_dji, the Emissivity, ObjectDistance and RelativeHumidity are set to constant values, instead using the values from the image meta data. When you change this, will you get correct temperatures?

@lvEnertis
Copy link
Author

Hi,

I tried using the metadata values only for Emissivity, ObjectDistance and RelativeHumidity, and it didnt work.
So I commented the whole definition (hard coded) of "meta" at thermal_base.py@123, and it seems to be working now.

From what I see the the redefinition of meta causes the image data to be ignored, so probably it should be removed or used in a different way.

Thank you for looking into it.

@ChrisDAT20
Copy link

Removing the hard coded values will use the meta data values which are in the image data. As the execution flows through the utils.sensor_vals_to_temp() function too, even a completely empty meta dictionary will give you some results. That sensor_vals_to_temp function defaults the parameters too. I tried with Emissivity of the image (100), but that seems to mean 100%, and the results are surely wrong.

@lvEnertis
Copy link
Author

lvEnertis commented Sep 2, 2022

Hi,

I compared the results (removing the hard coded values) with those of DJI Analysis Tool, and the values a wrong.
The values of Distance, Relative Humidity, Emissivity, and Reflected Temp, used by the software are in the image below.
They output the Emissivity as 1, but with this value thermal_base outputs all negative values.

I also have tried the library below and it seems to return the correct values (at least for the few pixels I checks).
It may help on the solution of our problem.
https://github.com/SanNianYiSi/thermal_parser

I dont have much experience in this issue, but if you guys need any help, feel free to ask!

DJI software output.
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants