Temperature legend with the Lepton® longwave infrared (LWIR) imager

1,433 views
Skip to first unread message

Francis Dominic

unread,
Aug 19, 2015, 11:34:15 PM8/19/15
to Flir Lepton
Hi

with the Raspberry Pi 2 computer.

The requirement of my projects is that I need to know the temperature on the output obtained from the camera

What changes in teh code will help me get a similar interface or at least the temperature scale in the side of the window
 

Justin Lee

unread,
Aug 20, 2015, 12:13:32 PM8/20/15
to Flir Lepton
Hi Francis

Obtaining external temperatures from the Lepton is actually not a trivial task.  The Lepton would need to be calibrated.  To do so, you will need to point the Lepton at a uniform black body and calibrate the Lepton to heat sources of known temperatures.  This calibration data and temperature data is then used to create a polynomial function that maps the 14 bit data from the Lepton into a temperature.

Regards,
Justin

Francis Dominic

unread,
Aug 20, 2015, 7:50:20 PM8/20/15
to Flir Lepton
Thanks Justin

I have a image of temperature scale and would like to ask if its possible to insert it onto the GUI?
If yes could you pls provide the codes and where the changes need to be made.


captainmoron

unread,
Aug 21, 2015, 1:50:29 AM8/21/15
to Flir Lepton
Hi Francis,

obtaining Temperature data from the Lepton without calibration is not that easy. There are some approaches in this group to measure a linear funtion by mapping raw values of the Lepton with known temperatures. In this thread https://groups.google.com/forum/#!topic/flir-lepton/GWHD1KMVYaE Mark Ricklick wrote:

"I did a rough calibration of the Lepton, taking images of a piece of copper painted black, and mounted against a heater. 
My first calibration turned out the following linear relationship: y = 0.05872x - 479.22999
Where, Y is the target temperature - the camera temperature. All in Fahrenheit. 
Or Target (F) =  0.05872x - 479.22999 + Camera (F). "

I haven't did not look into it yet, how accurate it is, but for a start the results looked promising. For the temperature scale I would say, you should look into Qt, with which the Lepton demo has been made.

Best Regards,
Peter

Justin Lee

unread,
Aug 21, 2015, 4:13:30 PM8/21/15
to Flir Lepton
Peter, that seems to be a great resource for people who are interested in thermal temperatures.  I may be poking around that thread for some useful information.

I have not tried Mark's calibration, but if it works, it should be a pretty decent approximation of temperatures for starters.  I believe a more effective function would be a polynomial function (rather than linear).  Also, I don't think that calibrations from one Lepton will carry over precisely to another Lepton due to slight deviations in manufacturing and external factors (ex. placing a Lepton closer to a battery would probably skew some data).

Justin Lee

unread,
Aug 21, 2015, 4:18:06 PM8/21/15
to Flir Lepton
Francis, I have not tried it myself.  But I'm sure that if you want to overlay text onto the thermal image, you can find a C library that works with it.  Otherwise, you can probably add some sort of widget.  Currently, raspberrypi_video has a button that allows you to perform an FFC.  If you want to reference that and add a widget like that, you can reference main.cpp in raspberrypi_video and search for the block of code under the comment "create a FFC button".  

Regards,
Justin

Francis Dominic

unread,
Aug 21, 2015, 7:51:11 PM8/21/15
to Flir Lepton
Hi Justin

I tried including the image by including some codes but I need to sharpen them.

Francis Dominic

unread,
Aug 21, 2015, 7:56:46 PM8/21/15
to Flir Lepton
Hi Peter

Thanks so much for this valuable piece of information

I will convert it into codes so that they go well with the GUI 

And also could you pls tell me the operating range of the thermal camera

robert hyde

unread,
Feb 29, 2016, 3:21:20 PM2/29/16
to Flir Lepton
Hi Francis did you manage to create a working code?

Francis Dominic

unread,
Feb 29, 2016, 8:44:00 PM2/29/16
to Flir Lepton
Hi

I tried but then found that its unnecessary

is it possible to run the thermal camera in Arduino UNO as the package comes with its example codes.


Ankur Parashar Dutta

unread,
Mar 10, 2016, 8:40:02 AM3/10/16
to Flir Lepton
pardon my stupidity, but, what does "x" in 0.05872x stand for?

Max Ritter

unread,
Mar 10, 2016, 9:33:43 AM3/10/16
to Flir Lepton
I implemented this for my DIY-Thermocam project (www.diy-thermocam.net):


The full source code is on Github, and you can find the calibration related stuff there: https://github.com/maxritter/DIY-Thermocam/blob/master/Thermal/Calibration.h


I am giving the Lepton some kind of warmup time (60s), because the relationship is only stable afterwards due to self-heating of the sensor. 




黄昌军

unread,
Sep 13, 2016, 5:55:41 AM9/13/16
to Flir Lepton
Hello Max,

How do you draw the color bar?
Is according the minValue and maxValue of each frame and refresh frequently?

Thanks and Regards,
Jakebo
Reply all
Reply to author
Forward
0 new messages