Skip to main content

A package to get thermal information out of FLIR radiometric JPGs

Project description

Flir Image Extractor

FLIR® thermal cameras like the FLIR ONE® include both a thermal and a visual light camera. The latter is used to enhance the thermal image using an edge detector.

The resulting image is saved as a jpg image but both the original visual image and the raw thermal sensor data are embedded in the jpg metadata.

This small Python tool/library allows to extract the original photo and thermal sensor values converted to temperatures.

Requirements

This tool relies on exiftool. It should be available in most Linux distributions (e.g. as perl-image-exiftool in Arch Linux or libimage-exiftool-perl in Debian and Ubuntu).

It also needs the Python packages numpy and matplotlib (the latter only if used interactively).

sudo apt update
sudo apt install exiftool
sudo pip install numpy matplotlib

Usage

This module can be used by importing it:

import flir_image_extractor
flir = flir_image_extractor.FlirImageExtractor()
flir.process_image('examples/ax8.jpg')
flir.save_image('examples/ax8_thermal.jpg')
flir.plot()

This command will show an interactive plot of the thermal image using matplotlib and create two image files flir_example_thermal.jpg and flir_example_rgb_image.jpg. Both are RGB images, the original temperature array is available using the get_thermal_np or export_thermal_to_csv functions.

The functions get_rgb_np and get_thermal_np yield numpy arrays and can be called from your own script after importing this lib.

The function save_image saves the image at the given filepath

Supported/Tested cameras:

  • Flir One (thermal + RGB)
  • Xenmuse XTR (thermal + thumbnail, set the subject distance to 1 meter)
  • AX8 (thermal + RGB)

Other cameras might need some small tweaks (the embedded raw data can be in multiple image formats)

Credits

Raw value to temperature conversion is ported from this R package: https://github.com/gtatters/Thermimage/blob/master/R/raw2temp.R Original Python code from: https://github.com/Nervengift/read_thermal.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flirimageextractor-0.0.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

flirimageextractor-0.0.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file flirimageextractor-0.0.1.tar.gz.

File metadata

  • Download URL: flirimageextractor-0.0.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for flirimageextractor-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e7ff1038e3dead1e076cb0ef78000353985f5cda893d8aa9553cace6aedd2d23
MD5 ce684c81e00a239ff04e7bf9fa93966b
BLAKE2b-256 00be5a3b45cdd5b9a870f2de6880545f3620aef5aab2b79d1e1c90b71f46eec3

See more details on using hashes here.

Provenance

File details

Details for the file flirimageextractor-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: flirimageextractor-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for flirimageextractor-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8fde2785afae51e6642e6b99f37a6fff906b6655dbb19beb1ee9427988f7e8cc
MD5 9f4c8fc0c78a28332cf103f24f97613e
BLAKE2b-256 b68a1fef0378924c9dae5a803f9b11e681220b6531c7da2cab78b0a4be8dce00

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page