A python package for decoding and common processing for thermographs / thermograms
- This tool requires exiftool to be installed.
- Linux: Run command
sudo apt-get install exiftool
- Windows: Download binary from https://exiftool.org/
- Linux: Run command
- This tool also requires you to have Python 3+ installed. You can install it from the official website (https://www.python.org/downloads/)
- Install this package with
python3 -m pip install git+https://github.com/detecttechnologies/thermal_base.git@main
Import and use the package as follows:
- Decoding
from thermal_base import ThermalImage
image = ThermalImage(image_path="path/to/image", camera_manufacturer="dji/flir")
thermal_np = image.thermal_np # The temperature matrix as a np array
raw_sensor_np = image.raw_sensor_np # The raw thermal sensor excitation values as a np array
meta = image.meta # Any other metadata that exiftool picked up
- Manipulation
from thermal_base import utils
print(dir(utils)) # View manipulation tools available
thermal_np = utils.change_emissivity_for_roi(...) # Sample: Change the emissivity of an RoI
This repo can be used in conjunction with Thermal-Image-Analysis for an interactive experience.
Data Format | Sample Cameras | Support |
---|---|---|
FLIR RJPG with TIFF-format of thermal embedding | Zenmuse XT-2 | ✔️ |
FLIR RJPG with PNG-format of thermal embedding | FLIR E-4, T640, T660 | ✔️ |
DJI-encoded thermal image | Zenmuse H20-T | ✔️ |
FLIR SEQ Thermal Video | Zenmuse XT-2 | ✔️ |
FLIR CSQ Thermal Video | Zenmuse XT-2 | ❌ |
Seek HIR Format Images | Seek Shot | ❌ |
*RJPG is also known as R-JPEG
- The use case for h20T camera can also be developed with dji-thermal-tool-analysis. Refer to this link to know more about the implementation. Also note that this method can be performed only with a 32 bit python interpreter and only on windows platform.
- Exiftool is used to read metadata and raw values from thermal image files.
- The
flyr_unpack.py
file for PNG-encoded FLIR metadata was derived from the flyr library. - The conversion from raw to temperature values is done using raw2temp from ThermImage-R