[vtkusers] 3d reconstruction

Wes Turner wes.turner at kitware.com
Fri Jul 23 19:43:32 EDT 2010


I'm not sure I understand exactly the sequence of registrations, but I can
make a quick guess.  Most likely you are sequentially registering each data
set to the same reference i.e. 2 to 1, 3 to 1, 4 to 1, etc. instead of 2 to
1, 3 to 2, 4 to 3, etc.  Unfortunately, ICP can easily fall into a local
minimum and fail to converge if the initial positions of the point clouds
are too dissimilar. An easy fix would be to use the transform determined at
the previous stage as an initial transform of the current stage.  That would
keep the registration errors within about 10 degrees and should allow
everything to works as expected.

- Wes

On Fri, Jul 23, 2010 at 7:21 PM, celeste gonzalez <celgon23 at gmail.com>wrote:

> Hi everybody,
>
> I want to reconstruct a 3D object via registration of stereo range data. I
> am using vtkIterativeClosestPointTransform to align individual point sets
> with respect to each other.
>
>
> The sequence consists of 36 images pairs constituting a full rotation of
> the object. I am using two consecutive points cloud with this code and then
> I transform the source points by the matrix solution.
>
> Initially, I took the first pair of point cloud  then I use the point set
> that was aligned and a new point cloud that I wish to align
>
> The problem is when the rotation angle it’s over 90 grades, that is, from
> the tenth picture the alignment fails.
>
>
>
> This is part of the code I am using now.
>
>
>
>       //setup ICP transform
>
>       icp = vtkSmartPointer<vtkIterativeClosestPointTransform>::New();
>
>       icp->SetSource(newPolydata);   // newPolydata
>
>       icp->SetTarget(referencePolydata);   //  referencePolydata
>
>       icp->GetLandmarkTransform()->SetModeToRigidBody();
>
>       icp->SetMaximumNumberOfLandmarks((int)ceil(newPolydata->
> GetNumberOfPoints()*0.9));
>
>
>
>       icp->SetMaximumNumberOfIterations(100);
>
>       icp->SetCheckMeanDistance(1);
>
>       icp->SetMaximumMeanDistance(0.001);
>
>       icp->StartByMatchingCentroidsOn();
>
>
>
>       icp->Modified();
>
>       icp->Update();
>
>
>
>       vtkSmartPointer<vtkMatrix4x4> M = icp->GetMatrix();
>
>       cout << "The resulting matrix is: " << *M << cout;
>
>
>
>       vtkSmartPointer<vtkTransformPolyDataFilter> Transf =
>
>       vtkSmartPointer<vtkTransformPolyDataFilter>::New();
>
>       Transf->SetInput(newPolydata);
>
>       Transf->SetTransform(icp);
>
>       Transf->Update();
>
>
>
> Thanks in advance
>
> _______________________________________________
> 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/20100723/cddfca31/attachment.htm>


More information about the vtkusers mailing list