[vtkusers] Several point clouds alignment using ICP

Wes Turner wes.turner at kitware.com
Fri Mar 4 11:18:11 EST 2011


Nuno,

For ICP, the issue is that every point you choose for the source point set
will feed into the calculation of the metric.  If the clouds represent
different sections of the same part, and you choose points outside of the
overlap region, then the alignment will tend to increase the area of
overlap.  Since you seem to have a good initial set for the alignment, I
would use this initial guess to estimate the area of overlap and then only
choose points from the source set that lie within that region.

- Wes

On Fri, Mar 4, 2011 at 10:45 AM, nuno.jf <nunofernandes7 at gmail.com> wrote:

> Hi Timm,
>
> Thank you very much for you message!
> Well, I know that each point cloud is rotated about 6.25 degrees in
> relation
> to the previous point cloud. So,
> I did this:
>
> vtkTransformPolyDataFilter *TF = vtkTransformPolyDataFilter::New();
>                vtkTransform *ActualPosition = vtkTransform::New();
>
>                ActualPosition -> Identity();
>                ActualPosition -> PostMultiply();
>                ActualPosition -> Translate( 0, 0, -875);
>     // bings the point cloud to
> the origin
>                ActualPosition -> RotateY( 5 * 1.25 );                  //
> rotates the point cloud
>                ActualPosition -> Translate( 0, 0,  875);
>     // places the point cloud back
> to where  it was
>
>                TF -> SetInput( polyData2 );
>                TF -> SetTransform( ActualPosition );
>                TF -> Update();
>
> I believe the surfaces have sufficient overlapping parts for ICP to work,
> considering that each point cloud was obtained from the same equipment
> scanning the object and rotating it 6.25 degrees between consecutive scans.
> My ICP code is as follows:
>
> vtkIterativeClosestPointTransform * icp =
> vtkIterativeClosestPointTransform::New();
>
>                // Set SOURCE and TARGET points
>
>                icp -> SetTarget( polyData1 );  // I want to align polydata
> 2 with
> polydata1
>                icp -> SetSource( TF -> GetOutput() ); // get polyData2
> transformed as
> described above
>
>
>                // Configure ICP transform
>                //---------------------------------------------------------
>
>                icp -> SetMaximumNumberOfIterations( 100 );
>                icp -> SetMaximumNumberOfLandmarks( 10000 );
>                icp -> StartByMatchingCentroidsOff();
>                icp -> GetLandmarkTransform()->SetModeToRigidBody();
>                icp -> SetMeanDistanceModeToRMS();
>                icp -> SetMaximumMeanDistance(0.000001);
>                icp -> Update();
>
>                std::cout << "ICP Mean Distance RMS = " << icp ->
> GetMeanDistance() <<
> std::endl;
>
> What should I do?
> Thank you very much!
> Best regards,
>
> Nuno
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Several-point-clouds-alignment-using-ICP-tp3395391p3409677.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Wesley D. Turner, Ph.D.
Kitware, Inc.
Technical Leader
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4920
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110304/12837246/attachment.htm>


More information about the vtkusers mailing list