Image Registration step by step

7 ビュー (過去 30 日間)
rob
rob 2013 年 10 月 31 日
回答済み: Ibraheem Al-Dhamari 2015 年 7 月 9 日
Hi
I want to add my own transformation type for an image registration(differing from affine or rigid). Does anyone have step by code for registration in which this is possible? Also i had like to implement my own similarity measure. Tips or code anyone? It is for contourtracking in greyscale images.
grtz
Rob

採用された回答

rob
rob 2013 年 10 月 31 日
Well I am first sampling along a contour on my fixed image. All the moving images are also sampled on this contour. This ensures that in theory the contour that i want to track is only moving vertically. So in the registration it is not really affine because there is out of plane motion. But there is not enough out of plane resolution to use 3D registration. It is a time series. So optic flow might be an option. I am using the b-spline model at this point but i need to make a grid which moves in the way i want it to(other constrictions). Or i need to adjust the affine transformation in such a way that it only registers vertical shifts and does not do anything horizontally(x direction)
  2 件のコメント
Alex Taylor
Alex Taylor 2013 年 10 月 31 日
Right. Since you are using a non-rigid model (bsplines, optical flow, etc.), you should take a look at Steve's blog post on how to define custom transformation models:
This will be useful in representing and applying the displacement field in the maketform/imtransform framework.
rob
rob 2013 年 10 月 31 日
Thank you! I will look into it and hopefully understand it. Ok if otherwise i post questions here?

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

その他の回答 (4 件)

Matt J
Matt J 2013 年 10 月 31 日
編集済み: Matt J 2013 年 10 月 31 日
yes but i'd like to see a basic code on how to do this.
The most basic way you could implement your own SSD registration is as follows.
ssd=@(z)norm(z(:))^2;
fun=@(parameters) ssd(imtransform(Image1,...more arguments...) -Image2);
transformParameters = fminsearch(fun,options);
If you have many parameters (more than 6), you won't get very robust convergence with fminsearch. You could instead use a solver in the Optimization Toolbox if you have it. In the latter case, though, you should be careful to apply imtransform with spline interpolation, since the cost function needs to be differentiable.
The Optimization Toolbox solvers could be somewhat slow if you let them use finite difference derivative calculations (the default). You can supply your own cost function gradient computation, with some work using custom interpolants in MAKERESAMPLER.
  1 件のコメント
rob
rob 2013 年 10 月 31 日
thank you for a constructive answer, i am going to look into this!

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


Image Analyst
Image Analyst 2013 年 10 月 31 日
You're free to write your own customized function that registers images according to any wild and crazy function that you want. How can I have step by step code for doing some kind of registration for some unknown method? You must have something in mind because you clearly don't like any of the built in methods, so just go for it.
  5 件のコメント
Image Analyst
Image Analyst 2013 年 10 月 31 日
Well why do you think you need something different than the standard methods in the first place? What's wrong with them?
rob
rob 2013 年 10 月 31 日
well i don't want an affine i want in the x direction to search the new y coordinates on a composition of sines and cosines.

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


Alex Taylor
Alex Taylor 2013 年 10 月 31 日
編集済み: Alex Taylor 2013 年 10 月 31 日
I would just add a few things:
1) Can you elaborate on what kind of transform model you want to use instead of rigid? Are you trying to do some sort of deformable model registration?
2) What kind of similarity model do you want to use?
3) Is the transformation model that you want to use provided by imregister/imregtform? imregister and imregtform implement sum of square differences and Mutual Information as similarity metrics and offer translation, rigid, similarity, and affine transformation models?
4) Note that in Matt's answer, if the type of transformation you want to use isn't supported by any of the built-in transformations in maketform, you are going to need to use the 'custom' option in maketform to define your own custom geometric transformation.

Ibraheem Al-Dhamari
Ibraheem Al-Dhamari 2015 年 7 月 9 日
Check this! it is a code from a PhD thesis in registration. https://sites.google.com/site/myronenko/research/mirt

カテゴリ

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