Giter VIP home page Giter VIP logo

read_thermal.py's Introduction

Background

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.

Usage

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).

Calling it as python read_thermal.py flir_example.jpg will show an interactive plot of the thermal image using matplotlib and create two image files flir_example_thermal.png and flir_example_visual.jpg. Both are RGB images, the original temperature array is only available using the extract_thermal function.

The functions extract_thermal and extract_visual yield numpy arrays and can be called from your own script after importing this lib.

Known bugs

I only tested this on photos taken with a FLIR ONE®. Other cameras might need some small tweaks (the embedded raw data can be in multiple image formats, I only support png thermal and jpg visual for now)

Credits

Raw value to temperature conversion is ported from this R package: https://github.com/gtatters/Thermimage/blob/master/R/raw2temp.R

read_thermal.py's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.