Image registrations between depthmap and it's corresponding image
显示 更早的评论
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 个评论
Walter Roberson
2025-7-9
It would help to have your jpg and your mat for testing purposes.
Eswar
2025-7-9
Walter Roberson
2025-7-9
No.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Image Registration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!