|
Point Cloud Library (PCL)
1.4.0
|
search::Octree is a wrapper class which implements nearest neighbor search operations based on the pcl::octree::Octree structure. More...
#include <pcl/search/octree.h>


Public Types | |
| typedef boost::shared_ptr < std::vector< int > > | IndicesPtr |
| typedef boost::shared_ptr < const std::vector< int > > | IndicesConstPtr |
| typedef pcl::PointCloud< PointT > | PointCloud |
| typedef boost::shared_ptr < PointCloud > | PointCloudPtr |
| typedef boost::shared_ptr < const PointCloud > | PointCloudConstPtr |
| typedef boost::shared_ptr < pcl::octree::OctreePointCloudSearch < PointT, LeafTWrap, OctreeT > > | Ptr |
| typedef boost::shared_ptr < const pcl::octree::OctreePointCloudSearch < PointT, LeafTWrap, OctreeT > > | ConstPtr |
Public Member Functions | |
| Octree (const double resolution) | |
| Octree constructor. | |
| virtual | ~Octree () |
| Empty Destructor. | |
| void | setInputCloud (const PointCloudConstPtr &cloud) |
| Provide a pointer to the input dataset. | |
| void | setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices) |
| Provide a pointer to the input dataset. | |
| PointCloudConstPtr | getInputCloud () |
| Get a pointer to the input dataset as passed by the user. | |
| IndicesConstPtr const | getIndices () |
| Get a pointer to the set of input indices used as passed by the user. | |
| int | nearestKSearch (const PointCloud &cloud, int index, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances) |
| Search for the k-nearest neighbors for the given query point. | |
| int | nearestKSearch (const PointT &point, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances) |
| Search for the k-nearest neighbors for the given query point. | |
| int | nearestKSearch (int index, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances) |
| Search for the k-nearest neighbors for the given query point (zero-copy). | |
| int | radiusSearch (const PointCloud &cloud, int index, double radius, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances, int max_nn=INT_MAX) |
| search for all neighbors of query point that are within a given radius. | |
| int | radiusSearch (const PointT &p_q, const double radius, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances, int max_nn=INT_MAX) const |
| search for all neighbors of query point that are within a given radius. | |
| int | radiusSearch (int index, const double radius, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances, int max_nn=INT_MAX) const |
| search for all neighbors of query point that are within a given radius. | |
| void | approxNearestSearch (const PointCloudConstPtr &cloud, int query_index, int &result_index, float &sqr_distance) |
| Search for approximate nearest neighbor at the query point. | |
| void | approxNearestSearch (const PointT &p_q, int &result_index, float &sqr_distance) |
| Search for approximate nearest neighbor at the query point. | |
| void | approxNearestSearch (int query_index, int &result_index, float &sqr_distance) |
| Search for approximate nearest neighbor at the query point. | |
| virtual void | setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices) |
| Pass the input dataset that the search will be performed on. | |
| virtual void | setInputCloud (const PointCloudConstPtr &cloud)=0 |
| Pass the input dataset that the search will be performed on. | |
| 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) |
| 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) |
| Search for the 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) |
| Search for the k-nearest neighbors for the given query point. | |
| 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, int max_nn=-1) |
| 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, int max_nn=-1) |
| 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, int max_nn=-1) |
| Search for all the nearest neighbors of the query points in a given radius. | |
Public Attributes | |
| Ptr | tree_ |
search::Octree is a wrapper class which implements nearest neighbor search operations based on the pcl::octree::Octree structure.
The octree pointcloud class needs to be initialized with its voxel resolution. Its bounding box is automatically adjusted according to the pointcloud dimension or it can be predefined. Note: The tree depth equates to the resolution and the bounding box dimensions of the octree.
| typedef boost::shared_ptr<const pcl::octree::OctreePointCloudSearch<PointT, LeafTWrap, OctreeT> > pcl::search::Octree< PointT, LeafTWrap, OctreeT >::ConstPtr |
Reimplemented from pcl::search::Search< PointT >.
| typedef boost::shared_ptr<const std::vector<int> > pcl::search::Octree< PointT, LeafTWrap, OctreeT >::IndicesConstPtr |
Reimplemented from pcl::search::Search< PointT >.
| typedef boost::shared_ptr<std::vector<int> > pcl::search::Octree< PointT, LeafTWrap, OctreeT >::IndicesPtr |
Reimplemented from pcl::search::Search< PointT >.
| typedef pcl::PointCloud<PointT> pcl::search::Octree< PointT, LeafTWrap, OctreeT >::PointCloud |
Reimplemented from pcl::search::Search< PointT >.
| typedef boost::shared_ptr<const PointCloud> pcl::search::Octree< PointT, LeafTWrap, OctreeT >::PointCloudConstPtr |
Reimplemented from pcl::search::Search< PointT >.
| typedef boost::shared_ptr<PointCloud> pcl::search::Octree< PointT, LeafTWrap, OctreeT >::PointCloudPtr |
Reimplemented from pcl::search::Search< PointT >.
| typedef boost::shared_ptr<pcl::octree::OctreePointCloudSearch<PointT, LeafTWrap, OctreeT> > pcl::search::Octree< PointT, LeafTWrap, OctreeT >::Ptr |
Reimplemented from pcl::search::Search< PointT >.
| pcl::search::Octree< PointT, LeafTWrap, OctreeT >::Octree | ( | const double | resolution | ) | [inline] |
| virtual pcl::search::Octree< PointT, LeafTWrap, OctreeT >::~Octree | ( | ) | [inline, virtual] |
| void pcl::search::Octree< PointT, LeafTWrap, OctreeT >::approxNearestSearch | ( | const PointCloudConstPtr & | cloud, |
| int | query_index, | ||
| int & | result_index, | ||
| float & | sqr_distance | ||
| ) | [inline] |
Search for approximate nearest neighbor at the query point.
| [in] | cloud | the point cloud data |
| [in] | query_index | the index in cloud representing the query point |
| [out] | result_index | the resultant index of the neighbor point |
| [out] | sqr_distance | the resultant squared distance to the neighboring point |
| void pcl::search::Octree< PointT, LeafTWrap, OctreeT >::approxNearestSearch | ( | const PointT & | p_q, |
| int & | result_index, | ||
| float & | sqr_distance | ||
| ) | [inline] |
| void pcl::search::Octree< PointT, LeafTWrap, OctreeT >::approxNearestSearch | ( | int | query_index, |
| int & | result_index, | ||
| float & | sqr_distance | ||
| ) | [inline] |
Search for approximate nearest neighbor at the query point.
| query_index | index representing the query point in the dataset given by setInputCloud. If indices were given in setInputCloud, index will be the position in the indices vector. |
| result_index | the resultant index of the neighbor point |
| sqr_distance | the resultant squared distance to the neighboring point |
| IndicesConstPtr const pcl::search::Octree< PointT, LeafTWrap, OctreeT >::getIndices | ( | ) | [inline, virtual] |
Get a pointer to the set of input indices used as passed by the user.
Reimplemented from pcl::search::Search< PointT >.
| PointCloudConstPtr pcl::search::Octree< PointT, LeafTWrap, OctreeT >::getInputCloud | ( | ) | [inline, virtual] |
Get a pointer to the input dataset as passed by the user.
Implements pcl::search::Search< PointT >.
| int pcl::search::Octree< PointT, LeafTWrap, OctreeT >::nearestKSearch | ( | const PointCloud & | cloud, |
| int | index, | ||
| int | k, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances | ||
| ) | [inline, virtual] |
Search for the k-nearest neighbors for the given query point.
| [in] | cloud | the point cloud data |
| [in] | index | the index in cloud representing the 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 >.
| int pcl::search::Octree< PointT, LeafTWrap, OctreeT >::nearestKSearch | ( | const PointT & | point, |
| int | k, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances | ||
| ) | [inline, 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 >.
| int pcl::search::Octree< PointT, LeafTWrap, OctreeT >::nearestKSearch | ( | int | index, |
| int | k, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances | ||
| ) | [inline, virtual] |
Search for the k-nearest neighbors for the given query point (zero-copy).
| [in] | index | the index representing the 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!) |
Implements pcl::search::Search< PointT >.
| 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 | ||
| ) | [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 | ||
| ) | [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. PointXYZRGB instead of PointXYZ).
| [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 | ||
| ) | [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. PointXYZRGB 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::Octree< PointT, LeafTWrap, OctreeT >::radiusSearch | ( | const PointCloud & | cloud, |
| int | index, | ||
| double | radius, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances, | ||
| int | max_nn = INT_MAX |
||
| ) | [inline, virtual] |
search for all neighbors of query point that are within a given radius.
| cloud | the point cloud data |
| index | the index in cloud representing the query point |
| radius | the radius of the sphere bounding all of p_q's neighbors |
| k_indices | the resultant indices of the neighboring points |
| k_sqr_distances | the resultant squared distances to the neighboring points |
| max_nn | if given, bounds the maximum returned neighbors to this value |
Implements pcl::search::Search< PointT >.
| int pcl::search::Octree< PointT, LeafTWrap, OctreeT >::radiusSearch | ( | const PointT & | p_q, |
| const double | radius, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances, | ||
| int | max_nn = INT_MAX |
||
| ) | const [inline, virtual] |
search for all neighbors of query point that are within a given radius.
| p_q | the given query point |
| radius | the radius of the sphere bounding all of p_q's neighbors |
| k_indices | the resultant indices of the neighboring points |
| k_sqr_distances | the resultant squared distances to the neighboring points |
| max_nn | if given, bounds the maximum returned neighbors to this value |
Implements pcl::search::Search< PointT >.
| int pcl::search::Octree< PointT, LeafTWrap, OctreeT >::radiusSearch | ( | int | index, |
| const double | radius, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances, | ||
| int | max_nn = INT_MAX |
||
| ) | const [inline, virtual] |
search for all neighbors of query point that are within a given radius.
| index | index representing the query point in the dataset given by setInputCloud. If indices were given in setInputCloud, index will be the position in the indices vector |
| radius | radius of the sphere bounding all of p_q's neighbors |
| k_indices | the resultant indices of the neighboring points |
| k_sqr_distances | the resultant squared distances to the neighboring points |
| max_nn | if given, bounds the maximum returned neighbors to this value |
Implements pcl::search::Search< PointT >.
| 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, | ||
| int | max_nn = -1 |
||
| ) | [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 |
| int pcl::search::Search< PointT >::radiusSearchT | ( | const PointTDiff & | point, |
| double | radius, | ||
| std::vector< int > & | k_indices, | ||
| std::vector< float > & | k_sqr_distances, | ||
| int | max_nn = -1 |
||
| ) | [inline, inherited] |
Search for all the nearest neighbors of the query point in a given radius.
Use this method if the query points are of a different type than the points in the data set (e.g. PointXYZRGB instead of PointXYZ).
| [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 |
| 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, | ||
| int | max_nn = -1 |
||
| ) | [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 per query point to this value |
| virtual void pcl::search::Search< PointT >::setInputCloud | ( | const PointCloudConstPtr & | cloud, |
| const IndicesConstPtr & | indices | ||
| ) | [inline, virtual, inherited] |
Pass the input dataset that the search will be performed on.
| [in] | cloud | a const pointer to the PointCloud data |
| [in] | indices | the point indices subset that is to be used from the cloud |
Reimplemented in pcl::search::KdTree< PointT >, and pcl::search::BruteForce< PointT >.
| void pcl::search::Octree< PointT, LeafTWrap, OctreeT >::setInputCloud | ( | const PointCloudConstPtr & | cloud | ) | [inline] |
Provide a pointer to the input dataset.
| [in] | cloud | the const boost shared pointer to a PointCloud message |
| virtual void pcl::search::Search< PointT >::setInputCloud | ( | const PointCloudConstPtr & | cloud | ) | [pure virtual, inherited] |
Pass the input dataset that the search will be performed on.
| [in] | cloud | a const pointer to the PointCloud data |
Implemented in pcl::search::KdTree< PointT >, and pcl::search::BruteForce< PointT >.
| void pcl::search::Octree< PointT, LeafTWrap, OctreeT >::setInputCloud | ( | const PointCloudConstPtr & | cloud, |
| const IndicesConstPtr & | indices | ||
| ) | [inline] |
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 |
| Ptr pcl::search::Octree< PointT, LeafTWrap, OctreeT >::tree_ |
1.7.6.1