imregister translation mode, suppress registration in second direction

16 ビュー (過去 30 日間)
Rene Riha
Rene Riha 2019 年 5 月 10 日
コメント済み: Matt J 2019 年 5 月 15 日
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 Center および File ExchangeGeometric 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