Raw value relation to temperature?

4,691 views
Skip to first unread message

Tryggvi Stefánsson

unread,
Aug 28, 2015, 8:57:27 AM8/28/15
to Flir Lepton
Hello all!

I know at the moment it is hard to get exact temperature readings but is it possible to get the reletive temperature difference between two pixels in a raw image?
If we have for example the values of 8500 and 8505 of two different pixels can we assume a linear relation for example say that the temperature difference in celsius degrees is 5°?
Being able to estimate the relative temperature difference would be great!

Thanks in advance!

gmar...@novacoast.com

unread,
Aug 28, 2015, 5:04:06 PM8/28/15
to Flir Lepton
Hi Tryggvi Stefánsson

First you have to consider:
1.- Each pixel give a different value. This is the reason of the existence of the Flat Field Correction (FFC).
2.- You must calibrate the reading with known temperatures (the more readings you do, the better calibration and accuracy you can get).

Answering your questions:
1.- I think it could be possible after FFC and calibration.
2.- I don't know if there is a linear relation. You must take some readings with known temperatures and see if it result in a linear expression.

Have a nice day

Max Ritter

unread,
Aug 29, 2015, 1:54:37 PM8/29/15
to Flir Lepton
I am doing this and it works quite good, but you need to use a separate single-point IR sensor to do the correlation.
For my application, I use a MLX90614 with 5° FOV (BCI or DCI).
To get ambient temperature independant raw values from the Lepton, you need to activate Radiometry mode over I2C. Otherwise, you need to redo the calibration if the ambient temperature changes too much.
For the calibration proccess, I point the IR sensor to the middle of the FOV of the Lepton and then take 100 different samples. That takes about 10 seconds. Afterwards, I use a methamtical method called "Least square fit" to get the first grade calibration formula (y = ax + b)
There are implementations of this method for any programming languages on the web, just google it. As soon as you have the calibration formula, you can then go ahead and calculate the absolute temperature for every pixel on the Lepton ! Of course the accuracy depends on the objects used in the calibration procces, so if you use different hot and cold objects, it should be quite good. 
I hope that was helpfull ;) 

Max Ritter

unread,
Aug 29, 2015, 2:56:51 PM8/29/15
to Flir Lepton

You can also do a live color bar with this method: 



Message has been deleted

Alexander Hupfer

unread,
Sep 7, 2015, 8:11:00 AM9/7/15
to Flir Lepton
Thank you for you insightful post. I was wondering if you have checked the reliability and accuracy of you method?

Alex M

unread,
Sep 14, 2015, 1:26:43 AM9/14/15
to Flir Lepton
Well, all of FLIR's other cameras use 'RBFO' values in order to convert raw signal values into meaningful temperature readings.

The relationship is non-linear (hence a line of best fit will only work over a small range of temperatures).

So Temperature in Kelvin is equal to:

T = B / Ln ( R / (RawVal - O) + F)

Where B is usually 1500, F is usually 1, R and O need to be found by curve fitting.

Look at FLIR's Gev Demo source code for hints http://80.77.70.144/SwDownload/Assets/ThermoVision/PvSample.zip (link from FLIR Cust Help, you will need to create a free account before downloading the example most probably).

A true reading of temperature would have to include emissivity, distance, atmospheric temp, etc which is in FLIR's sample code above.

Max Ritter

unread,
Sep 14, 2015, 7:41:06 AM9/14/15
to Flir Lepton
Alex is right, that proccess also applies to the FLIR Lepton. There is a document under NDA called "FLIR Lepton Radiometry Application Note" that describes it. 
What I also do is leave B and F at its default values and do a least square fit for R and O. I use 100 calibration samples between several lepton pixels multiplied by a weight matrix to build an average raw value and real temperatures from a MLX90614 ir sensor pointing to that average value as inputs. 

Andrei

unread,
Dec 21, 2015, 5:59:25 PM12/21/15
to Flir Lepton
Hi guys,

Pretty useful thread. Thanks !

I have a quick question regarding the flux to temperature conversion equation: 
 - as I see, there is no camera temperature variable in this equation
 - that means that the raw value is already corrected ? (for example by using a sensor with radiometry mode activated)

If that is the case, is it possible to treat the two issues separate ? By correcting first the raw values, then compute the flux to temperature mapping function ?
As I understand, the radiometry mode is off by default, unless you order 1000+ units and sign a NDA.

Best,
Andrei

Brandon Curtis

unread,
Apr 6, 2016, 9:37:34 PM4/6/16
to Flir Lepton
Max, that's amazing!  Any chance you can share that code?

Brandon Curtis

unread,
Apr 6, 2016, 9:40:04 PM4/6/16
to Flir Lepton
"Search before you post!", hahah. http://www.diy-thermocam.net/

Shazwan Ramdan

unread,
Feb 5, 2017, 3:18:05 PM2/5/17
to Flir Lepton
can i have the source code if possible. I need to add this in my c++ thermal project.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages