Implements an OctTree with adaptive leaf splitting as a post process step. More...
#include <adaptive_oc_tree.h>
Public Member Functions | |
AdaptiveOctTree () | |
dummy default constructor | |
AdaptiveOctTree (pcl::PointXYZ center, double xsize, double ysize, double zsize, NDTCell< PointT > *type, OctTree< PointT > *_parent=NULL, unsigned int _depth=0) | |
creates an oct tree node with known center and size | |
virtual SpatialIndex< PointT > * | clone () |
virtual void | postProcessPoints () |
void | setParameters (bool _useDornikHansen=false, bool _useFlatness=true, double _RSS_THRESHOLD=1000, double _DH_SIGNIFICANCE_LVL=0.5, double _MIN_CELL_SIZE=1, double _FLAT_FACTOR=10, double _BIG_CELL_SIZE=5, double _SMALL_CELL_SIZE=5) |
virtual | ~AdaptiveOctTree () |
Public Attributes | |
double | MIN_CELL_SIZE |
Protected Member Functions | |
double | computeDornikHansen (NDTCell< PointT > *cell) |
double | computeResidualSquare (NDTCell< PointT > *cell) |
virtual void | computeTreeLeafs () |
std::vector< OctTree< PointT > * > | splitTree (OctTree< PointT > *leaf) |
Protected Attributes | |
double | DH_SIGNIFICANCE_LVL |
double | FLAT_FACTOR |
std::vector< OctTree< PointT > * > | myTreeLeafs |
bool | parametersSet |
double | RSS_THRESHOLD |
bool | useDornikHansen |
bool | useFlatness |
Implements an OctTree with adaptive leaf splitting as a post process step.
The OctTree is split unitl a conservative initial size. After this, a post processing step is used to determine if the gaussians in each leaf are well-fitting. At the moment one heuristic option is available - using the residual squares sum and the residual variance. A second option using the omnibus normality test will be added soon.
Definition at line 53 of file adaptive_oc_tree.h.
lslgeneric::AdaptiveOctTree< PointT >::AdaptiveOctTree | ( | ) |
dummy default constructor
empty! default constructor
Definition at line 38 of file adaptive_oc_tree.hpp.
lslgeneric::AdaptiveOctTree< PointT >::AdaptiveOctTree | ( | pcl::PointXYZ | center, |
double | xsize, | ||
double | ysize, | ||
double | zsize, | ||
NDTCell< PointT > * | type, | ||
OctTree< PointT > * | _parent = NULL , |
||
unsigned int | _depth = 0 |
||
) |
creates an oct tree node with known center and size
constructor, calls parent OctTree constructor
Definition at line 49 of file adaptive_oc_tree.hpp.
lslgeneric::AdaptiveOctTree< PointT >::~AdaptiveOctTree | ( | ) | [virtual] |
empty destructor, all data are deallocated by parent class
Definition at line 62 of file adaptive_oc_tree.hpp.
SpatialIndex< PointT > * lslgeneric::AdaptiveOctTree< PointT >::clone | ( | ) | [virtual] |
creates an oct tree with the same parameters.
Definition at line 402 of file adaptive_oc_tree.hpp.
double lslgeneric::AdaptiveOctTree< PointT >::computeDornikHansen | ( | NDTCell< PointT > * | cell | ) | [protected] |
performs the Dornik-Hansen Omnibus normality test
Definition at line 187 of file adaptive_oc_tree.hpp.
double lslgeneric::AdaptiveOctTree< PointT >::computeResidualSquare | ( | NDTCell< PointT > * | cell | ) | [protected] |
fits a 3d gaussian in the cell and computes the residual squares sum
Definition at line 305 of file adaptive_oc_tree.hpp.
void lslgeneric::AdaptiveOctTree< PointT >::computeTreeLeafs | ( | ) | [protected, virtual] |
finds all leafs of this tree and fills the vector of pointers to the leafs
Definition at line 70 of file adaptive_oc_tree.hpp.
void lslgeneric::AdaptiveOctTree< PointT >::postProcessPoints | ( | ) | [virtual] |
go through all leafs and split the ones with high residuals
Definition at line 111 of file adaptive_oc_tree.hpp.
void lslgeneric::AdaptiveOctTree< PointT >::setParameters | ( | bool | _useDornikHansen = false , |
bool | _useFlatness = true , |
||
double | _RSS_THRESHOLD = 1000 , |
||
double | _DH_SIGNIFICANCE_LVL = 0.5 , |
||
double | _MIN_CELL_SIZE = 1 , |
||
double | _FLAT_FACTOR = 10 , |
||
double | _BIG_CELL_SIZE = 5 , |
||
double | _SMALL_CELL_SIZE = 5 |
||
) |
use this to set the parameters for the OctTree. If not called before creating the first leaf, default parameters will be used.
Definition at line 12 of file adaptive_oc_tree.hpp.
std::vector< OctTree< PointT > * > lslgeneric::AdaptiveOctTree< PointT >::splitTree | ( | OctTree< PointT > * | octLeaf | ) | [protected] |
splits a cell and returns a vector of the newly created children iterates points downwards
Definition at line 350 of file adaptive_oc_tree.hpp.
double lslgeneric::AdaptiveOctTree< PointT >::DH_SIGNIFICANCE_LVL [protected] |
Definition at line 65 of file adaptive_oc_tree.h.
double lslgeneric::AdaptiveOctTree< PointT >::FLAT_FACTOR [protected] |
Definition at line 65 of file adaptive_oc_tree.h.
double lslgeneric::AdaptiveOctTree< PointT >::MIN_CELL_SIZE |
Definition at line 91 of file adaptive_oc_tree.h.
std::vector<OctTree<PointT>*> lslgeneric::AdaptiveOctTree< PointT >::myTreeLeafs [protected] |
Definition at line 57 of file adaptive_oc_tree.h.
bool lslgeneric::AdaptiveOctTree< PointT >::parametersSet [protected] |
Definition at line 66 of file adaptive_oc_tree.h.
double lslgeneric::AdaptiveOctTree< PointT >::RSS_THRESHOLD [protected] |
Definition at line 65 of file adaptive_oc_tree.h.
bool lslgeneric::AdaptiveOctTree< PointT >::useDornikHansen [protected] |
Definition at line 63 of file adaptive_oc_tree.h.
bool lslgeneric::AdaptiveOctTree< PointT >::useFlatness [protected] |
Definition at line 64 of file adaptive_oc_tree.h.