Image registrations between depthmap and it's corresponding image
Afficher commentaires plus anciens
Hello MATLAB community.
I need help in spatially register two images.
I have an image in colormap(MXNX3 unit8) and it's corresponding depthmap array(M*N double). The depthmap is spatially a bit off and I want to register them and save the output. I tried doing it in registerEstimator app. It thrown errors saying "Registration failed. Try improving the quality of the matched features."
The code I have also not registered properly. Need help please.
My code:
clc
close all
img1 = imread('.jpg');
load('.mat');
img2 = A;
figure(1),imagesc(img2); figure(2),imagesc(img1);
img1_gray = rgb2gray(img1);
fixed = img1_gray;
img2_double = im2double(img2);
moving = img2_double;
[optimizer, metric] = imregconfig('monomodal');
tform = imregtform(moving, fixed, 'translation', optimizer, metric);
registered = imwarp(moving, tform, 'OutputView', imref2d(size(moving)));
figure(3);
subplot(1,3,1); imshow(fixed); title('Fixed Image');
subplot(1,3,2); imshow(moving); title('Moving Image (Before)');
subplot(1,3,3); imshow(registered); title('Registered Image');
3 commentaires
Walter Roberson
le 9 Juil 2025
It would help to have your jpg and your mat for testing purposes.
Eswar
le 9 Juil 2025
Walter Roberson
le 9 Juil 2025
No.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Registration dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!