[vtkusers] ICP with Point Cloud
Emmanouil Moschidis
moshman65 at yahoo.com
Tue May 29 13:55:47 EDT 2007
What I know from theory is that ICP needs a good initial state , in order to work fine. That initial state is most of the times given by vtkLandmarksTransform by selecting a small number of Landmarks and making point-to-point registration.
Regarding the number of iterations in the ICP I think you have define that. In my opinion you should cut the task and the code into small blocks and debug it untill you find which object is not having the expected parameters. Then you may
post a snippet of your not working code here.
samo <sandra.moritz at gmx.de> wrote:
Hi guys
Thanks very much for your ideas, but unfortunately they both don't work.
Everytime I check the NumberOfIterations the icp needed, I get 0. My points
are completly random, sometimes I also have some points twice or more. What
could be the error? I understood both ideas, and in my opinion they should
work perfectly, but they don't
Has anybody an idea?
Emmanouil Moschidis wrote:
>
> hi i have posted in the past this piece of code that should work...
>
>
> vtkPoints *cloudPoints=new vtkPoints;
> vtkCellArray *cloudCells=new vtkCellArray;
> vtkPolyData *cloudPData=new vtkPolyData;
>
>
> cloudPoints->SetDataTypeToDouble();
> cloudPoints->SetNumberOfPoints(numberOfVTKPoints);
>
>
> for(int i=0; i<(numberOfVTKCells*3); i++)
> {
> cloudPoints->SetPoint(i,vtkStoredPointsBuffer[i].getX(),vtkStoredPointsBuffer[i].getY(),vtkStoredPointsBuffer[i].getZ());
>
> }
>
> cloudCells->InsertNextCell(numberOfVTKPoints);
>
>
> for (int i=0; i
> {
> cloudCells->InsertCellPoint(i);
> }
>
>
> cloudPData->SetPoints(cloudPoints);
> cloudPData->SetLines(cloudCells);
>
>
> the only weird thing you may see is these getX(), getY(), getZ()
> methods.The reason why i use these methods is that i store my points in
> std::vector
where Point3D is a custom class for 3D points (in your
> case you use
> vtkPoints).
> In general it works. Try if it works for your application too
>
> good luck
>
>
> samo wrote:
>
> Hello together
>
> I try to match a point cloud with a surface with the help of
> vtkIterativeClosestPointAlgorithm. What I would like to know is, whether
> and
> how I can use a point cloud in vtk. At the moment, I am using the
> vtkPoints
> array to store all the points in. But when I want to use the icp, I need a
> vtkDataSet. But, as I understood, the vtkDataSet always needs the cell
> information. Is that right? I tried to use vtkUnstructuredGrid with only
> setting points and no cells. But the icp calculated no transformation. Is
> there a possiblility to use the icp without the cell information? As, in
> my
> point cloud, I don't know how the points are organized. I just would like
> to
> calculate a transformation from the point cloud to the surface. The icp
> which I know from maths, is able to do that.
>
> Has anybody an idea?
> --
> View this message in context:
> http://www.nabble.com/ICP-with-Point-Cloud-tf3816487.html#a10804257
> Sent from the VTK - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
> ---------------------------------
> Pinpoint customers who are looking for what you sell.
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
--
View this message in context: http://www.nabble.com/ICP-with-Point-Cloud-tf3816487.html#a10856362
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
---------------------------------
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070529/849a0c23/attachment.htm>
More information about the vtkusers
mailing list