Skip to main content

A small tool/lib to read temperatures and original photos from FLIR® thermal camera images.

Project description

Flir Image Extractor CLI

The email address attached to this on PyPi may not be monitored, open issues on the GitHub repo to ensure a response

Feel free to submit any pull requests or issues, this is in active development. Also let me know if you are successful in using this on cameras not listed below.

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 Python CLI that allows you to extract the original photo and thermal sensor values converted to temperatures, normalize the temperature range and output the photos to different color maps.

Requirements and Install

To install and Run on Linux and windows if repo is cloned:

poetry install
poetry run flir-image-extractor

You can install the CLI using pip:

pip install flirimageextractor or pip install --upgrade flirimageextractor (windows)

Usage: Sample Basic code Snppet

import numpy as np
from flirimageextractor import FlirImageExtractor

flir = FlirImageExtractor()
flir.process_image(flir_img_file='images/DJI_H20T.jpg')
# Save processed images and extract thermal data
images = flir.save_images(bytesIO=True)
temperature = flir.get_thermal_np()
# Calculate and upload thermal data
max_temp, min_temp = np.amax(temperature), np.amin(temperature)
print(max_temp)
print(min_temp)

Resulting Plot and Saved Images

The CLI is able to output 3 folders of images with the bwr, gnuplot, and gist_ncar colormaps from matplotlib. You can define the pallete(s) that you would rather use.

Supported/Tested Cameras

  • FLIR R-JPEG Camera Model

    • FLIR
    • FLIR AX8
    • FLIR B60
    • FLIR E40
    • FLIR T640
  • DJI R-JPEG Camera Model

    • DJI H20T
    • DJI XT2
    • DJI XTR
    • DJI XTS
    • DJI R-JPEG Camera Model DTAT3.0
  • DJI M2EA / DJI MAVIC2-ENTERPRISE-ADVANCED

    • DJI H20N
    • DJI M3T / DJI MAVIC3
    • DJI M30T

Other cameras might need some small tweaks (the embedded raw data can be in multiple image formats). Let me know if you succesfully use other cameras so they can be added to this list.

Development

Install the required packages using Poetry. Note that this tool is intended to work on Windows as well as Unix operating systems so use os.path functions to manipulate file paths instead of string manipulation.

Build Command for Dev (uses poetry or twine)

  • python -m build --sdist --wheel
  • poetry build
  • poetry add "packagename" --group=extras --optional
  • sphinx-build -b html docs/source docs/build (To Generate Docs)

Credits

This CLi was developed using this repos:

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-1.5.9.tar.gz (34.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flirimageextractor-1.5.9-py3-none-any.whl (39.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flirimageextractor-1.5.9.tar.gz
  • Upload date:
  • Size: 34.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for flirimageextractor-1.5.9.tar.gz
Algorithm Hash digest
SHA256 d973098d2a87ec8961508f8d2a66d9f6dc6dc4ae86ca146a2d79bc7e8cb01ad2
MD5 4a988fe16400618cb9e2af85b7c487ba
BLAKE2b-256 e1e561c17ff8a71e279989a3d8e7e5253327c949a9870ad73355a5696c1dd397

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flirimageextractor-1.5.9-py3-none-any.whl
Algorithm Hash digest
SHA256 9bfd74eae31f5f4e3f4f26684abd769650e721c4f769d6160ec5e164d108c8af
MD5 23ddf79b50278418749b100178bb5bb7
BLAKE2b-256 aa8b9d3e11a37bd508f46b5aafeb5381a6af7e4cdbf4002d3c397183c08fbe5b

See more details on using hashes here.

Supported by

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