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 and Install
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). Links for downloading the Mac version and more information is available on the ExifTool site.
It also requires other python packages, matplotlib, numpy and pillow, which are installed when installed through pip.
sudo apt update
sudo apt install exiftool
pip install flirimageextractor
Usage
Example
import flirimageextractor
from matplotlib import cm
flir = flirimageextractor.FlirImageExtractor(palettes=[cm.jet, cm.bwr, cm.gist_ncar])
flir.process_image('examples/ax8.jpg')
flir.save_images()
flir.plot()
This script will show an interactive plot of the thermal image using matplotlib and save three image files ax8_thermal_jet.jpg, ax8_thermal_bwr.jpg, and ax8_thermal_gist_ncar.jpg.
Resulting Plot and Saved Images
Plot
Saved Images
The original temperature array is available using either 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 library.
The function save_image
saves the thermal image(s) in the same folder as the original image. By default it will output three images using the bwr
, gnuplot
, and gist_ncar
colormaps from matplotlib. You can define the pallete(s) that you would rather use when creating the class (see example). For a list of available matplotlib colormaps click here
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flirimageextractor-0.1.2.tar.gz
.
File metadata
- Download URL: flirimageextractor-0.1.2.tar.gz
- Upload date:
- Size: 6.0 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | c87e05ba339109f5413838be3d6a01df35ae3dca0712bc3be24f4b3ccc54d5f0 |
|
MD5 | 04cf8b910028bf0442f8936746661c19 |
|
BLAKE2b-256 | a474194eb9d5acd7867b5cb312e3a3edb795a7bd56182a1fdb9e27964bbb612e |
Provenance
File details
Details for the file flirimageextractor-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: flirimageextractor-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.6 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfd7d59afe224fc9d2dd28c56e2e9620ee5aad19869e9d1586e44e99bc036d34 |
|
MD5 | 14cb504e2aeb6d9d3e9e715636c0c09c |
|
BLAKE2b-256 | c143e68fa4a4ccbb0ad62aeff64183b211ac1490ef5d2dce6446d44243347a2c |