[Insight-users] ICP Registration
Luis Ibanez
luis.ibanez at kitware.com
Tue Feb 5 09:18:51 EST 2008
Hi Josiane,
Please find below some comments that may help you interpret
the output of the IterativeClosestPoint1.cxx example:
1) The multiple error and position values should look like:
Value =
[0.0340726, 0.0340726, 0.0340726, 0.0340726,
0.0340719, 0.0340723, 0.0340723, 0.0340726]
Position = [-1.97591, -1.97591]
Where "Value" of the metric has multiple numbers. Each number
correspond to pair of points in the correspondances built by ICP.
The number itself is the squared distance between the two point
(if you called ComputeSquaredDistanceOn() in the metric), or
it is the distance between the two points in the pair (if you
called ComputeSquaredDistanceOff() in the metric).
The "Position" two values are the translation in X and translation
in Y that are currently being used by the Optimizer.
2) The final values that you get are:
Solution = [-1.99999, -1.99999]
These are, againg, Translation in X and Translation in Y.
They are the parameters of the Transform, that in this case
happens to be a TranslationTransform<> in 2D.
3) No there is no file where the "registered values" are written.
If you want them in a file you can run the example and redirect
the output to a file:
IterativeClosestPoint1.exe fixedPoints.txt movingPoints.txt >
results.txt
or you can simply replace the "std::cout" statements with a valid
ofstream. Like
std::ofstream myOutputFile("results.txt");
myOutputFile << "Solution = " << transform->GetParameters()
<< std::endl;
4) You may have noticed that there are no images involved here.
Presumably you extracted the points from two image..., and
if your purpose is to use the points as surrogate for registering
the images, then what you can do is to take the final transform
of this example, and plug it into a ResampleImageFilter.
You will find many examples on how to do this in the
ITK Software Guide
http://www.itk.org/ItkSoftwareGuide.pdf
Almost in all the examples of the "Image Registration" chapter.
5) The final transform is reported in line 246.
A more formal way of getting the Transform is to call:
transform->SetParameters(
registration->GetLastTransformParameter() );
Regards,
Luis
----------------------
Josiane wrote:
> Dear all,
>
>
> I ran the IterativeClosestPoint1.cxx. After having some results, i have
> some interpretation problems. These are my interrogations, should somebody
> help me?
>
>
> -After running the ICP programm and having multiple values for the error
> and one position at the end, how can we interpret these results?
>
> - Is there a file where the registered values are written?
>
> - How can we generate the registered image?
>
> - How to get the final transform?
>
>
>
> Thanks a lot.
>
> Josiane.
>
>
>
> Josiane NJIWA, PhD
>
> CREATIS CNRS UMR 5220, INSERM U630,
> INSA Bât. Blaise Pascal
> 7 rue Jean Capelle
> F-69100 Villeurbanne
> tel :+33 (0)4 72 43 82 26
> fax: +33 (0)4 72 43 85 26
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list