Giter Club home page Giter Club logo

thermal-image-analysis's Introduction

Thermal Image Analysis

A tool for analyzing and annotating thermal images.

This repo relies on the thermal_base python package for image decoding and manipulation backend.

Quality check

Features


Main menu

Spot marking, line measurement and area marking

  • Extract the temperature values at marked spots
  • Plot temperature values along the marked line(s)
  • Get min, max and average values of marked regions

Generates a plot for line plots and a table for measurements in the marked regions.


Markings on the image.


Plots and measurements.

ROI scaling

Scale the entire image based on values in the marked region. Use to enhance low contrast areas.


ROI scaling interface.

Change colormap

Change colormap to one of the following options:


Change colormap.

Emissivity scaling

Change reflected apparent temperature and emissivity of marked region.


Emissivity scaling interface.

Save data

Image can be saved with or without markings, plots and values. Custom savefile(.pkl) saves all data and can be used to revive the previous session. New supported save extensions are :

  • CSV : Saves thermal values of a thermal image in Kelvin as a CSV format.
  • TIFF: Saves thermal values of a thermal image in Kelvin as a TIFF format.


Saving process.

Installation

  • Run installation once with pip install -r requirements.txt
  • Install exiftool

Usage

  • Run the program with python main.py
  • Select the original thermal image file or the custom saved .pkl file. (Find some samples in sample_images)

thermal-image-analysis's People

Contributors

lemorra avatar mrakshith95 avatar mukheshpugal avatar rakshith95 avatar rsnk96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

thermal-image-analysis's Issues

Support for Seek Shot Thermal Cameras

Shifting from 87b8e72#commitcomment-55263620 to the Issues section

Hi,

I´m interested in finding a thermal image analysis software that can use .hir files from Seek Shot camera. Can your software use this format?

Tks, Roger

Roger - Not familiar with the format, can you provide any sample images from the Seek Shot camera?

problems with pygame_gui on ubuntu

Thermal-Image-Analysis-master$ python3 main.py

pygame 2.6.0 (SDL 2.28.4, Python 3.12.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "/home/user/Thermal-Image-Analysis-master/main.py", line 9, in
import pygame_gui as pygui
File "/home/user/.local/lib/python3.12/site-packages/pygame_gui/init.py", line 7, in
from pygame_gui.ui_manager import UIManager
File "/home/user/.local/lib/python3.12/site-packages/pygame_gui/ui_manager.py", line 8, in
from pygame_gui.core.interfaces import IUIManagerInterface
File "/home/user/.local/lib/python3.12/site-packages/pygame_gui/core/init.py", line 1, in
from pygame_gui.core.ui_appearance_theme import UIAppearanceTheme
File "/home/user/.local/lib/python3.12/site-packages/pygame_gui/core/ui_appearance_theme.py", line 11, in
from pygame_gui.core.interfaces.gui_font_interface import IGUIFontInterface
File "/home/user/.local/lib/python3.12/site-packages/pygame_gui/core/interfaces/init.py", line 2, in
from pygame_gui.core.interfaces.font_dictionary_interface import IUIFontDictionaryInterface
File "/home/user/.local/lib/python3.12/site-packages/pygame_gui/core/interfaces/font_dictionary_interface.py", line 2, in
from pygame import DIRECTION_LTR
ImportError: cannot import name 'DIRECTION_LTR' from 'pygame' (/home/user/.local/lib/python3.12/site-packages/pygame/init.py)

Crash on Apple M1

Python[37635:313673] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SDLApplication macOSVersion]: unrecognized selector sent to instance 0x7fe9ea1dd020'

PIL.UnidentifiedImageError

Hi, I am trying to run the command:

python thermal_analysis.py <flir_image_path>

but its throwing this error:

PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x00000232575A1B88>

I did run requirements.txt and do the following:
Download exiftool ,
Extract 'exiftool(-k).exe' to the folder where I'm running the code from,
Rename it to 'exiftool.exe',
what do I do? Any kind of suggestions will be helpful. Thank you.

Request: Output to TIFF/geoTIFF with pixel values as temp in K (or C), and with

Hi, thanks for the program, It's really helpful! Not sure I'm doing this right as I'm a newbie to github, but I was wondering if there is a way to add the possibility for the output file from the tool to output a TIFF file where each pixel value is its temperature in Kelvin (probably better than C as minus temperatures will be tricky with pixel values I guess?)

Additionally, and this is probably more difficult, but if there is a way to use the metadata from the rjpg to georeference the output image that would be super helpful. I take images of forest areas, so location is really important. If I had that then I could input it into GIS software and perform the analysis from there without manual georeferencing which takes a lot of time and I have thousands of images.

I'm attaching an rjpg and accompanying visual image as an example of an image that I'd love to have in K pixel value and georeferenced.

DJI_0016
DJI_0015_R

Thanks again :)

Syntax error at line 361 main.py

Hi, there is syntax error when I try to run main.py, can you check?

File "main.py", line 361
self.renderText(self.overlays, f"l{self.lineNum}", center)
^
SyntaxError: invalid syntax

json.decoder.JSONDecodeError

Hi, I am trying to run the command:

python thermal_analysis.py <flir_image_path>

but its throwing this error:

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

what do I do? Any kind of suggestions will be helpful. Thank you.

Opening sequentialla all frames in a seq file

This project is very helpful for me. I’m using a FLIR thermal camera and want to analyze the movies with Python. With this code I can open the seq files directly in python. I want to extract temperatures within all frames of one movie, therefore I have to open all frames after each other. Until now, I don’t figured out, how I can open other frames than the first.
I don’t require it to be implemented into this code, because I only want to read in the frames an work with them in Python by numpy.
Can you tell me, how I can get access to the later frames?

Kind regards
Stefan Reich

'exiftool.exe' is not recognized as an internal command.

After run pip install -r requirements.txt, I tried to run the thermal_analysis.py script passing a jpg image as input. But I have the following error:

'exiftool.exe' is not recognized as an internal command. Traceback (most recent call last): File ".\thermal_analysis.py", line 25, in <module> obj = CFlir (flir_image_path,color_map=cv2.COLORMAP_JET) File "C:\Users\user\Documents\thermal\Thermal_Image_Analysis\CThermal.py", line 44, in __init__ self.thermal_np, self.raw_thermal_np, self.meta = self.extract_temperatures() File "C:\Users\user\Documents\thermal\Thermal_Image_Analysis\CThermal.py", line 145, in extract_temperatures meta = json.loads(meta_json)[0] File "C:\Users\user\OneDrive\Documents\Anaconda\envs\enviroment\lib\json\__init__.py", line 348, in loads return _default_decoder.decode(s) File "C:\Users\user\OneDrive\Documents\Anaconda\envs\enviroment\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\user\OneDrive\Documents\Anaconda\envs\enviroment\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

What exactly happened here?

How can I add any thermal image to your program?

How can I add any thermal image to your program? I added another thermal image and got the following error message: Invalid file selected. Please help me deal with this problem. Thank you !
howtofix

thermal image analysis to know the temprature on each pixel

hey, while, I am trying to add my IR thermal image to this software its giving me error "file format is not corrected". we have taken the photographs from DarVi Camera. I am attaching the picture along with this. please suggest me where I can change the code or what can I do in this.
IR_30708
IR_30740
IR_34568

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.