Image Registration step by step

16 次查看(过去 30 天)
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
Check this! it is a code from a PhD thesis in registration. https://sites.google.com/site/myronenko/research/mirt

类别

Help CenterFile Exchange 中查找有关 Geometric 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