registration of two images i done but it required more execution time, please provide another code?
2 次查看(过去 30 天)
显示 更早的评论
% Image Registration
clc;
clear all;
close all;
fixed = imread('high.jpg');
% figure(),imshow(fixed);
moving = imread('low.jpg');
figure, imshowpair(moving, fixed, 'montage')
title('Unregistered');
[optimizer,metric] = imregconfig('multimodal');
movingRegisteredDefault = imregister(moving, fixed, 'affine', optimizer, metric);
% % figure, imshowpair(movingRegisteredDefault, fixed);
% title('A: Default registration');
% disp(optimizer);
% disp(metric);
optimizer.InitialRadius = optimizer.InitialRadius/3.5;
movingRegisteredAdjustedInitialRadius = imregister(moving, fixed, 'affine', optimizer, metric);
% figure, imshowpair(movingRegisteredAdjustedInitialRadius, fixed);
% title('Adjusted InitialRadius');
optimizer.MaximumIterations = 300;
movingRegisteredAdjustedInitialRadius300 = imregister(moving, fixed, 'affine', optimizer, metric);
% figure, imshowpair(movingRegisteredAdjustedInitialRadius300, fixed)
% title('B: Adjusted InitialRadius, MaximumIterations = 300, Adjusted InitialRadius.');
tformSimilarity = imregtform(moving,fixed,'similarity',optimizer,metric);
Rfixed = imref2d(size(fixed));
movingRegisteredRigid = imwarp(moving,tformSimilarity,'OutputView',Rfixed);
% figure, imshowpair(movingRegisteredRigid, fixed);
tformSimilarity.T
movingRegisteredAffineWithIC = imregister(moving,fixed,'affine',optimizer,metric,...
'InitialTransformation',tformSimilarity);
figure(),
imshowpair(movingRegisteredAffineWithIC, fixed)
imwrite(movingRegisteredAffineWithIC,'Regi.jpg');
0 个评论
采纳的回答
Matt J
2015-4-7
There are lots of registration routines offered on the File Exchange that you could browse,
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!