<br><br><div class="gmail_quote">On Fri, Mar 25, 2011 at 8:20 AM, nuno.jf <span dir="ltr"><<a href="mailto:nunofernandes7@gmail.com">nunofernandes7@gmail.com</a>></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'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? -> icp -> 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 -> Identity();<br>
ActualPosition -> PostMultiply();<br>
ActualPosition -> Translate( 0, 0, -875);<br>
ActualPosition -> RotateY(n );<br>
ActualPosition -> Translate( 0, 0, 875);<br>
<br>
TF -> SetInput( polyData2 );<br>
TF -> SetTransform( ActualPosition );<br>
TF -> Update();<br>
<br>
<br>
// ICP<br>
//---------------------------------------------------------<br>
<br>
vtkIterativeClosestPointTransform * icp =<br>
vtkIterativeClosestPointTransform::New();<br>
<br>
// Set SOURCE and TARGET points<br>
<br>
icp -> 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 -> SetSource( TF ->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 -> SetMaximumNumberOfIterations( 100 );<br>
icp -> SetMaximumNumberOfLandmarks( 10000 );<br>
icp -> StartByMatchingCentroidsOff();<br>
icp -> GetLandmarkTransform()->SetModeToRigidBody();<br>
icp -> SetMeanDistanceModeToRMS();<br>
icp -> SetMaximumMeanDistance(0.000001);<br>
icp -> Update();<br>
<br>
std::cout << "ICP Mean Distance RMS = " << icp -> GetMeanDistance() <<<br>
std::endl;<br>
<br>
// transform SOURCE to obtain TARGET<br>
//---------------------------------------------------------<br>
vtkTransformPolyDataFilter * transform = vtkTransformPolyDataFilter::New();<br>
<br>
transform -> SetTransform( icp );<br>
transform -> SetInput( TF->GetOutput());<br>
transform -> Update();<br>
<br>
<br>
std::cout << "ICP transform done." << 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>