[vtkusers] Find closest point

David Doria daviddoria at gmail.com
Sun Sep 18 17:12:10 EDT 2011


On Sun, Sep 18, 2011 at 2:57 PM, nuno.jf <nunofernandes7 at gmail.com> wrote:

> David, thank you for your help.
> I am now using FindClosestNPoints and using the second point.
> The purpose of this distance calculation is because I'm trying to remove
> noise from one point cloud and I am trying to implement in VTK, this
> Statistical Outlier Removal filter that is available in PCL. The link for
> this filter can be found bellow:
>
> http://pointclouds.org/documentation/tutorials/statistical_outlier.php#statistical-outlier-removal
>
> Basically, what they say regarding this filter is the following:
> "For each point, we compute the mean distance from it to all its neighbors.
> By assuming that the resulted distribution is Gaussian with a mean and a
> standard deviation, all points whose mean distances are outside an interval
> defined by the global distances mean and standard deviation can be
> considered as outliers and trimmed from the dataset"
>
> The method I am trying to implement is very exhaustive, as I am calculating
> the distances for all the points (I have ~ 80 000 points per cloud). I had
> the opportunity to see the code you developed to remove noise but, as I am
> still getting used with programming and with c++ I didn't understand to
> much
> of it.
>
> Do you have any suggestion for what I am trying to do?
> Thank you.
> Nuno


You could use the CleanPolyDataFilter:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/CleanPolyData

What my PointSetOutlierRemoval filter (
http://www.midasjournal.org/browse/publication/708) does is just record the
distance from each point to its closest neighbor. It then removes a
specified percentage of the points based on the distance that was computed
(it sorts the distances and keeps the lowest N percent).

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110918/3ac4bd31/attachment.htm>


More information about the vtkusers mailing list