CGAL::remove_outliers() deletes a user-specified fraction of outliers from the input point set. More specifically, it sorts the input points in increasing order of average squared distances to the k nearest neighbors and computes the points with largest value.
The outliers detection depends on the k parameter, specifically the detection of clusters of outliers. The number of neighbors should be higher than the size of clusters of outliers in the point set. For datasets with no cluster of outliers, this value can be set to a few rings, e.g. 24. Larger value leads to longer computation times. For these reasons, we do not provide any default value for this parameter.
This method modifies the order of input points so as to pack all remaining points first, and returns and returns an iterator over the first point to remove (see erase-remove idiom). For this reason it should not be called on sorted containers.
#include <CGAL/remove_outliers.h>
| ||||||||||
|
| |||||||||
Removes outliers: computes average squared distance to the K nearest neighbors, and sorts the points in increasing order of average distance. This method modifies the order of input points so as to pack all remaining points first, and returns an iterator over the first point to remove (see erase-remove idiom). For this reason it should not be called on sorted containers.
|
See remove_outliers_example.cpp.