#include <KdTree.hpp>
Public Member Functions | |
template<typename Container , typename DistSq = EuclideanDistSq, typename = typename std::enable_if<ContainerTags::has_randomAccessIterator<Container>::value>::type> | |
void | filter (Container &points, const AABB< Dim > &aabb, Container &output, bool invert=false) |
std::pair< PREC, PREC > | getMoments () |
std::vector< PREC > & | getNearestDists () |
std::tuple< std::size_t, PREC, std::size_t > | getSettings () |
NearestNeighbourFilter (std::size_t kNeighboursMean=20, PREC stdDevMult=1.0, std::size_t allowSplitAboveNPoints=10) | |
void | setSettings (std::size_t kNeighboursMean, PREC stdDevMult, std::size_t allowSplitAboveNPoints) |
Static Public Attributes | |
static const unsigned int | Dim = PointDataTraits::Dimension |
Private Attributes | |
std::size_t | m_allowSplitAboveNPoints |
std::size_t | m_kNeighboursMean |
PREC | m_mean = 0 |
NearestDistancesType | m_nearestDists |
PREC | m_stdDev = 0 |
PREC | m_stdDevMult |
=======================================================================================
Definition at line 2419 of file KdTree.hpp.
ApproxMVBB::KdTree::NearestNeighbourFilter< TTraits >::NearestNeighbourFilter | ( | std::size_t | kNeighboursMean = 20 , |
PREC | stdDevMult = 1.0 , |
||
std::size_t | allowSplitAboveNPoints = 10 |
||
) | [inline] |
CTor
Definition at line 2436 of file KdTree.hpp.
void ApproxMVBB::KdTree::NearestNeighbourFilter< TTraits >::filter | ( | Container & | points, |
const AABB< Dim > & | aabb, | ||
Container & | output, | ||
bool | invert = false |
||
) | [inline] |
This filter function computes the nearest distance distribution (mean, standart deviation) of the points points
and classifies all points which have mean nearest distance < mean + stdDevMult * standart deviation as outliers. The AABB aabb
is for building the kd-Tree. The function modifies the container points
(shuffling, sorting etc.) and saves the remaining points in output
. If invert
is on the outliers are saved in output
.
Definition at line 2472 of file KdTree.hpp.
std::pair<PREC,PREC> ApproxMVBB::KdTree::NearestNeighbourFilter< TTraits >::getMoments | ( | ) | [inline] |
Get the computed mean/standart deviation of the nearest distance (the mean of the returned array of getNearestDists())
Definition at line 2594 of file KdTree.hpp.
std::vector<PREC>& ApproxMVBB::KdTree::NearestNeighbourFilter< TTraits >::getNearestDists | ( | ) | [inline] |
Definition at line 2587 of file KdTree.hpp.
std::tuple<std::size_t,PREC,std::size_t> ApproxMVBB::KdTree::NearestNeighbourFilter< TTraits >::getSettings | ( | ) | [inline] |
Definition at line 2446 of file KdTree.hpp.
void ApproxMVBB::KdTree::NearestNeighbourFilter< TTraits >::setSettings | ( | std::size_t | kNeighboursMean, |
PREC | stdDevMult, | ||
std::size_t | allowSplitAboveNPoints | ||
) | [inline] |
Definition at line 2451 of file KdTree.hpp.
const unsigned int ApproxMVBB::KdTree::NearestNeighbourFilter< TTraits >::Dim = PointDataTraits::Dimension [static] |
Definition at line 2423 of file KdTree.hpp.
std::size_t ApproxMVBB::KdTree::NearestNeighbourFilter< TTraits >::m_allowSplitAboveNPoints [private] |
Definition at line 2613 of file KdTree.hpp.
std::size_t ApproxMVBB::KdTree::NearestNeighbourFilter< TTraits >::m_kNeighboursMean [private] |
How many neighbours points are search for one point to classify to build the mean neighbour distance
Definition at line 2606 of file KdTree.hpp.
PREC ApproxMVBB::KdTree::NearestNeighbourFilter< TTraits >::m_mean = 0 [private] |
Definition at line 2602 of file KdTree.hpp.
NearestDistancesType ApproxMVBB::KdTree::NearestNeighbourFilter< TTraits >::m_nearestDists [private] |
Definition at line 2601 of file KdTree.hpp.
PREC ApproxMVBB::KdTree::NearestNeighbourFilter< TTraits >::m_stdDev = 0 [private] |
Definition at line 2603 of file KdTree.hpp.
PREC ApproxMVBB::KdTree::NearestNeighbourFilter< TTraits >::m_stdDevMult [private] |
The multiplier for the standart deviation, if the distance of the point to classify is > stdDevMult
* stdDevDist + meanDist, then the point is classfied as an outlier.
Definition at line 2611 of file KdTree.hpp.