Hi. I want increase the geometrical resolution of a thermal image by matching it with an RGB image of the same object, but keeping thermal information. How can I do?

2 views (last 30 days)
I have to create a 3D model of a building using thermal images and I need to increase geometrical resolution of the thermal images. I was thinking of doing it by matching the thermal images with corresponding RGB images captured by a digital camera. Doing this, i would keep the characteristics of thermal image, so temperature information, color palette, ecc. How can i do this?

Answers (1)

Simar
Simar on 7 May 2024
Edited: Simar on 8 May 2024
Hi Federico,
I understand that you are creating 3D model of building using thermal images and aim to enhance geometrical resolution of the thermal images. This process is referred to as image fusion or multimodal image registration and fusion, which combines high-resolution spatial details from RGB images with thermal characteristics from thermal images.
Here is a step-by-step approach using MATLAB, which is well-suited for image processing and computer vision tasks:
Step 1: Image Acquisition
Ensure for every thermal image, a corresponding high-resolution RGB image should be available, ideally captured from the same or a similar viewpoint. This alignment simplifies registration process between two image types.
Step 2: Image Preprocessing
Preprocess both sets of images to make them more compatible for matching:
  • Geometric Alignment: If images originate from different viewpoints, geometric transformation is necessary for alignment. This alignment can be achieved either manually or via feature detection algorithms.
  • Rescaling: Adjust RGB images resolution to closely match that of thermal images prior to proceeding with additional processing steps.
Step 3: Image Registration
Image registration involves aligning two images- thermal and RGB, in this context ensuring corresponding points across images match.Image Processing Toolbox in MATLAB offers tools such as “imregister” for direct alignment or feature-based methods like “detectSURFFeatures” and “matchFeatures” for automated processing.
Example Code-
% Example of feature-based registration
rgbImage = imread('rgbImage.jpg');
thermalImage = imread('thermalImage.jpg');
% Detect features
points1 = detectSURFFeatures(rgbImage);
points2 = detectSURFFeatures(thermalImage);
% Extract features
[features1, valid_points1] = extractFeatures(rgbImage, points1);
[features2, valid_points2] = extractFeatures(thermalImage, points2);
% Match features
indexPairs = matchFeatures(features1, features2);
matchedPoints1 = valid_points1(indexPairs(:, 1), :);
matchedPoints2 = valid_points2(indexPairs(:, 2), :);
% Estimate transform
tform = estimateGeometricTransform(matchedPoints2, matchedPoints1, 'projective');
% Warp thermal image to match RGB image
registeredThermalImage = imwarp(thermalImage, tform, 'OutputView', imref2d(size(rgbImage)));
Step 4: Image Fusion
Following registration, subsequent phase involves fusing images. Objective is to improve resolution of thermal image while retaining its thermal characteristics. Techniques ranging from simple averaging to more advanced methods such as Laplacian Pyramids can be employed. These can be executed through fundamental operations.
Step 5: 3D Model Creation
Upon enhancing thermal images, construct the 3D model. integration of thermal information into 3D modelling process varies based on the intended application. Compatibility with chosen 3D modelling software may require exporting processed images in suitable format.
Step 6: Application of Thermal Images on 3D Model
Finally, map the enhanced thermal images onto the3D model. This could involve UV mapping or other techniques depending on the 3D software. Goal is to overlay thermal texture onto the model surfaces accurately.
This process requires image processing and some manual tweaking to get the best results. Please refer to the following documentation links-
Hope this helps!
Best Regards,
Simar

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!