Point Cloud Library (PCL)
1.11.1-dev
|
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 Member Functions | |
Octree (const double resolution) | |
Octree constructor. More... | |
~Octree () | |
Empty Destructor. More... | |
void | setInputCloud (const PointCloudConstPtr &cloud) |
Provide a pointer to the input dataset. More... | |
void | setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices) override |
Provide a pointer to the input dataset. More... | |
int | nearestKSearch (const PointCloud &cloud, index_t index, int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const override |
Search for the k-nearest neighbors for the given query point. More... | |
int | nearestKSearch (const PointT &point, int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const override |
Search for the k-nearest neighbors for the given query point. More... | |
int | nearestKSearch (index_t index, int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const override |
Search for the k-nearest neighbors for the given query point (zero-copy). More... | |
int | radiusSearch (const PointCloud &cloud, index_t index, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const override |
search for all neighbors of query point that are within a given radius. More... | |
int | radiusSearch (const PointT &p_q, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const override |
search for all neighbors of query point that are within a given radius. More... | |
int | radiusSearch (index_t index, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const override |
search for all neighbors of query point that are within a given radius. More... | |
void | approxNearestSearch (const PointCloudConstPtr &cloud, index_t query_index, index_t &result_index, float &sqr_distance) |
Search for approximate nearest neighbor at the query point. More... | |
void | approxNearestSearch (const PointT &p_q, index_t &result_index, float &sqr_distance) |
Search for approximate nearest neighbor at the query point. More... | |
void | approxNearestSearch (index_t query_index, index_t &result_index, float &sqr_distance) |
Search for approximate nearest neighbor at the query point. More... | |
Public Member Functions inherited from pcl::search::Search< PointT > | |
Search (const std::string &name="", bool sorted=false) | |
Constructor. More... | |
virtual | ~Search () |
Destructor. More... | |
virtual const std::string & | getName () const |
Returns the search method name. More... | |
virtual void | setSortedResults (bool sorted) |
sets whether the results should be sorted (ascending in the distance) or not More... | |
virtual bool | getSortedResults () |
Gets whether the results should be sorted (ascending in the distance) or not Otherwise the results may be returned in any order. More... | |
virtual PointCloudConstPtr | getInputCloud () const |
Get a pointer to the input point cloud dataset. More... | |
virtual IndicesConstPtr | getIndices () const |
Get a pointer to the vector of indices used. More... | |
template<typename PointTDiff > | |
int | nearestKSearchT (const PointTDiff &point, int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const |
Search for k-nearest neighbors for the given query point. More... | |
virtual void | nearestKSearch (const PointCloud &cloud, const Indices &indices, int k, std::vector< Indices > &k_indices, std::vector< std::vector< float > > &k_sqr_distances) const |
Search for the k-nearest neighbors for the given query point. More... | |
template<typename PointTDiff > | |
void | nearestKSearchT (const pcl::PointCloud< PointTDiff > &cloud, const Indices &indices, int k, std::vector< Indices > &k_indices, std::vector< std::vector< float > > &k_sqr_distances) const |
Search for the k-nearest neighbors for the given query point. 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 void | radiusSearch (const PointCloud &cloud, const Indices &indices, double radius, std::vector< Indices > &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. More... | |
template<typename PointTDiff > | |
void | radiusSearchT (const pcl::PointCloud< PointTDiff > &cloud, const Indices &indices, double radius, std::vector< Indices > &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. More... | |
Public Attributes | |
OctreePointCloudSearchPtr | tree_ |
Additional Inherited Members | |
Protected Member Functions inherited from pcl::search::Search< PointT > | |
void | sortResults (Indices &indices, std::vector< float > &distances) const |
Protected Attributes inherited from pcl::search::Search< PointT > | |
PointCloudConstPtr | input_ |
IndicesConstPtr | indices_ |
bool | sorted_results_ |
std::string | name_ |
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.
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::ConstPtr = shared_ptr<const pcl::search::Octree<PointT,LeafTWrap,BranchTWrap,OctreeT> > |
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::OctreePointCloudSearchConstPtr = typename pcl::octree::OctreePointCloudSearch<PointT, LeafTWrap, BranchTWrap>::ConstPtr |
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::OctreePointCloudSearchPtr = typename pcl::octree::OctreePointCloudSearch<PointT, LeafTWrap, BranchTWrap>::Ptr |
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::PointCloud = pcl::PointCloud<PointT> |
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::PointCloudConstPtr = typename PointCloud::ConstPtr |
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::PointCloudPtr = typename PointCloud::Ptr |
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::Ptr = shared_ptr<pcl::search::Octree<PointT,LeafTWrap,BranchTWrap,OctreeT> > |
|
inline |
|
inline |
|
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 |
|
inline |
|
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 |
|
inlineoverridevirtual |
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!) |
Reimplemented from pcl::search::Search< PointT >.
|
inlineoverridevirtual |
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 >.
|
inlineoverridevirtual |
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!) |
Reimplemented from pcl::search::Search< PointT >.
|
inlineoverridevirtual |
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 |
Reimplemented from pcl::search::Search< PointT >.
|
inlineoverridevirtual |
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 >.
|
inlineoverridevirtual |
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 |
Reimplemented from pcl::search::Search< PointT >.
|
inline |
Provide a pointer to the input dataset.
[in] | cloud | the const boost shared pointer to a PointCloud message |
|
inlineoverridevirtual |
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 >.
OctreePointCloudSearchPtr pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::tree_ |
Definition at line 82 of file octree.h.
Referenced by pcl::search::Octree< PointInT >::approxNearestSearch(), pcl::search::Octree< PointInT >::nearestKSearch(), pcl::search::Octree< PointInT >::radiusSearch(), and pcl::search::Octree< PointInT >::setInputCloud().