Problem accessing the deformation map in image registration (using imregister, Matlab 2013a)

Hi,
I need to estimate the deformation map of an image. I tried using imregister, which worked fine: the images are correctly registered using an affine transform, and I obtain an imref2d object along with it. The problem is that I cannot get the deformation map out of this imref2d object. Here is how I proceeded (from 32 x 32 images):
load data.m % loads the images 'moving' and 'fixed'
[optimizer,met] = imregconfig('multimodal')
optimizer.InitialRadius = 8e-4; % change required for convergence
[im,r_reg] = imregister(moving,fixed,'affine',optimizer,met);
x = 1:32;
y = 1:32;
[X,Y] = meshgrid(x,y);
[r,c] = intrinsicToWorld(r_reg,X(:),Y(:));
The coordinates [r,c] are exactly the same as [X(:),Y(:)] even though the images are very different (one is a circle, the other is a twisted ellipse). What am I doing wrong? Has anyone used these imref2d objects before?
LB

1 件のコメント

Simson Hutagalung
Simson Hutagalung 2022 年 6 月 24 日
How to generate deformation colormap 2D in matlab with data from excel?

サインインしてコメントする。

回答 (2 件)

David Young
David Young 2014 年 12 月 11 日

1 投票

I think from the documentation you need imregtform() rather than imregister() to get the transform itself rather than the result of applying it.

1 件のコメント

Sean de Wolski
Sean de Wolski 2014 年 12 月 11 日
Yes, you can then pass the transformation matrix into imwarp directly.

サインインしてコメントする。

Lionel
Lionel 2014 年 12 月 12 日

0 投票

Thanks for the answer, imregtform does work very well indeed!

1 件のコメント

Sean de Wolski
Sean de Wolski 2014 年 12 月 12 日
Please accept David's answer to mark the question complete!

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeGeometric Transformation and Image Registration についてさらに検索

製品

質問済み:

2014 年 12 月 11 日

コメント済み:

2022 年 6 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by