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-
rgbImage = imread('rgbImage.jpg');
thermalImage = imread('thermalImage.jpg');
points1 = detectSURFFeatures(rgbImage);
points2 = detectSURFFeatures(thermalImage);
[features1, valid_points1] = extractFeatures(rgbImage, points1);
[features2, valid_points2] = extractFeatures(thermalImage, points2);
indexPairs = matchFeatures(features1, features2);
matchedPoints1 = valid_points1(indexPairs(:, 1), :);
matchedPoints2 = valid_points2(indexPairs(:, 2), :);
tform = estimateGeometricTransform(matchedPoints2, matchedPoints1, 'projective');
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