Skip to main content

A library from extracting temperature values from FLIR IRT Images.

Project description

flirextractor

A library from extracting temperature values from FLIR IRT Images.

Differences from existing libraries

There is an existing Python package for extracting temperature values from raw IRT images, see nationaldronesau/FlirImageExtractor. However, it has some issues that I didn't like:

  • Most importantly, it is forked from the UNLICENSED Nervengift/read_thermal.py, so until Nervengift/read_thermal.py#4 is answered, this package cannot be legally used.
  • Secondly, it is quite inefficient, as it runs a new exiftool process for each image, and it converts the temperature for each pixel, instead of using numpy's vectorized math.

Installing

You can install flirextractor from pip.

pip3 install flirextractor

Make sure you install exiftool as well.

On RHEL, this can be installed via:

sudo yum install perl-Image-ExifTool

On debian, this can be installed via:

sudo apt update && sudo apt install libimage-exiftool-perl -y

Usage

Data is loaded in Celcius as 2-dimensional numpy.ndarrays.

To load data from a single FLIR file, run:

from flirextractor import FlirExtractor
with FlirExtractor() as extractor:
    thermal_data = extractor.get_thermal("path/to/FLIRimage.jpg")

Data can also be loaded from multiple FLIR files at once in batch mode, which is slightly more efficient:

from flirextractor import FlirExtractor
with FlirExtractor() as extractor:
    list_of_thermal_data = extractor.get_thermal_batch(
        ["path/to/FLIRimage.jpg", "path/to/another/FLIRimage.jpg"])

Testing

Use the Python package manager poetry to install test dependecies:

poetry install

Then run pytest to run tests.

poetry run pytest

Run mypy to run type tests:

poetry run mypy -p flirextractor

Run black to auto-format code:

poetry run black .

And run flake8 to test for anything black missed:

poetry run flake8 tests/ flirextractor/

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

flirextractor-0.1.0.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

flirextractor-0.1.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file flirextractor-0.1.0.tar.gz.

File metadata

  • Download URL: flirextractor-0.1.0.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.6.8 Linux/3.10.0-1062.1.2.el7.x86_64

File hashes

Hashes for flirextractor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 54f3fb870a3ab22355a6bc5d1364ca7064b2e1f5a294de86b36a594e9569efa5
MD5 ba732aff24e8bf19f8fb9217e7b77264
BLAKE2b-256 3159ce3d428b33af43c2026f3efb2d673c495b68637d277f7b089a8de3ac07a6

See more details on using hashes here.

File details

Details for the file flirextractor-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: flirextractor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.6.8 Linux/3.10.0-1062.1.2.el7.x86_64

File hashes

Hashes for flirextractor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 039a1b194aa2319a7c29e7963a395c4051e61e5748337bda979d91d326ed1854
MD5 6cd4959238f6aa87821cde0d9cb03ddd
BLAKE2b-256 11b7e1e8516032c7c84bd5db6be6ff39977199b2aab01216f52c45f485bb4a5d

See more details on using hashes here.

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