imregister translation mode, suppress registration in second direction

5 vues (au cours des 30 derniers jours)
Rene Riha
Rene Riha le 10 Mai 2019
Commenté : Matt J le 15 Mai 2019
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.

Réponse acceptée

Matt J
Matt J le 10 Mai 2019
Modifié(e) : Matt J le 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 commentaires
Rene Riha
Rene Riha le 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 le 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Geometric Transformation and Image Registration dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by