<br><br><div class="gmail_quote">On Fri, Mar 25, 2011 at 8:20 AM, nuno.jf <span dir="ltr">&lt;<a href="mailto:nunofernandes7@gmail.com">nunofernandes7@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Wes,<br>
<br>
Thank you very much for your answer, but unfortunately I don&#39;t know how to<br>
do what you suggested me.<br>
How do I turn off ICP initialization, or chose the partial clouds as the<br>
source points?<br>
Is this it? -&gt; icp -&gt; StartByMatchingCentroidsOff();<br></blockquote><div><br></div><div>Yes.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


<br>
Is there any example for me to see? Sorry for all of this questions, I am<br>
still a newbie in this field.<br>
This is how my code:<br>
<br>
        // Rigid Transform<br>
        //---------------------------------------------------------<br>
        vtkTransformPolyDataFilter *TF = vtkTransformPolyDataFilter::New();<br>
        vtkTransform *ActualPosition = vtkTransform::New();<br>
<br>
        int n;<br>
        n= 5* 7* (360/290);<br>
        ActualPosition -&gt; Identity();<br>
        ActualPosition -&gt; PostMultiply();<br>
        ActualPosition -&gt; Translate( 0, 0, -875);<br>
        ActualPosition -&gt; RotateY(n );<br>
        ActualPosition -&gt; Translate( 0, 0,  875);<br>
<br>
        TF -&gt; SetInput( polyData2 );<br>
        TF -&gt; SetTransform( ActualPosition );<br>
        TF -&gt; Update();<br>
<br>
<br>
        // ICP<br>
        //---------------------------------------------------------<br>
<br>
        vtkIterativeClosestPointTransform * icp =<br>
vtkIterativeClosestPointTransform::New();<br>
<br>
        // Set SOURCE and TARGET points<br>
<br>
        icp -&gt; SetTarget( polyData1 );<br></blockquote><div><br></div><div>I believe this data can include points outside the region of overlap provided that the initial registration is close</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


        icp -&gt; SetSource( TF -&gt;GetOutput() );<br></blockquote><div><br></div><div>This data needs to be only the overlap region.  If it is a subset of the target, you should be good.  Otherwise, use your good initial guess to put it close, then use the bounding box of the Target to set up a clip function that removes points outside the region of overlap. There are other methods, but essentially you need to find a way to only use points within Source that have valid associations to Target ... Which way you choose is problem dependent.</div>

<div><br></div><div>- Wes</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
        // Configure ICP transform<br>
        //---------------------------------------------------------<br>
<br>
        icp -&gt; SetMaximumNumberOfIterations( 100 );<br>
        icp -&gt; SetMaximumNumberOfLandmarks( 10000 );<br>
        icp -&gt; StartByMatchingCentroidsOff();<br>
        icp -&gt; GetLandmarkTransform()-&gt;SetModeToRigidBody();<br>
        icp -&gt; SetMeanDistanceModeToRMS();<br>
        icp -&gt; SetMaximumMeanDistance(0.000001);<br>
        icp -&gt; Update();<br>
<br>
        std::cout &lt;&lt; &quot;ICP Mean Distance RMS = &quot; &lt;&lt; icp -&gt; GetMeanDistance() &lt;&lt;<br>
std::endl;<br>
<br>
        // transform SOURCE to obtain TARGET<br>
        //---------------------------------------------------------<br>
        vtkTransformPolyDataFilter * transform = vtkTransformPolyDataFilter::New();<br>
<br>
        transform -&gt; SetTransform( icp );<br>
        transform -&gt; SetInput( TF-&gt;GetOutput());<br>
        transform -&gt; Update();<br>
<br>
<br>
        std::cout &lt;&lt; &quot;ICP transform done.&quot; &lt;&lt; std::endl;<br>
<br>
Could you indicate my, by seeing this, what should I do?<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/How-to-bring-an-object-to-the-coordinate-s-origin-tp4243261p4263986.html" target="_blank">http://vtk.1045678.n5.nabble.com/How-to-bring-an-object-to-the-coordinate-s-origin-tp4243261p4263986.html</a><br>


</font><div><div></div><div class="h5">Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Wesley D. Turner, Ph.D.<br>Kitware, Inc.<br>Technical Leader<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4920<br>