nationaldronesau/FlirImageExtractor

how apply FLIR palettes?

Closed this issue · 2 comments

how to apply FLIR palettes? for example iron.

You could try to use 'inferno' color map from matplotlib, it is similar to 'iron' from FlirTools.

  • EX
from matplotlib import cm
import flirimageextractor
from glob import glob
import os, requests

flir = flirimageextractor.FlirImageExtractor(palettes=[cm.bwr, cm.gnuplot2, cm.gist_ncar])
base_dir = os.path.realpath(os.path.dirname(__file__))

def test2():
    files = glob(f"{base_dir}/*.jpg")
    files = [texto.replace("\\", "/") for texto in files]
    files = [os.path.basename(file) for file in files]
    for file in files:
        print(file)
        try:
            flir.process_image(f"{base_dir}/{file}")
            flir.save_images()
            thermal=flir.get_thermal_np()
            flir.plot()
        except Exception as e:
            print(f"Error al procesar el archivo {file}: {e}")
    

test2()