matlab 图像配准问题,有代码,配准区域是绿 {MOD}的,想要的是灰度图像的配准区域,求助大神?

2019-07-17 13:12发布

  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}的???

LATXD95}CAI9Q}RDCG85$~E.png
M[RS`HM{}DZHP@4%ZPHN(XD.png
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
1条回答
羊羊任阳阳
1楼-- · 2019-07-17 18:56
我有Matlab运行出结果的源代码,你可以对比看看

一周热门 更多>