Thermal image - color to temperature

Convert a pseudocolored RGB thermal image from a thermal camera, using the embedded color bar, into a temperature image.
339 Downloads
Updated 6 Jun 2023

View License

Input is a thermal RGB image from a thermal camera, such as the FLIR One camera, that has a pseudocolored image and a colorbar all in the same image. User is asked to draw a rectangle around the thermal image part of the image, and a rectangle around the colorbar part of the image. User is asked for the min and max temperatures at the end of the colorbar. It then uses the embedded color bar to create a mapping of RGB color into temperatures in degrees F or C. It then determines temperatures, in those calibrated units, from the pixel color for every pixel in the image and makes a temperature image. The output temperature image is a 2-D floating point matrix where the pixel values are in units of degrees, rather than RGB color levels.

Cite As

Image Analyst (2024). Thermal image - color to temperature (https://www.mathworks.com/matlabcentral/fileexchange/113995-thermal-image-color-to-temperature), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023a
Compatible with R2018b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.2

Bug fix. Now use uigetfile() instead of uiputfile() when specified input image does not exist and user needs to browse for one.

1.0.1

Description edits only - no code changes.

1.0.0