|
Point Cloud Library (PCL)
1.6.0
|
KdTreeFLANN is a generic type of 3D spatial locator using kD-tree structures. More...
#include <pcl/kdtree/kdtree_flann.h>


Public Types | |
| typedef KdTree< PointT > ::PointCloud | PointCloud |
| typedef KdTree< PointT > ::PointCloudConstPtr | PointCloudConstPtr |
| typedef boost::shared_ptr < std::vector< int > > | IndicesPtr |
| typedef boost::shared_ptr < const std::vector< int > > | IndicesConstPtr |
| typedef flann::Index< Dist > | FLANNIndex |
| typedef boost::shared_ptr < KdTreeFLANN< PointT > > | Ptr |
| typedef boost::shared_ptr < const KdTreeFLANN< PointT > > | ConstPtr |
| typedef boost::shared_ptr < PointCloud > | PointCloudPtr |
| typedef pcl::PointRepresentation < PointT > | PointRepresentation |
| typedef boost::shared_ptr < const PointRepresentation > | PointRepresentationConstPtr |
Public Member Functions | |
| KdTreeFLANN (bool sorted=true) | |
| Default Constructor for KdTreeFLANN. | |
| KdTreeFLANN (const KdTreeFLANN< PointT > &k) | |
| Copy constructor. | |
| KdTreeFLANN< PointT > & | operator= (const KdTreeFLANN< PointT > &k) |
| Copy operator. | |
| void | setEpsilon (float eps) |
| Set the search epsilon precision (error bound) for nearest neighbors searches. | |
| void | setSortedResults (bool sorted) |
| Ptr | makeShared () |
| virtual | ~KdTreeFLANN () |
| Destructor for KdTreeFLANN. | |
| void | setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices=IndicesConstPtr()) |
| Provide a pointer to the input dataset. | |
| int | nearestKSearch (const PointT &point, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances) const |
| Search for k-nearest neighbors for the given query point. | |
| int | radiusSearch (const PointT &point, double radius, std::vector< int > &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. | |
| IndicesConstPtr | getIndices () const |
| Get a pointer to the vector of indices used. | |
| PointCloudConstPtr | getInputCloud () const |
| Get a pointer to the input point cloud dataset. | |
| void | setPointRepresentation (const PointRepresentationConstPtr &point_representation) |
| Provide a pointer to the point representation to use to convert points into k-D vectors. | |
| PointRepresentationConstPtr | getPointRepresentation () const |
| Get a pointer to the point representation used when converting points into k-D vectors. | |
| virtual int | nearestKSearch (const PointCloud &cloud, int index, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances) const |
| Search for k-nearest neighbors for the given query point. | |
| virtual int | nearestKSearch (int index, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances) const |
| Search for k-nearest neighbors for the given query point (zero-copy). | |
| template<typename PointTDiff > | |
| int | nearestKSearchT (const PointTDiff &point, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances) const |
| Search for k-nearest neighbors for the given query point. | |
| virtual int | radiusSearch (const PointCloud &cloud, int index, double radius, std::vector< int > &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. | |
| virtual int | radiusSearch (int index, double radius, std::vector< int > &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). | |
| template<typename PointTDiff > | |
| int | radiusSearchT (const PointTDiff &point, double radius, std::vector< int > &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. | |
| float | getEpsilon () const |
| Get the search epsilon precision (error bound) for nearest neighbors searches. | |
| void | setMinPts (int min_pts) |
| Minimum allowed number of k nearest neighbors points that a viable result must contain. | |
| int | getMinPts () const |
| Get the minimum allowed number of k nearest neighbors points that a viable result must contain. | |
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 57 of file kdtree_flann.h.
| typedef boost::shared_ptr<const KdTreeFLANN<PointT> > pcl::KdTreeFLANN< PointT, Dist >::ConstPtr |
Reimplemented from pcl::KdTree< PointT >.
Definition at line 78 of file kdtree_flann.h.
| typedef flann::Index<Dist> pcl::KdTreeFLANN< PointT, Dist >::FLANNIndex |
Definition at line 74 of file kdtree_flann.h.
| typedef boost::shared_ptr<const std::vector<int> > pcl::KdTreeFLANN< PointT, Dist >::IndicesConstPtr |
Reimplemented from pcl::KdTree< PointT >.
Definition at line 72 of file kdtree_flann.h.
| typedef boost::shared_ptr<std::vector<int> > pcl::KdTreeFLANN< PointT, Dist >::IndicesPtr |
Reimplemented from pcl::KdTree< PointT >.
Definition at line 71 of file kdtree_flann.h.
| typedef KdTree<PointT>::PointCloud pcl::KdTreeFLANN< PointT, Dist >::PointCloud |
Reimplemented from pcl::KdTree< PointT >.
Definition at line 68 of file kdtree_flann.h.
| typedef KdTree<PointT>::PointCloudConstPtr pcl::KdTreeFLANN< PointT, Dist >::PointCloudConstPtr |
Reimplemented from pcl::KdTree< PointT >.
Definition at line 69 of file kdtree_flann.h.
typedef boost::shared_ptr<PointCloud> pcl::KdTree< PointT >::PointCloudPtr [inherited] |
typedef pcl::PointRepresentation<PointT> pcl::KdTree< PointT >::PointRepresentation [inherited] |
typedef boost::shared_ptr<const PointRepresentation> pcl::KdTree< PointT >::PointRepresentationConstPtr [inherited] |
| typedef boost::shared_ptr<KdTreeFLANN<PointT> > pcl::KdTreeFLANN< PointT, Dist >::Ptr |
Reimplemented from pcl::KdTree< PointT >.
Definition at line 77 of file kdtree_flann.h.
| pcl::KdTreeFLANN< PointT, Dist >::KdTreeFLANN | ( | bool | sorted = true | ) | [inline] |
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 85 of file kdtree_flann.h.
| pcl::KdTreeFLANN< PointT, Dist >::KdTreeFLANN | ( | const KdTreeFLANN< PointT > & | k | ) | [inline] |
Copy constructor.
| [in] | tree | the tree to copy into this |
Definition at line 98 of file kdtree_flann.h.
| virtual pcl::KdTreeFLANN< PointT, Dist >::~KdTreeFLANN | ( | ) | [inline, virtual] |
Destructor for KdTreeFLANN.
Deletes all allocated data arrays and destroys the kd-tree structures.
Definition at line 151 of file kdtree_flann.h.
| float pcl::KdTree< PointT >::getEpsilon | ( | ) | const [inline, inherited] |
| IndicesConstPtr pcl::KdTree< PointT >::getIndices | ( | ) | const [inline, inherited] |
| PointCloudConstPtr pcl::KdTree< PointT >::getInputCloud | ( | ) | const [inline, inherited] |
| int pcl::KdTree< PointT >::getMinPts | ( | ) | const [inline, inherited] |
| PointRepresentationConstPtr pcl::KdTree< PointT >::getPointRepresentation | ( | ) | const [inline, inherited] |
| Ptr pcl::KdTreeFLANN< PointT, Dist >::makeShared | ( | ) | [inline] |
Definition at line 146 of file kdtree_flann.h.
| virtual int pcl::KdTree< PointT >::nearestKSearch | ( | const PointCloud & | cloud, |
| int | index, | ||
| int | k, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances | ||
| ) | const [inline, virtual, inherited] |
Search for k-nearest neighbors for the given query point.
| [in] | cloud | the point cloud data |
| [in] | index | a valid index in cloud representing a 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 |
| int pcl::KdTreeFLANN< PointT, Dist >::nearestKSearch | ( | const PointT & | point, |
| int | k, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances | ||
| ) | const [virtual] |
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 79 of file kdtree_flann.hpp.
| virtual int pcl::KdTree< PointT >::nearestKSearch | ( | int | index, |
| int | k, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances | ||
| ) | const [inline, virtual, inherited] |
Search for k-nearest neighbors for the given query point (zero-copy).
| [in] | index | a valid index representing a valid query point in the dataset given by setInputCloud. If indices were given in setInputCloud, index will be the position in the indices vector. |
| [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 |
| int pcl::KdTree< PointT >::nearestKSearchT | ( | const PointTDiff & | point, |
| int | k, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances | ||
| ) | const [inline, inherited] |
Search for k-nearest neighbors for the given query point.
This method accepts a different template parameter for the point type.
| [in] | point | the given 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!) |
| KdTreeFLANN<PointT>& pcl::KdTreeFLANN< PointT, Dist >::operator= | ( | const KdTreeFLANN< PointT > & | k | ) | [inline] |
Copy operator.
| [in] | tree | the tree to copy into this |
Definition at line 113 of file kdtree_flann.h.
| int pcl::KdTreeFLANN< PointT, Dist >::radiusSearch | ( | const PointT & | point, |
| double | radius, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances, | ||
| unsigned int | max_nn = 0 |
||
| ) | const [virtual] |
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 116 of file kdtree_flann.hpp.
| virtual int pcl::KdTree< PointT >::radiusSearch | ( | const PointCloud & | cloud, |
| int | index, | ||
| double | radius, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances, | ||
| unsigned int | max_nn = 0 |
||
| ) | const [inline, virtual, inherited] |
Search for all the nearest neighbors of the query point in a given radius.
| [in] | cloud | the point cloud data |
| [in] | index | a valid index in cloud representing a 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 |
| virtual int pcl::KdTree< PointT >::radiusSearch | ( | int | index, |
| double | radius, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances, | ||
| unsigned int | max_nn = 0 |
||
| ) | const [inline, virtual, inherited] |
Search for all the nearest neighbors of the query point in a given radius (zero-copy).
| [in] | index | a valid index representing a valid query point in the dataset given by setInputCloud. If indices were given in setInputCloud, index will be the position in the indices vector. |
| [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 |
| int pcl::KdTree< PointT >::radiusSearchT | ( | const PointTDiff & | point, |
| double | radius, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances, | ||
| unsigned int | max_nn = 0 |
||
| ) | const [inline, inherited] |
Search for all the nearest neighbors of the query point in a given radius.
| [in] | point | the given 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. |
| void pcl::KdTreeFLANN< PointT, Dist >::setEpsilon | ( | float | eps | ) | [inline, virtual] |
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 131 of file kdtree_flann.h.
| void pcl::KdTreeFLANN< PointT, Dist >::setInputCloud | ( | const PointCloudConstPtr & | cloud, |
| const IndicesConstPtr & | indices = IndicesConstPtr () |
||
| ) | [virtual] |
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 46 of file kdtree_flann.hpp.
| void pcl::KdTree< PointT >::setMinPts | ( | int | min_pts | ) | [inline, inherited] |
| void pcl::KdTree< PointT >::setPointRepresentation | ( | const PointRepresentationConstPtr & | point_representation | ) | [inline, inherited] |
Provide a pointer to the point representation to use to convert points into k-D vectors.
| [in] | point_representation | the const boost shared pointer to a PointRepresentation |
| void pcl::KdTreeFLANN< PointT, Dist >::setSortedResults | ( | bool | sorted | ) | [inline] |
Definition at line 139 of file kdtree_flann.h.
1.7.6.1