fixed = rgb2gray(imread('1-60.bmp'));
moving = rgb2gray(imread('1-120.bmp'));
% View misaligned images 图片不一致
figure,imshowpair(fixed, moving,'blend','Scaling','independent');
title('两图差别');
% Get a configuration suitable for registering images from different
% sensors.
[optimizer, metric] = imregconfig('monomodal');
% Tune the properties of the optimizer to allow for more iterations
% and reduce the initial step size we will take in parameter space so
% that the registration will converge to a global maxima of mutual
% information.
optimizer.MaximumIterations = 300; %最大迭代次数
% optimizer.InitialRadius = 3.5e-3;
% Align the moving image with the fixed image
movingRegistered = imregister(moving, fixed, 'affine', optimizer, metric);
% View registered images
figure,
imshowpair(fixed, movingRegistered,'Scaling','joint');
title('配准完成');
set(gca,'units','pixels','Visible','off');
frame=getframe;
im1=frame2im(frame);
imwrite(im1,'peizhun0.jpg','jpg');
[img]file:///C:UsersAdministratorAppDataRoamingTencentUsers596422868QQWinTempRichOleM[RS`HM{}DZHP@4%ZPHN(XD.png[/img]
[img]file:///C:UsersAdministratorAppDataRoamingTencentUsers596422868QQWinTempRichOleM[RS`HM{}DZHP@4%ZPHN(XD.png[/img]
想求助下怎么把 配准图片配准区域是原灰度值图片而不是绿 {MOD}的???
-
-
一周热门 更多>