Myzhar / Lepton3_Jetson

Library and examples to connect the FLIR Lepton3 thermal camera to Nvidia Jetson embedded boards
MIT License
52 stars 15 forks source link

get temperature of each pixel. #4

Closed rahulsharma11 closed 2 years ago

rahulsharma11 commented 3 years ago

Hi, Thanks for the great tutorial and support.

I am using Lepton3 with Jetson nano JP4.3. I am using opencv_demo with Radiometric enable. I want the temperature readings for each pixels. How can i get that? I can see there is an API called "getSensorTemperatureK()" but it seems the sensor temperature only. Any suggestions? Thanks.

Myzhar commented 3 years ago

Hi @rahulsharma11, that's not the temperature from the thermal image, but the temperature of the sensor itself.

To read the temperature from the thermal image you need something different. First of all the Lepton3 cannot read a factory calibrated temperature like instead the Lepton3.5 does.

However you can roughly convert the thermal readings in a temperature convering the raw 16 bit value. First of all you must disable RGB output, so you can get 16bit data. Then you can look in the check_fever_app to understand how to convert data values: https://github.com/Myzhar/Lepton3_Jetson/blob/master/check_fever_app/check_fever_app.cpp#L176-L181

rahulsharma11 commented 3 years ago

Hi, Thanks for the pointer. I got the readings pixelwise.

Can you also please suggest few information regarding the pallet you used in the app? Does the raw readings coming out from sensor need to be manipulated according to "White hot color" pallet? or we can directly apply the "temp_scale_factor " multiplication to the raw readings and get the approx degree Celsius output.

Secondly You have calculated "temp_scale_factor" value by taking temperature range 0-150 degree. Is it consider to HIGH gain of Lepton3?

And at last it will be great if you have sometime to share your suggestions on the other issue i opened- https://github.com/Myzhar/Lepton3_Jetson/issues/3

I am a bit confused as Lepton3 is not radiometric but why Radiometric output is being used throughout with Lepton3.

Myzhar commented 3 years ago

Can you also please suggest few information regarding the pallet you used in the app? Does the raw readings coming out from sensor need to be manipulated according to "White hot color" pallet? or we can directly apply the "temp_scale_factor " multiplication to the raw readings and get the approx degree Celsius output.

If you get raw data you cannot get RGB data... so you must convert raw RGB to a color pallette manually. The OpenCV example retrieves directly palletized RGB images from Lepton

Secondly You have calculated "temp_scale_factor" value by taking temperature range 0-150 degree. Is it consider to HIGH gain of Lepton3? Exactly... but crating a calibrated lookup table using object with known temperature could be very better

And at last it will be great if you have sometime to share your suggestions on the other issue i opened-

3

I will

I am a bit confused as Lepton3 is not radiometric but why Radiometric output is being used throughout with Lepton3.

I was confused too... but reading the documentation you can get the solution. The Radiometric behavior in Lepton3 guarantees that output thermal data are not affected by the changing of the temperature of the sensor itself.

rahulsharma11 commented 3 years ago

Hi, Thanks again.

My doubt was not regarding RGB pallet data..I just wanted to know that the Radiometric output values considered as Raw sensor readings or these are also manipulated (pallatized) according to "White hot color pallate". As image appears to be White hot image. In summary - Does The Radiometric output sensor readings needed to be manipulated (pallatized) according to White hot color pallate? or these raw readings can be directly used to get temperature readings with temp_scale_factor?

HaeminJung commented 3 years ago

Hi, thanks for the work first of all. :)

I want to ask a reference to where you got the equation that you used to convert the raw 16-bit data to real celcius temperature. (value)*0.0092 + 0.05

Myzhar commented 3 years ago

@HaeminJung it's a simple "linear calibration" formula. The 0.0092 factor is calculated empirically comparing with an object with a known temperature

HaeminJung commented 3 years ago

great to know :)

Thanks again