|
Point Cloud Library (PCL)
1.6.0
|
search::FlannSearch is a generic FLANN wrapper class for the new search interface. More...
#include <pcl/search/flann_search.h>


Classes | |
| class | FlannIndexCreator |
| Helper class that creates a FLANN index from a given FLANN matrix. More... | |
| class | KdTreeIndexCreator |
| Creates a FLANN KdTreeSingleIndex from the given input data. More... | |
Public Types | |
| typedef boost::shared_ptr < FlannSearch< PointT > > | Ptr |
| typedef boost::shared_ptr < const FlannSearch< PointT > > | ConstPtr |
| typedef PointCloud::Ptr | PointCloudPtr |
Public Member Functions | |
| FlannSearch (bool sorted=true, FlannIndexCreator *creator=new KdTreeIndexCreator()) | |
| virtual | ~FlannSearch () |
| Destructor for FlannSearch. | |
| void | setEpsilon (double eps) |
| Set the search epsilon precision (error bound) for nearest neighbors searches. | |
| double | getEpsilon () |
| Get the search epsilon precision (error bound) for nearest neighbors searches. | |
| virtual 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 the k-nearest neighbors for the given query point. | |
| virtual void | nearestKSearch (const PointCloud &cloud, const std::vector< int > &indices, int k, std::vector< std::vector< int > > &k_indices, std::vector< std::vector< float > > &k_sqr_distances) const |
| Search for the 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. | |
| virtual void | radiusSearch (const PointCloud &cloud, const std::vector< int > &indices, double radius, std::vector< std::vector< int > > &k_indices, std::vector< std::vector< float > > &k_sqr_distances, unsigned int max_nn=0) const |
| Search for the k-nearest neighbors for the given query point. | |
| void | setPointRepresentation (const PointRepresentationConstPtr &point_representation) |
| Provide a pointer to the point representation to use to convert points into k-D vectors. | |
| PointRepresentationConstPtr const | getPointRepresentation () |
| Get a pointer to the point representation used when converting points into k-D vectors. | |
| virtual const std::string & | getName () const |
| returns the search method name | |
| virtual void | setSortedResults (bool sorted) |
| sets whether the results should be sorted (ascending in the distance) or not | |
| virtual PointCloudConstPtr | getInputCloud () const |
| Get a pointer to the input point cloud dataset. | |
| virtual IndicesConstPtr | getIndices () const |
| Get a pointer to the vector of indices used. | |
| 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). | |
| virtual void | nearestKSearch (const PointCloud &cloud, const std::vector< int > &indices, int k, std::vector< std::vector< int > > &k_indices, std::vector< std::vector< float > > &k_sqr_distances) const |
| Search for the k-nearest neighbors for the given query point. | |
| 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. | |
| template<typename PointTDiff > | |
| void | nearestKSearchT (const pcl::PointCloud< PointTDiff > &cloud, const std::vector< int > &indices, int k, std::vector< std::vector< int > > &k_indices, std::vector< std::vector< float > > &k_sqr_distances) const |
| Search for the 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). | |
| virtual void | radiusSearch (const PointCloud &cloud, const std::vector< int > &indices, double radius, std::vector< std::vector< int > > &k_indices, std::vector< 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. | |
| 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. | |
| template<typename PointTDiff > | |
| void | radiusSearchT (const pcl::PointCloud< PointTDiff > &cloud, const std::vector< int > &indices, double radius, std::vector< std::vector< int > > &k_indices, std::vector< std::vector< float > > &k_sqr_distances, unsigned int max_nn=0) const |
| Search for all the nearest neighbors of the query points in a given radius. | |
search::FlannSearch is a generic FLANN wrapper class for the new search interface.
It is able to wrap any FLANN index type, e.g. the kd tree as well as indices for high-dimensional searches and intended as a more powerful and cleaner successor to KdTreeFlann.
Definition at line 67 of file flann_search.h.
| typedef boost::shared_ptr<const FlannSearch<PointT> > pcl::search::FlannSearch< PointT, FlannDistance >::ConstPtr |
Reimplemented from pcl::search::Search< PointT >.
Definition at line 89 of file flann_search.h.
typedef PointCloud::Ptr pcl::search::Search< PointT >::PointCloudPtr [inherited] |
| typedef boost::shared_ptr<FlannSearch<PointT> > pcl::search::FlannSearch< PointT, FlannDistance >::Ptr |
Reimplemented from pcl::search::Search< PointT >.
Definition at line 88 of file flann_search.h.
| pcl::search::FlannSearch< PointT, FlannDistance >::FlannSearch | ( | bool | sorted = true, |
| FlannIndexCreator * | creator = new KdTreeIndexCreator() |
||
| ) |
Definition at line 57 of file flann_search.hpp.
| pcl::search::FlannSearch< PointT, FlannDistance >::~FlannSearch | ( | ) | [virtual] |
Destructor for FlannSearch.
Definition at line 66 of file flann_search.hpp.
| double pcl::search::FlannSearch< PointT, FlannDistance >::getEpsilon | ( | ) | [inline] |
Get the search epsilon precision (error bound) for nearest neighbors searches.
Definition at line 146 of file flann_search.h.
| virtual IndicesConstPtr pcl::search::Search< PointT >::getIndices | ( | ) | const [inline, virtual, inherited] |
| virtual PointCloudConstPtr pcl::search::Search< PointT >::getInputCloud | ( | ) | const [inline, virtual, inherited] |
| virtual const std::string& pcl::search::Search< PointT >::getName | ( | ) | const [inline, virtual, inherited] |
| PointRepresentationConstPtr const pcl::search::FlannSearch< PointT, FlannDistance >::getPointRepresentation | ( | ) | [inline] |
Get a pointer to the point representation used when converting points into k-D vectors.
Definition at line 220 of file flann_search.h.
| int pcl::search::FlannSearch< PointT, FlannDistance >::nearestKSearch | ( | const PointT & | point, |
| int | k, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances | ||
| ) | const [virtual] |
Search for the k-nearest neighbors for the given query point.
| [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!) |
Implements pcl::search::Search< PointT >.
Definition at line 86 of file flann_search.hpp.
| void pcl::search::FlannSearch< PointT, FlannDistance >::nearestKSearch | ( | const PointCloud & | cloud, |
| const std::vector< int > & | indices, | ||
| int | k, | ||
| std::vector< std::vector< int > > & | k_indices, | ||
| std::vector< std::vector< float > > & | k_sqr_distances | ||
| ) | const [virtual] |
Search for the k-nearest neighbors for the given query point.
| [in] | cloud | the point cloud data |
| [in] | indices | a vector of point cloud indices to query for nearest neighbors |
| [in] | k | the number of neighbors to search for |
| [out] | k_indices | the resultant indices of the neighboring points, k_indices[i] corresponds to the neighbors of the query point i |
| [out] | k_sqr_distances | the resultant squared distances to the neighboring points, k_sqr_distances[i] corresponds to the neighbors of the query point i |
Definition at line 127 of file flann_search.hpp.
| virtual int pcl::search::Search< 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 |
Reimplemented in pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >.
| virtual int pcl::search::Search< 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 |
Reimplemented in pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >.
| virtual void pcl::search::Search< PointT >::nearestKSearch | ( | const PointCloud & | cloud, |
| const std::vector< int > & | indices, | ||
| int | k, | ||
| std::vector< std::vector< int > > & | k_indices, | ||
| std::vector< std::vector< float > > & | k_sqr_distances | ||
| ) | const [inline, virtual, inherited] |
Search for the k-nearest neighbors for the given query point.
| [in] | cloud | the point cloud data |
| [in] | indices | a vector of point cloud indices to query for nearest neighbors |
| [in] | k | the number of neighbors to search for |
| [out] | k_indices | the resultant indices of the neighboring points, k_indices[i] corresponds to the neighbors of the query point i |
| [out] | k_sqr_distances | the resultant squared distances to the neighboring points, k_sqr_distances[i] corresponds to the neighbors of the query point i |
| int pcl::search::Search< 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!) |
| void pcl::search::Search< PointT >::nearestKSearchT | ( | const pcl::PointCloud< PointTDiff > & | cloud, |
| const std::vector< int > & | indices, | ||
| int | k, | ||
| std::vector< std::vector< int > > & | k_indices, | ||
| std::vector< std::vector< float > > & | k_sqr_distances | ||
| ) | const [inline, inherited] |
Search for the k-nearest neighbors for the given query point.
Use this method if the query points are of a different type than the points in the data set (e.g. PointXYZRGBA instead of PointXYZ).
| [in] | cloud | the point cloud data |
| [in] | indices | a vector of point cloud indices to query for nearest neighbors |
| [in] | k | the number of neighbors to search for |
| [out] | k_indices | the resultant indices of the neighboring points, k_indices[i] corresponds to the neighbors of the query point i |
| [out] | k_sqr_distances | the resultant squared distances to the neighboring points, k_sqr_distances[i] corresponds to the neighbors of the query point i |
| int pcl::search::FlannSearch< PointT, FlannDistance >::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 | 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. |
Implements pcl::search::Search< PointT >.
Definition at line 213 of file flann_search.hpp.
| void pcl::search::FlannSearch< PointT, FlannDistance >::radiusSearch | ( | const PointCloud & | cloud, |
| const std::vector< int > & | indices, | ||
| double | radius, | ||
| std::vector< std::vector< int > > & | k_indices, | ||
| std::vector< std::vector< float > > & | k_sqr_distances, | ||
| unsigned int | max_nn = 0 |
||
| ) | const [virtual] |
Search for the k-nearest neighbors for the given query point.
| [in] | cloud | the point cloud data |
| [in] | indices | a vector of point cloud indices to query for nearest neighbors |
| [in] | radius | the radius of the sphere bounding all of p_q's neighbors |
| [out] | k_indices | the resultant indices of the neighboring points, k_indices[i] corresponds to the neighbors of the query point i |
| [out] | k_sqr_distances | the resultant squared distances to the neighboring points, k_sqr_distances[i] corresponds to the neighbors of the query point i |
| [in] | max_nn | if given, bounds the maximum returned neighbors to this value |
Definition at line 255 of file flann_search.hpp.
| virtual int pcl::search::Search< 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 |
Reimplemented in pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >.
| virtual int pcl::search::Search< 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 |
Reimplemented in pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >.
| virtual void pcl::search::Search< PointT >::radiusSearch | ( | const PointCloud & | cloud, |
| const std::vector< int > & | indices, | ||
| double | radius, | ||
| std::vector< std::vector< int > > & | k_indices, | ||
| std::vector< 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] | indices | the indices in cloud. If indices is empty, neighbors will be searched for all points. |
| [in] | radius | the radius of the sphere bounding all of p_q's neighbors |
| [out] | k_indices | the resultant indices of the neighboring points, k_indices[i] corresponds to the neighbors of the query point i |
| [out] | k_sqr_distances | the resultant squared distances to the neighboring points, k_sqr_distances[i] corresponds to the neighbors of the query point i |
| [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. |
| int pcl::search::Search< 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::search::Search< PointT >::radiusSearchT | ( | const pcl::PointCloud< PointTDiff > & | cloud, |
| const std::vector< int > & | indices, | ||
| double | radius, | ||
| std::vector< std::vector< int > > & | k_indices, | ||
| std::vector< std::vector< float > > & | k_sqr_distances, | ||
| unsigned int | max_nn = 0 |
||
| ) | const [inline, inherited] |
Search for all the nearest neighbors of the query points in a given radius.
| [in] | cloud | the point cloud data |
| [in] | indices | a vector of point cloud indices to query for nearest neighbors |
| [in] | radius | the radius of the sphere bounding all of p_q's neighbors |
| [out] | k_indices | the resultant indices of the neighboring points, k_indices[i] corresponds to the neighbors of the query point i |
| [out] | k_sqr_distances | the resultant squared distances to the neighboring points, k_sqr_distances[i] corresponds to the neighbors of the query point i |
| [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::search::FlannSearch< PointT, FlannDistance >::setEpsilon | ( | double | eps | ) | [inline] |
Set the search epsilon precision (error bound) for nearest neighbors searches.
| [in] | eps | precision (error bound) for nearest neighbors searches |
Definition at line 139 of file flann_search.h.
| void pcl::search::FlannSearch< PointT, FlannDistance >::setInputCloud | ( | const PointCloudConstPtr & | cloud, |
| const IndicesConstPtr & | indices = IndicesConstPtr () |
||
| ) | [inline, 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 |
Reimplemented from pcl::search::Search< PointT >.
Definition at line 75 of file flann_search.hpp.
| void pcl::search::FlannSearch< PointT, FlannDistance >::setPointRepresentation | ( | const PointRepresentationConstPtr & | point_representation | ) | [inline] |
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 |
Definition at line 212 of file flann_search.h.
| virtual void pcl::search::Search< PointT >::setSortedResults | ( | bool | sorted | ) | [inline, virtual, inherited] |
sets whether the results should be sorted (ascending in the distance) or not
| [in] | sorted | should be true if the results should be sorted by the distance in ascending order. Otherwise the results may be returned in any order. |
Reimplemented in pcl::search::KdTree< PointT >.
1.7.6.1