imregister translation mode, suppress registration in second direction

5 次查看(过去 30 天)
Hello,
is possilble to suppress second shift direction in imregister function during 'tranlastion' mode? I have some images with moving feature but only in one direction, for example x direction, and need to do registration only in this direction. Usually it works good but sometimes there is also unwanted registration in y direction. Thanks.

采纳的回答

Matt J
Matt J 2019-5-10
编辑:Matt J 2019-5-10
One hack that I can think of (and I emphasize that it is only a hack) is to deliberately corrupt the images with bright horizontal line patterns and apply imregtform. That way, a strong gradient against shifts in the y-direction will be introduced into the registration cost function. I illustrate this in the example below where the true translation is [10,0.6], but with this technique the registration is forced to reach a translation estimate in which the y-component is greatly suppressed. It should work even better, however, in your case where the true translation really does have y=0.
%% Simulation
moving = dicomread('knee1.dcm');
fixed=imtranslate(moving,[10,0.6]);
[optimizer, metric] = imregconfig('monomodal');
%% Corrupt the images with bright horizontal lines
Mcorr=moving; Mcorr(1:2:end,:)=3000;
Fcorr=fixed; Fcorr(1:2:end,:)=3000;
tform0 = imregtform(moving, fixed,'translation',optimizer,metric);
tform = imregtform(Mcorr,Fcorr,'translation',optimizer,metric);
base_tform = tform0.T,
constrained_tform = tform.T
The results are
base_tform =
1.0000 0 0
0 1.0000 0
10.0000 0.6000 1.0000
constrained_tform =
1.0000 0 0
0 1.0000 0
9.9149 0.0033 1.0000
  4 个评论
Rene Riha
Rene Riha 2019-5-14
What I can do is also just simply put tform.T(3,2)=0, use the imwarp_same function and y shift disappears completely.
Matt J
Matt J 2019-5-15
You can do that and it might be adequate for you, but my suggested approach is much closer to actually limiting the tform model to a 1D translation.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Geometric Transformation and Image Registration 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by