|
Point Cloud Library (PCL)
1.15.1-dev
|
KdTreeFLANN is a generic type of 3D spatial locator using kD-tree structures. More...
#include <pcl/kdtree/kdtree_flann.h>
Inheritance diagram for pcl::KdTreeFLANN< PointT, Dist >:
Collaboration diagram for pcl::KdTreeFLANN< PointT, Dist >:Public Types | |
| using | PointCloud = typename KdTree< PointT >::PointCloud |
| using | PointCloudConstPtr = typename KdTree< PointT >::PointCloudConstPtr |
| using | IndicesPtr = shared_ptr< Indices > |
| using | IndicesConstPtr = shared_ptr< const Indices > |
| using | FLANNIndex = ::flann::Index< Dist > |
| using | Ptr = shared_ptr< KdTreeFLANN< PointT, Dist > > |
| using | ConstPtr = shared_ptr< const KdTreeFLANN< PointT, Dist > > |
Public Types inherited from pcl::KdTree< PointT > | |
| using | IndicesPtr = shared_ptr< Indices > |
| using | IndicesConstPtr = shared_ptr< const Indices > |
| using | PointCloud = pcl::PointCloud< PointT > |
| using | PointCloudPtr = typename PointCloud::Ptr |
| using | PointCloudConstPtr = typename PointCloud::ConstPtr |
| using | PointRepresentation = pcl::PointRepresentation< PointT > |
| using | PointRepresentationConstPtr = typename PointRepresentation::ConstPtr |
| using | Ptr = shared_ptr< KdTree< PointT > > |
| using | ConstPtr = shared_ptr< const KdTree< PointT > > |
Public Member Functions | |
| KdTreeFLANN (bool sorted=true) | |
| Default Constructor for KdTreeFLANN. More... | |
| KdTreeFLANN (const KdTreeFLANN< PointT, Dist > &k) | |
| Copy constructor. More... | |
| KdTreeFLANN< PointT, Dist > & | operator= (const KdTreeFLANN< PointT, Dist > &k) |
| Copy operator. More... | |
| void | setEpsilon (float eps) override |
| Set the search epsilon precision (error bound) for nearest neighbors searches. More... | |
| void | setSortedResults (bool sorted) |
| Ptr | makeShared () |
| ~KdTreeFLANN () override | |
| Destructor for KdTreeFLANN. More... | |
| void | setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices=IndicesConstPtr()) override |
| Provide a pointer to the input dataset. More... | |
| int | nearestKSearch (const PointT &point, unsigned int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const override |
| Search for k-nearest neighbors for the given query point. More... | |
| int | radiusSearch (const PointT &point, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const override |
| Search for all the nearest neighbors of the query point in a given radius. More... | |
Public Member Functions inherited from pcl::KdTree< PointT > | |
| KdTree (bool sorted=true) | |
| Empty constructor for KdTree. More... | |
| IndicesConstPtr | getIndices () const |
| Get a pointer to the vector of indices used. More... | |
| PointCloudConstPtr | getInputCloud () const |
| Get a pointer to the input point cloud dataset. More... | |
| void | setPointRepresentation (const PointRepresentationConstPtr &point_representation) |
| Provide a pointer to the point representation to use to convert points into k-D vectors. More... | |
| PointRepresentationConstPtr | getPointRepresentation () const |
| Get a pointer to the point representation used when converting points into k-D vectors. More... | |
| virtual | ~KdTree ()=default |
| Destructor for KdTree. More... | |
| virtual int | nearestKSearch (const PointCloud &cloud, int index, unsigned int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const |
| Search for k-nearest neighbors for the given query point. More... | |
| template<typename PointTDiff > | |
| int | nearestKSearchT (const PointTDiff &point, unsigned int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const |
| Search for k-nearest neighbors for the given query point. More... | |
| virtual int | nearestKSearch (int index, unsigned int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const |
| Search for k-nearest neighbors for the given query point (zero-copy). More... | |
| virtual int | radiusSearch (const PointCloud &cloud, int index, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const |
| Search for all the nearest neighbors of the query point in a given radius. More... | |
| template<typename PointTDiff > | |
| int | radiusSearchT (const PointTDiff &point, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const |
| Search for all the nearest neighbors of the query point in a given radius. More... | |
| virtual int | radiusSearch (int index, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const |
| Search for all the nearest neighbors of the query point in a given radius (zero-copy). More... | |
| float | getEpsilon () const |
| Get the search epsilon precision (error bound) for nearest neighbors searches. More... | |
| void | setMinPts (int min_pts) |
| Minimum allowed number of k nearest neighbors points that a viable result must contain. More... | |
| int | getMinPts () const |
| Get the minimum allowed number of k nearest neighbors points that a viable result must contain. More... | |
| bool | getSortedResults () const |
| Gets whether the results should be sorted (ascending in the distance) or not Otherwise the results may be returned in any order. More... | |
Additional Inherited Members | |
Protected Attributes inherited from pcl::KdTree< PointT > | |
| PointCloudConstPtr | input_ |
| The input point cloud dataset containing the points we need to use. More... | |
| IndicesConstPtr | indices_ |
| A pointer to the vector of point indices to use. More... | |
| float | epsilon_ {0.0f} |
| Epsilon precision (error bound) for nearest neighbors searches. More... | |
| int | min_pts_ {1} |
| Minimum allowed number of k nearest neighbors points that a viable result must contain. More... | |
| bool | sorted_ |
| Return the radius search neighbours sorted. More... | |
| PointRepresentationConstPtr | point_representation_ |
| For converting different point structures into k-dimensional vectors for nearest-neighbor search. More... | |
KdTreeFLANN is a generic type of 3D spatial locator using kD-tree structures.
The class is making use of the FLANN (Fast Library for Approximate Nearest Neighbor) project by Marius Muja and David Lowe.
Definition at line 132 of file kdtree_flann.h.
| using pcl::KdTreeFLANN< PointT, Dist >::ConstPtr = shared_ptr<const KdTreeFLANN<PointT, Dist> > |
Definition at line 152 of file kdtree_flann.h.
| using pcl::KdTreeFLANN< PointT, Dist >::FLANNIndex = ::flann::Index<Dist> |
Definition at line 148 of file kdtree_flann.h.
| using pcl::KdTreeFLANN< PointT, Dist >::IndicesConstPtr = shared_ptr<const Indices> |
Definition at line 146 of file kdtree_flann.h.
| using pcl::KdTreeFLANN< PointT, Dist >::IndicesPtr = shared_ptr<Indices> |
Definition at line 145 of file kdtree_flann.h.
| using pcl::KdTreeFLANN< PointT, Dist >::PointCloud = typename KdTree<PointT>::PointCloud |
Definition at line 142 of file kdtree_flann.h.
| using pcl::KdTreeFLANN< PointT, Dist >::PointCloudConstPtr = typename KdTree<PointT>::PointCloudConstPtr |
Definition at line 143 of file kdtree_flann.h.
| using pcl::KdTreeFLANN< PointT, Dist >::Ptr = shared_ptr<KdTreeFLANN<PointT, Dist> > |
Definition at line 151 of file kdtree_flann.h.
| pcl::KdTreeFLANN< PointT, Dist >::KdTreeFLANN | ( | bool | sorted = true | ) |
Default Constructor for KdTreeFLANN.
| [in] | sorted | set to true if the application that the tree will be used for requires sorted nearest neighbor indices (default). False otherwise. |
By setting sorted to false, the radiusSearch operations will be faster.
Definition at line 49 of file kdtree_flann.hpp.
| pcl::KdTreeFLANN< PointT, Dist >::KdTreeFLANN | ( | const KdTreeFLANN< PointT, Dist > & | k | ) |
Copy constructor.
| [in] | k | the tree to copy into this |
Definition at line 70 of file kdtree_flann.hpp.
|
inlineoverride |
Destructor for KdTreeFLANN.
Deletes all allocated data arrays and destroys the kd-tree structures.
Definition at line 203 of file kdtree_flann.h.
|
inline |
Definition at line 195 of file kdtree_flann.h.
|
overridevirtual |
Search for k-nearest neighbors for the given query point.
| [in] | point | a given valid (i.e., finite) query point |
| [in] | k | the number of neighbors to search for |
| [out] | k_indices | the resultant indices of the neighboring points (must be resized to k a priori!) |
| [out] | k_sqr_distances | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
| asserts | in debug mode if the index is not between 0 and the maximum number of points |
Implements pcl::KdTree< PointT >.
Definition at line 235 of file kdtree_flann.hpp.
Referenced by pcl::gpu::DataSource::findKNNeghbors(), and pcl::getApproximateIndices().
|
inline |
Copy operator.
| [in] | k | the tree to copy into this |
Definition at line 171 of file kdtree_flann.h.
|
overridevirtual |
Search for all the nearest neighbors of the query point in a given radius.
| [in] | point | a given valid (i.e., finite) query point |
| [in] | radius | the radius of the sphere bounding all of p_q's neighbors |
| [out] | k_indices | the resultant indices of the neighboring points |
| [out] | k_sqr_distances | the resultant squared distances to the neighboring points |
| [in] | max_nn | if given, bounds the maximum returned neighbors to this value. If max_nn is set to 0 or to a number higher than the number of points in the input cloud, all neighbors in radius will be returned. |
| asserts | in debug mode if the index is not between 0 and the maximum number of points |
Implements pcl::KdTree< PointT >.
Definition at line 373 of file kdtree_flann.hpp.
References pcl::radius_search().
Referenced by pcl::gpu::DataSource::findRadiusNeghbors(), and pcl::TextureMapping< PointInT >::textureMeshwithMultipleCameras().
|
overridevirtual |
Set the search epsilon precision (error bound) for nearest neighbors searches.
| [in] | eps | precision (error bound) for nearest neighbors searches |
Reimplemented from pcl::KdTree< PointT >.
Definition at line 82 of file kdtree_flann.hpp.
|
overridevirtual |
Provide a pointer to the input dataset.
| [in] | cloud | the const boost shared pointer to a PointCloud message |
| [in] | indices | the point indices subset that is to be used from cloud - if NULL the whole cloud is used |
Reimplemented from pcl::KdTree< PointT >.
Definition at line 100 of file kdtree_flann.hpp.
Referenced by pcl::gpu::DataSource::findKNNeghbors(), pcl::gpu::DataSource::findRadiusNeghbors(), pcl::getApproximateIndices(), and pcl::TextureMapping< PointInT >::textureMeshwithMultipleCameras().
| void pcl::KdTreeFLANN< PointT, Dist >::setSortedResults | ( | bool | sorted | ) |
Definition at line 91 of file kdtree_flann.hpp.