How do I map grayscale values to get temperature?

66 views (last 30 days)
PRAVEEN KUMAR
PRAVEEN KUMAR on 20 May 2022
Commented: Walter Roberson on 22 May 2022
In the attached file I have shown the thermal image clicked during live preview from my camera.
I am able to fetch the Minimum, Maximum, and Mean Grayscale Level values along with GL value at Center (Blue Circle) at backend continuously in live video.
I want to know if I can use these GL values to get corresponding temperature with any equation or any function.
Also can you suggest anything else that I can use for this purpose?

Answers (2)

Walter Roberson
Walter Roberson on 20 May 2022
"I want to know if i can use these GL values to get corresponding temperature with any equation or any function."
No, there is way to do that based on the grayscale level. That colormap is not linear in grayscale brightness.
  6 Comments
Walter Roberson
Walter Roberson on 22 May 2022
PureThermal is a FLIR camera.
There is no possibility that converting a color FLIR image to grayscale will work properly for your purposes. FLIR does not use a linear colormap.
If I understand correctly, PureThermal (without the 2 of PureThermal2) is a board with a sensor and a FLIR Lepton socket. In particular, as far as I can see, it is not one of FLIR's cameras that has WiFi.
If my understanding is correct, then you have three choices:
  1. calibrate your equipment in order to determine the color to temperature mapping. I am not confident this will work: based on my past reading about FLIR, the lower-end devices appear to automatically determine temperature range to use. However, you might succeed in determining the colormap, and then for any given image if you have two calibrated spots you could determine the rest of the temperatures; OR
  2. You can purchase the FLIR research software;
  3. You might be able to take the sensor and Lepton module and put it into a development board that provides better software
If using the FLIR research software is not an option, then adding another development board is probably not an option; then your only option might be calibration overall, together with having two points of known temperature in each image.
FLIR sells at different price-points, and it is deliberate that their less-expensive equipment makes it difficult to get actual temperature data out.

Sign in to comment.


Image Analyst
Image Analyst on 22 May 2022
See attached demo and adapt as needed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!