A point cloud manager class that uses the STANN nearest neighbor search library to handle the data. This class calculates robust surface normals for the given point set as described in the SSRR2010 paper.
More...
#include <AdaptiveKSearchSurface.hpp>
|
bool | boundingBoxOK (float dx, float dy, float dz) |
| Checks if the bounding box of a point set is "well formed", i.e. no dimension is significantly larger than the other. More...
|
|
Plane< BaseVecT > | calcPlane (const BaseVecT &queryPoint, int k, const vector< size_t > &id) |
| Returns the mean distance of the given point set from the given plane. More...
|
|
Plane< BaseVecT > | calcPlaneIterative (const BaseVecT &queryPoint, int k, const vector< size_t > &id) |
|
Plane< BaseVecT > | calcPlaneRANSAC (const BaseVecT &queryPoint, int k, const vector< size_t > &id, bool &ok) |
|
void | init () |
| Returns the k closest neighbor vertices to a given queryy point. More...
|
|
void | parseScanPoses (string posefile) |
| Parses the file with scan poses and creates a search tree to search for the nearest pose when flipping normals. More...
|
|
template<typename BaseVecT>
class lvr2::AdaptiveKSearchSurface< BaseVecT >
A point cloud manager class that uses the STANN nearest neighbor search library to handle the data. This class calculates robust surface normals for the given point set as described in the SSRR2010 paper.
Definition at line 98 of file AdaptiveKSearchSurface.hpp.
◆ AdaptiveKSearchSurface() [1/2]
template<typename BaseVecT>
Constructor.
- Parameters
-
The | file to read from |
searchTN | The of the searchTree type that shall be used |
kn | The number of neighbor points used for normal estimation |
ki | The number of neighbor points used for normal interpolation |
kd | The number of neighbor points used for distance value calculation |
calcMethod | Normal calculation method. 0: PCA(default), 1: RANSAC, 2: Iterative |
◆ AdaptiveKSearchSurface() [2/2]
template<typename BaseVecT>
standard Constructor
m_useRANSAC = true; m_ki = 10; m_kn = 10; m_kd = 10;
This Constructor can be used, if only the method "calcPlaneRANSACfromPoints" is required
◆ ~AdaptiveKSearchSurface()
template<typename BaseVecT>
◆ boundingBoxOK()
template<typename BaseVecT>
Checks if the bounding box of a point set is "well formed", i.e. no dimension is significantly larger than the other.
This method is needed to achieve a better quality of the initial normal estimation in sparse scans. Details are described in the SRR2010 paper.
- Parameters
-
dx,dy,dz | The side lengths of the bounding box |
- Returns
- true if the given box has valid dimensions.
◆ calcPlane()
template<typename BaseVecT>
Returns the mean distance of the given point set from the given plane.
- Parameters
-
p | The query plane |
id | A list of point id's |
k | The number of points in the list Returns a vertex representation of the given point in the point array |
i | A id of a point in the current point set |
- Returns
- A vertex representation of the given point Returns the distance between vertex v and plane p Calculates a tangent plane for the query point using the provided k-neighborhood
- Parameters
-
queryPoint | The point for which the tangent plane is created |
k | The size of the used k-neighborhood |
id | The positions of the neighborhood points in m_points |
ok | True, if RANSAC interpolation was succesfull |
◆ calcPlaneIterative()
template<typename BaseVecT>
◆ calcPlaneRANSAC()
template<typename BaseVecT>
◆ calculateSurfaceNormals()
template<typename BaseVecT>
◆ distance()
template<typename BaseVecT>
virtual pair<typename BaseVecT::CoordType, typename BaseVecT::CoordType> lvr2::AdaptiveKSearchSurface< BaseVecT >::distance |
( |
BaseVecT |
v | ) |
const |
|
virtual |
◆ init()
template<typename BaseVecT>
Returns the k closest neighbor vertices to a given queryy point.
- Parameters
-
v | A query vertex |
k | The (max) number of returned closest points to v |
nb | A vector containing the determined closest points Helper function for constructors |
◆ interpolateSurfaceNormals()
template<typename BaseVecT>
Returns the number of managed points.
Calculates a tangent plane for the query point using the provided k-neighborhood
- Parameters
-
queryPoint | The point for which the tangent plane is created |
k | The size of the used k-neighborhood |
points | The neighborhood points |
ok | True, if RANSAC interpolation was succesfull |
- Returns
- the resulting plane Returns the point at the given index}. If set to true, normals will be calculated using RANSAC instead of plane fitting Interpolate the initial normals with the m_ki neighbors
◆ parseScanPoses()
template<typename BaseVecT>
Parses the file with scan poses and creates a search tree to search for the nearest pose when flipping normals.
◆ m_calcMethod
template<typename BaseVecT>
◆ m_centroid
template<typename BaseVecT>
◆ m_poseTree
template<typename BaseVecT>
◆ m_searchTreeName
template<typename BaseVecT>
The documentation for this class was generated from the following file: