# Flir Image Extractor CLI
The email address attached to this on PyPi may not be monitored, open issues on the [GitHub repo](https://github.com/nationaldronesau/FlirImageExtractor) 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:
```bash
poetry install
poetry run flir-image-extractor
```
You can install the CLI using pip:
```bash
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](https://python-poetry.org//).
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:
- https://github.com/Nervengift/read_thermal.py
- https://github.com/detecttechnologies/thermal_base/
- https://github.com/SanNianYiSi/thermal_parser/
Raw data
{
"_id": null,
"home_page": null,
"name": "flirimageextractor",
"maintainer": "olawale williams",
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": "olawalewilliams9438@gmail.com",
"keywords": "extract-images, flir, thermal, flirtools",
"author": "National Drones",
"author_email": "development@nationaldrones.com",
"download_url": "https://files.pythonhosted.org/packages/e1/e5/61c17ff8a71e279989a3d8e7e5253327c949a9870ad73355a5696c1dd397/flirimageextractor-1.5.9.tar.gz",
"platform": null,
"description": "# Flir Image Extractor CLI\n\nThe email address attached to this on PyPi may not be monitored, open issues on the [GitHub repo](https://github.com/nationaldronesau/FlirImageExtractor) to ensure a response\n\nFeel 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.\n\nFLIR\u00ae thermal cameras like the FLIR ONE\u00ae include both a thermal and a visual light camera.\nThe latter is used to enhance the thermal image using an edge detector. The resulting image is saved as a\njpg image but both the original visual image and the raw thermal sensor data are embedded in the jpg metadata.\n\nThis 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.\n\n## Requirements and Install\n\nTo install and Run on Linux and windows if repo is cloned:\n\n```bash\npoetry install\npoetry run flir-image-extractor\n```\n\nYou can install the CLI using pip:\n\n```bash\npip install flirimageextractor or pip install --upgrade flirimageextractor (windows)\n```\n\n## Usage: Sample Basic code Snppet\n\n```\nimport numpy as np\nfrom flirimageextractor import FlirImageExtractor\n\nflir = FlirImageExtractor()\nflir.process_image(flir_img_file='images/DJI_H20T.jpg')\n# Save processed images and extract thermal data\nimages = flir.save_images(bytesIO=True)\ntemperature = flir.get_thermal_np()\n# Calculate and upload thermal data\nmax_temp, min_temp = np.amax(temperature), np.amin(temperature)\nprint(max_temp)\nprint(min_temp)\n```\n\n\n#### Resulting Plot and Saved Images\nThe 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.\n\n## Supported/Tested Cameras\n\n- FLIR R-JPEG Camera Model\n - FLIR\n - FLIR AX8\n - FLIR B60\n - FLIR E40\n - FLIR T640\n\n- DJI R-JPEG Camera Model\n - DJI H20T\n - DJI XT2\n - DJI XTR\n - DJI XTS\n - DJI R-JPEG Camera Model DTAT3.0\n\n- DJI M2EA / DJI MAVIC2-ENTERPRISE-ADVANCED\n - DJI H20N\n - DJI M3T / DJI MAVIC3\n - DJI M30T\n\nOther 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.\n\n## Development\nInstall the required packages using [Poetry](https://python-poetry.org//). \nNote 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.\n\n## Build Command for Dev (uses poetry or twine)\n- python -m build --sdist --wheel\n- poetry build\n- poetry add \"packagename\" --group=extras --optional\n- sphinx-build -b html docs/source docs/build (To Generate Docs)\n\n## Credits\n\nThis CLi was developed using this repos:\n- https://github.com/Nervengift/read_thermal.py\n- https://github.com/detecttechnologies/thermal_base/\n- https://github.com/SanNianYiSi/thermal_parser/\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A small tool/lib to read temperatures and original photos from FLIR\u00ae thermal camera images.",
"version": "1.5.9",
"project_urls": {
"Documentation": "https://github.com/nationaldronesau/FlirImageExtractor",
"Homepage": "https://github.com/nationaldronesau/FlirImageExtractor",
"Repository": "https://github.com/nationaldronesau/FlirImageExtractor"
},
"split_keywords": [
"extract-images",
" flir",
" thermal",
" flirtools"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "aa8b9d3e11a37bd508f46b5aafeb5381a6af7e4cdbf4002d3c397183c08fbe5b",
"md5": "23ddf79b50278418749b100178bb5bb7",
"sha256": "9bfd74eae31f5f4e3f4f26684abd769650e721c4f769d6160ec5e164d108c8af"
},
"downloads": -1,
"filename": "flirimageextractor-1.5.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "23ddf79b50278418749b100178bb5bb7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 39308,
"upload_time": "2025-01-27T05:06:24",
"upload_time_iso_8601": "2025-01-27T05:06:24.871167Z",
"url": "https://files.pythonhosted.org/packages/aa/8b/9d3e11a37bd508f46b5aafeb5381a6af7e4cdbf4002d3c397183c08fbe5b/flirimageextractor-1.5.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e1e561c17ff8a71e279989a3d8e7e5253327c949a9870ad73355a5696c1dd397",
"md5": "4a988fe16400618cb9e2af85b7c487ba",
"sha256": "d973098d2a87ec8961508f8d2a66d9f6dc6dc4ae86ca146a2d79bc7e8cb01ad2"
},
"downloads": -1,
"filename": "flirimageextractor-1.5.9.tar.gz",
"has_sig": false,
"md5_digest": "4a988fe16400618cb9e2af85b7c487ba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 34111,
"upload_time": "2025-01-27T05:06:27",
"upload_time_iso_8601": "2025-01-27T05:06:27.039214Z",
"url": "https://files.pythonhosted.org/packages/e1/e5/61c17ff8a71e279989a3d8e7e5253327c949a9870ad73355a5696c1dd397/flirimageextractor-1.5.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-27 05:06:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nationaldronesau",
"github_project": "FlirImageExtractor",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "matplotlib",
"specs": [
[
"==",
"3.5.3"
]
]
},
{
"name": "sphinx",
"specs": [
[
"==",
"5.3.0"
]
]
},
{
"name": "black",
"specs": [
[
"==",
"23.3.0"
]
]
},
{
"name": "numpy",
"specs": [
[
"==",
"1.21.1"
]
]
},
{
"name": "pillow",
"specs": [
[
"==",
"9.5.0"
]
]
},
{
"name": "m2r",
"specs": [
[
"==",
"0.3.1"
]
]
},
{
"name": "keyring",
"specs": [
[
"==",
"23.13.1"
]
]
},
{
"name": "pre-commit",
"specs": [
[
"==",
"2.21.0"
]
]
},
{
"name": "loguru",
"specs": [
[
"==",
"0.7.0"
]
]
},
{
"name": "wxpython",
"specs": [
[
"==",
"4.2.0"
]
]
},
{
"name": "logzero",
"specs": [
[
"==",
"1.7.0"
]
]
},
{
"name": "opencv_python",
"specs": [
[
"==",
"4.5.1.48"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.28.2"
]
]
},
{
"name": "tqdm",
"specs": [
[
"==",
"4.65.0"
]
]
}
],
"lcname": "flirimageextractor"
}