Rushin,<br><br>I think you have it backward.&nbsp; My belief is that the fixed points are probed for points close to the moving points.&nbsp; (From the documentation: &quot;A vector of minimum closest point distance is created for each point in the moving point-set&quot;.)&nbsp; This makes the registration fragile to outliers in the moving data set.&nbsp; Have you tried the experiment in the other direction?&nbsp; 
I.e. Add points to the fixed data set and retry the registration.&nbsp; If this is robust, then your understanding is incorrect and you will need to adjust your data to guard against outliers.<br><br>The other&nbsp; problem that could be occurring is that while the added point is far from the correct position, the starting position of the moving data puts the additional point close to the fixed data.&nbsp; To test this, start the moving data from the correct position (
i.e. where the correct solution would be the identity matrix) and retry the registration.<br><br>- Wes<br><br><div><span class="gmail_quote">On 10/11/07, <b class="gmail_sendername">Zack Galbreath</b> &lt;<a href="mailto:zack.galbreath@kitware.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

zack.galbreath@kitware.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br>Hi,<br><br>I am trying&nbsp;&nbsp;to use ICP to register two datasets with different number
<br>of points. When the number of points in the two datasets is the same it<br>works well and the returned transformation parameters are correct. When<br>I add another point to the moving dataset (the added point is very far
<br>from the other points), the transformation parameters will change and<br>are not correct anymore. My understanding of ICP is that it should find<br>the closest points to the fixed points and calculate the transformation
<br>parameters and apply it to the moving image and again find the closest<br>points in the transformed&nbsp;&nbsp;moving dataset and find the transformation<br>parameters and iterate to find the final accumulated transformation<br>

parameters. So it should be able to register two datasets with different<br>number of points. Hence adding a point to the moving set (when it is<br>very far from the other points) should not change the result. My<br>question is that, in ITK, is ICP NOT able to register two datasets with
<br>different number of points or there is a problem in my program. I am<br>testing it with IterativeClosestPoint2.cxx and made a few changes to<br>make it 2D rather than 3D as followed:<br><br>#include &quot;itkEuler2DTransform.h

&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rather than&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#include<br>&quot;itkEuler3DTransform.h&quot;<br>const unsigned int Dimension = 2;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rather than&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const<br>unsigned int Dimension = 3;<br><br>typedef itk::Euler2DTransform&lt; double &gt; TransformType;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rather
<br>than&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typedef itk::Euler3DTransform&lt; double &gt; TransformType;<br><br>scales[0] = 1.0 / rotationScale;<br>scales[1] = 1.0 / translationScale;<br>scales[2] = 1.0 / translationScale;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rather than<br><br>

scales[0] = 1.0 / rotationScale;<br>scales[1] = 1.0 / rotationScale;<br>scales[2] = 1.0 / rotationScale;<br>scales[3] = 1.0 / translationScale;<br>scales[4] = 1.0 / translationScale;<br>scales[5] = 1.0 / translationScale;
<br><br>The rest of the code is exactly the same as the example in<br>IterativeClosestPoint2.cxx.<br>As a simple example, the inputs to the program are:<br>fixed dataset:<br>139 116<br>142 203<br>240 195<br><br>and moving dataset is:
<br>251 85<br>254 172<br>352 164<br><br>In this case the transformation parameters are&nbsp;&nbsp;&nbsp;&nbsp;rotation: 0<br>Translation: -112&nbsp;&nbsp;31&nbsp;&nbsp;&nbsp;&nbsp;which are correct<br>But when I add a point to the moving dataset for example (1, 1) or any
<br>other point which is very far from the existing ones, the result will<br>change, while it should not.<br>I appreciate if someone could help me.<br><br>Best,<br>Rushin<br><br><br><br><br><br><br><br>_______________________________________________
<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Insight-users@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.itk.org/mailman/listinfo/insight-users</a><br><br>
</blockquote></div><br><br clear="all"><br>-- <br>Wesley D. Turner, Ph.D.<br>Kitware, Inc.<br>R&amp;D Engineer<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-371-3971 x120