imregister translation mode, suppress registration in second direction

5 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

Matt J
Matt J am 10 Mai 2019
Bearbeitet: Matt J am 10 Mai 2019
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 Kommentare
Rene Riha
Rene Riha am 14 Mai 2019
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 am 15 Mai 2019
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Geometric Transformation and Image Registration finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by