[vtkusers] Several point clouds alignment using ICP

Tim Hutton tim.hutton at gmail.com
Fri Mar 4 11:14:28 EST 2011


I think you need to tell us more about your data source. Are you
scanning objects on a turntable with a fixed camera? If this is true
and you know the rotation step then you just need to work out the
rotation axis and you can align the scans directly. (Maybe scan a
calibration object first to compute the axis, that sort of thing.)

On 4 March 2011 15:45, 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
>



-- 
Tim Hutton - http://www.sq3.org.uk - http://ferkeltongs.livejournal.com



More information about the vtkusers mailing list