We humans cannot see the infrared spectrum, so we measure it and convert it to a colour pallet we can see. This can be very handy to check the temperature of things.

These infrared images can be very difficult to interpret. Three objects that are blue, green and red could all be transmitting the same amount of infrared radiation and therefore appear as one single color on an image, so we cannot distinguish them anymore.

What if we could enhance a thermal image by using information from the RGB? Luckily we can! FLIR has already developed a nice way to…

Photo by Daniel Gomez on Unsplash

For this tutorial you need Python, and two libraries, Numpy and OpenCV. Numpy is the golden standard when it comes to efficient arrays in Python and OpenCV is a computer vision library. It provides several handy tool that will make this tutorial quite easy.

I am not diving into the algorithms in this tutorial, but I provide links to the documentions.

Import statements + opening an image

We start with importing both libraries:

# Import necessary libraries
import cv2
import numpy as np

We can use the cv2 library to directly open an image:

# Opens an image with cv2
img = cv2.imread('DanielGomez.jpg')

Cv2 uses numpy…

Robert van de Vlasakker

Student Geoinformatics

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store