Raw Data to temperature :D

5,072 views
Skip to first unread message

Juan Angel Ram

unread,
Jun 1, 2016, 2:20:57 PM6/1/16
to Flir Lepton
Hi everybody, I made some test and I found this equation

Temperature(°C) = 0.0465*SensorValue-349.44 

I hope that this information will be of utility and sorry for my bad english.

But if you have other equation more exact, I will hope that you send me this information please.

Regards


Max Ritter

unread,
Jun 2, 2016, 10:32:27 AM6/2/16
to Flir Lepton
Dear Juan,

for the DIY-Thermocam, I am using this formula, which also relies on the ambient temperature:

Temperature(°C) = (0.0217 * sensorValue) + ambientTemp  - 177.77

Temperatures above 200 degree needs to be compensated to 200.0, the same applies to temperatures under -40 degree Celcius.

Hope this is helpful.

Wishes,
Max

Juan Angel Ram

unread,
Jun 2, 2016, 1:51:06 PM6/2/16
to Flir Lepton
Thank you for the information Max only I have a question, The ambient temperature is of the thermistor of the camera?

Regards

Max Ritter

unread,
Jun 2, 2016, 2:07:17 PM6/2/16
to Flir Lepton
I am using the ambient temperature readout from a MLX90614 sensor, which is located near the Lepton on the DIY-Thermocam.

But you can also use the internal thermistor, see section 

4.5.5 SYS AUX Temperature Kelvin (This command returns the Lepton Camera’s AUX Temperature in Kelvin. This value is from a thermistor located on
the Lepton housing)

inside the Software IDD. Or you install an additional temperature sensor like the PT100 next to the Lepton and get the ambient temperature from it.

Juan Angel Ram

unread,
Jun 2, 2016, 9:36:23 PM6/2/16
to Flir Lepton
Thank you Max.

Regards

Juan Angel Ram

unread,
Jun 3, 2016, 12:05:45 PM6/3/16
to Flir Lepton
Hi again Max, I have some questions and I will hope that you can you help me.

For the use this equation is neccesary enable telemetry? or only is neccesary to get the raw data and use the equation.

Can you tell me the process to obtain this equation?

Or, Is there a problem if you share this process?

Regards.

Max Ritter

unread,
Jun 3, 2016, 12:12:39 PM6/3/16
to Flir Lepton
Dear Juan,

I calculated the equation from the data Jonathan posted recently: https://groups.google.com/d/msg/flir-lepton/YjZ0zpMJ3eg/Is57Rn5hAgAJ

And it works very good, if I give the device a warmup time of 60s at startup. This is required for the internal components to heat up properly and provide a stable output afterwards. 

When comparing the range data with the MLX90614 spot sensor, the accuracy is very good so far. If you need better results, you could do a manual calibration on the DIY-Thermocam, which stores 100 comparison values of the MLX90614 raw temp to the corresponding Lepton pixels. A least-square fit will then calculate the slope and offset. You can check out everything on the Github, linked on my website www.diy-thermocam.net.

Concerning radiometry or telemetry, I am not using it at all. Just the basic 14-bit output gives me the best results. 

But in order to get really precise raw-to-temp conversions, you may need to wait for the Lepton 2.5/3.5 with HW calibration. I can not talk about the release date, but it will be this year for sure.

Wishes,
Max

funny...@gmail.com

unread,
Sep 29, 2016, 5:17:27 PM9/29/16
to Flir Lepton
Hi Max,

I have learned a lot from you DIY-ThermoCam project but I am still a bit confused. Can you get accurate temperature from mlx90614 bcf? I tested it both on RPi and Arduino and the forehead temperature it measured was like 33 - 34 C, which I expected to be around 37 C. Also, will you calibrate the lepton after your first calibration that figures out the slope and offset with least square fit again? Thank you.

Regards.

Andrew Ryan

unread,
Sep 29, 2016, 11:02:49 PM9/29/16
to Flir Lepton
@funny: It's not surprising that your skin is reading lower than 37° C. Core body temperature is hard to get externally, which is why you have to stick a thermometer so far under your tongue to get an accurate reading. Also, the emissivity of skin is less than 1, so this is a source of error as well. 

With regards to the subject of this thread (raw data to temperature), I would expect the raw data to be directly related to T^4, rather than varying linearly with temperature. 
The signal that comes from an infrared camera is linearly related to the difference in radiant flux (W) between the pixel itself and the object that the pixel sees. Radiant flux and radiance are linearly related, so when I calibrate infrared cameras in my lab, I do a linear least squares fit between radiance (W/m^2/sr) and the raw camera voltage. You can calculate the radiance of an object by integrating the Planck function across the spectral range of the lepton. Even better, take the Lepton's spectral response function into to account first. You can find the typical Lepton spectral response on page 44 here: https://cdn.sparkfun.com/datasheets/Sensors/Infrared/FLIR_Lepton_Data_Brief.pdf

I know this is a lot of information and also probably overkill for most applications, if you are using your lepton for research or in a precision instrument and you need very very accurate values, this is the way to go. You'll be able to minimize temperature error to far better than what FLIR says is capable. 

Lots of info here, so if you have questions I'm happy to discuss this in more detail!  :)

-Andy

don felipe

unread,
Sep 30, 2016, 11:48:39 AM9/30/16
to Flir Lepton
Andy,

I have questions about your process, especially because I am just now trying to design a calibration process for the Lepton.
You calculate expected radiance for a given temperature using Plank's function and the spectral response plot from FLIR. Can you use the "Normalized Response" shown on the Lepton's plot as a direct percentage or does a transfer function need to be created from it? For example, is the Lepton only resolving 80% of the radiance at 10um? Do you have an academic source where I can read about this in more depth?

The raw output of the Lepton is a digital value based on the temperature of the FPA. So to calibrate the Lepton, would you have to make these calculations for a specific camera temperature?

Philip

Andrew Ryan

unread,
Sep 30, 2016, 11:40:17 PM9/30/16
to Flir Lepton
Hi Don,

It is my understanding that the detector output voltage has already accounted for the temperature of the detector itself. The relationship between voltage and radiance is actually between delta-Voltage and delta-Radiance. So the lepton should be spitting out delta-V, rather than just V. I believe the differencing is done within the camera circuitry. I believe the way the microbolometer gets delta-V is through the calibration shutter. When the calibration is thrown, the assumption is made that the shutter is the same temperature as the rest of the microbolometer and optics housing. So the voltage at a pixel when the shutter is closed is sort of the ground state of that pixel. Then when the scene is viewed, it spits out the difference between the voltage when the shutter is closed and when it is open. (Note: I am not 100% sure that this happens in all microbolometers! That is why it is always good to let your camera warm up for a bit to reach a stable operating temperature before collecting important data. If someone is more knowledge about this, please chime in! )

Here is one useful introductory article that covers a bunch of things:

and here is a very detailed explanation of how uncooled microbolometers (like the Lepton) are calibrated:

You have a good question about using the normalized response function vs rescaling it to be "non-normalized" with some sort of transfer function. Honestly, I think that you can use it as it is presented in that document. Just multiply the planck curve by that response function, then integrate to get radiance. Using the normalized curve will create a systematic error that will be pretty well accounted for in the constants in the linear relationship relationship between voltage and radiance. 

Keep in mind that you must also account for emissivity! That is why calibration is made much easier by using blackbodies. 

So, for example, lets say you are trying to do a very precise calibration of your lepton. What you'll want to do is point it at something with a very high emissivity that is at a very stable, well-known temperature. Conical cavities that have been painted black work very well as blackbodies. You can rig one up with heaters and thermometers so that you can control the temperature and keep track of it precisely. Then you take a series of photos at different temperatures, calculate what the blackbody radiance was based on its known temperature from the thermometers and the camera spectral response function, then plot up your voltage and radiance points to get your response curve. 

Once you have your calibration curve, you can take a measurement with the lepton and convert the voltage back to radiance. From there, you will see what temperature corresponds to that radiance. I usually just make a lookup table to radiance to temperature. 

If you want me to go more in depth with emissivity, let me know. I will also try to find more literature explaining these things. Sorry I couldn't find anything better. 

-Andy
Message has been deleted

Max Ritter

unread,
Oct 4, 2016, 7:20:57 AM10/4/16
to Flir Lepton
33-34 skin temperature should be fine for the head, it differs from the inner temperature.
In most of the temperature area, the relationship between raw values and spot temperature is almost linear, but for high or low temperature measurements, you might need a new calibration.

Ben Kluwe

unread,
Oct 4, 2016, 10:29:57 AM10/4/16
to Flir Lepton
@funny: if you want to use skin temperature then you need to take into consideration that it has an emissivity of 0.98 (as pointed out by others in this thread) and the location at which you are measuring.

I'd suggest you use the neck area instead, this is mainly because the aorta that supplies the brain with blood is closer to the skin than others and thus provides a very constant 36-37°C, probably even more constant than the forehead.

You can also check out core temperature, but be careful, because core temperature on its own doesnt mean anything (nor core body temperature), as each part of the body has a different core temperature and variance.

Regards, Ben

don felipe

unread,
Oct 5, 2016, 5:18:09 PM10/5/16
to Flir Lepton
Andy,

Thanks! This is some great information. I had been approaching this from another angle and this seems like a better method. Those papers were a great start. I have some data from imaging a water bath as it cooled down I can apply this to. I think a better blackbody approximation will be necessary. Why has a conical cavity been used? Unless the entire outer surface area was covered with a uniform heating element wouldn't thermal gradients be pronounced enough to cause errors? I was thinking of using a cavity submerged in water to reduce this as well as decrease the complexities of a control system required for achieving a uniform temperature.

It does seem that a non-uniform correction through the FFC shutter actuation should compensate for that delta-V. It will compensate the output of the pixels based upon the upon the uniform temperature of the shutter.

Philip

Rafael Bayareh

unread,
Oct 7, 2016, 6:08:30 PM10/7/16
to Flir Lepton
Hello,

I tried your equation with the fpa_temp_kelvin variable. As I understood, this variable is the internal value of the fpa bolometer.

The equation I got is: fpa_temp_kelvin*65.00/63535.00;

With this equation I have got values around 30°C to 32°C as internal temperature. But still I'm not sure if this is correct.

funny...@gmail.com

unread,
Oct 31, 2016, 3:27:00 PM10/31/16
to Flir Lepton
Hi Ben,

Thank you for your reply. I am searching for some methods to determine the difference of skin and core temperature. However, I still need to get some precise temperature first.

funny...@gmail.com

unread,
Oct 31, 2016, 3:29:15 PM10/31/16
to Flir Lepton
Hi Andrew,

Thank you for your detailed reply! It might be a little bit complicated to me but I will definitely go over that.

Tao

funny...@gmail.com

unread,
Oct 31, 2016, 3:30:38 PM10/31/16
to Flir Lepton
Hi Max,

It seems that this equation is based on the assumption that the lepton and mlx90614 have the same ambient temperature. Could you give me some advice to keep their temperature similar? Thanks!

Tao

Nicolás Menoni

unread,
Dec 18, 2016, 6:50:52 PM12/18/16
to Flir Lepton
Hi! Thanks you for share very interesting info here.

Sorry for my basic level un programing, but, this commands like the "SYS AUX Temperature Kelvin", how can I execute it? Can I get this data throw the python library (pylepton) or I have to use de C++ SDK?

How can I change any parameter of the Lepton? (like AGC, etc.)

I'll appreciate any guidance in this matter

Thanks!

Brian Dinh

unread,
May 16, 2020, 1:40:13 PM5/16/20
to Flir Lepton
Hi Max,
I have some questions regarding to your formula. For the raw sensorValue, is it the value from the enabled radiometry Lepton. If the radiometry is not enabled, what should be the range for the actual Temperature after using that formula? Is it +-5 also?

Andrew Jones

unread,
May 16, 2020, 3:50:47 PM5/16/20
to Brian Dinh, Flir Lepton
For a non-radiometric Lepton, there is no concept of “real” temperature; you can just get relative data across the sensor data. The value of the pixels are relative to each other, but the device is not calibrated to have “real” temperatures mapped to the pixel values.

The formula does not make sense for non-radiometric Leptons.


On Saturday, May 16, 2020, Brian Dinh <briand...@gmail.com> wrote:
Hi Max,
I have some questions regarding to your formula. For the raw sensorValue, is it the value from the enabled radiometry Lepton. If the radiometry is not enabled, what should be the range for the actual Temperature after using that formula? Is it +-5 also?

--
You received this message because you are subscribed to the Google Groups "Flir Lepton" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flir-lepton+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flir-lepton/4acf13c1-45a3-4146-889f-ad013d7c87c5%40googlegroups.com.

Brian Dinh

unread,
May 17, 2020, 3:36:13 AM5/17/20
to Flir Lepton
Hi, Thanks for you quick reply. 
After reading through the datasheet, I realized that the measured temperature (or the raw data) is dependent on the camera's own temperature.

Is there any way that I can get the camera's own temperature and is there any formula that can measure the scene temperature when taking the camera's own temperature into account?

This might not get me the "exact" or "real" termperature of an object but I believe this will give me constant measurement during the operation of the camera.
Thanks
Reply all
Reply to author
Forward
0 new messages