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!