Skip to content

Decoding and common processing for thermographs / thermograms. Currently supports FLIR's TIFF and PNG encoded metadata, and DJI-encoded metadata

License

Notifications You must be signed in to change notification settings

detecttechnologies/thermal_base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base codes for Thermography

A python package for decoding and common processing for thermographs / thermograms

Quality check

Install

  1. This tool requires exiftool to be installed.
  2. This tool also requires you to have Python 3+ installed. You can install it from the official website (https://www.python.org/downloads/)
  3. Install this package with python3 -m pip install git+https://github.com/detecttechnologies/thermal_base.git@main

Usage

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.

Supported formats

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

Notes

  • 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.

Credits

  • 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

About

Decoding and common processing for thermographs / thermograms. Currently supports FLIR's TIFF and PNG encoded metadata, and DJI-encoded metadata

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages