# 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).
```bash
# sudo apt update
# sudo apt install exiftool
# sudo pip install numpy matplotlib
```
## Usage
This module can be used by importing it:
```python
import flir_image_extractor
fir = flir_image_extractor.FlirImageExtractor()
fir.process_image('examples/ax8.jpg')
fir.plot()
```
Or by calling it as a script:
```bash
python flir_image_extractor.py -p -i 'examples/zenmuse_xtr.jpg'
```
```bash
usage: flir_image_extractor.py [-h] -i INPUT [-p] [-exif EXIFTOOL]
[-csv EXTRACTCSV] [-d]
Extract and visualize Flir Image data
optional arguments:
-h, --help show this help message and exit
-i INPUT, --input INPUT
Input image. Ex. img.jpg
-p, --plot Generate a plot using matplotlib
-exif EXIFTOOL, --exiftool EXIFTOOL
Custom path to exiftool
-csv EXTRACTCSV, --extractcsv EXTRACTCSV
Export the thermal data per pixel encoded as csv file
-d, --debug Set the debug flag
```
This command will show an interactive plot of the thermal image using matplotlib and create two image files *flir_example_thermal.png* 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.
## 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
没有合适的资源?快使用搜索试试~ 我知道了~
从 FLIR热像仪图像中读取温度和原始照片_python_代码_下载
共7个文件
jpg:3个
py:2个
license:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 25 下载量 151 浏览量
2022-06-15
01:13:17
上传
评论 11
收藏 891KB ZIP 举报
温馨提示
Flir 图像提取器 FLIR热像仪(如 FLIR ONE)包括热像仪和可见光热像仪。后者用于使用边缘检测器增强热图像。 生成的图像保存为 jpg 图像,但原始视觉图像和原始热传感器数据都嵌入在 jpg 元数据中。 这个小型 Python 工具/库允许提取转换为温度的原始照片和热传感器值。 测试的相机: Flir One(热敏 + RGB) Xenmuse XTR(热成像+缩略图,将被摄体距离设置为 1 米) AX8(热 + RGB) 其他相机可能需要一些小的调整(嵌入的原始数据可以是多种图像格式)
资源推荐
资源详情
资源评论
收起资源包目录
read_thermal.py-master.zip (7个子文件)
read_thermal.py-master
README.md 3KB
examples
ax8.jpg 135KB
flir_example.jpg 267KB
zenmuse_xtr.jpg 770KB
LICENSE 7KB
flir_image_extractor.py 11KB
__init__.py 0B
共 7 条
- 1
快撑死的鱼
- 粉丝: 1w+
- 资源: 9156
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
前往页