Image Registration step by step

조회 수: 15 (최근 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 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