|
Point Cloud Library (PCL)
1.15.1-dev
|
Implementation of a simple brute force search algorithm. More...
#include <pcl/search/brute_force.h>
Inheritance diagram for pcl::search::BruteForce< PointT >:
Collaboration diagram for pcl::search::BruteForce< PointT >:Public Member Functions | |
| BruteForce (bool sorted_results=false) | |
| ~BruteForce () override=default | |
| Destructor for KdTree. More... | |
| int | nearestKSearch (const PointT &point, int k, Indices &k_indices, std::vector< float > &k_distances) const override |
| Search for the 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::search::Search< PointT > | |
| Search (const std::string &name="", bool sorted=false) | |
| Constructor. More... | |
| virtual | ~Search ()=default |
| 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 bool | setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices=IndicesConstPtr()) |
| Pass the input dataset that the search will be performed on. 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 int | nearestKSearch (const PointCloud &cloud, index_t index, 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 (index_t index, 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 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 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 |
| Search for all the nearest neighbors of the query point in a given radius. More... | |
| virtual int | radiusSearch (index_t 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... | |
| 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... | |
| void | setNumberOfThreads (unsigned int nr_threads) |
| Set the number of threads to use for searching over multiple points or indices. More... | |
Additional Inherited Members | |
Public Types inherited from pcl::search::Search< PointT > | |
| using | PointCloud = pcl::PointCloud< PointT > |
| using | PointCloudPtr = typename PointCloud::Ptr |
| using | PointCloudConstPtr = typename PointCloud::ConstPtr |
| using | Ptr = shared_ptr< pcl::search::Search< PointT > > |
| using | ConstPtr = shared_ptr< const pcl::search::Search< PointT > > |
| using | IndicesPtr = pcl::IndicesPtr |
| using | IndicesConstPtr = pcl::IndicesConstPtr |
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_ |
| unsigned int | num_threads_ {1} |
| The number of threads to use when searching over multiple points or indices. More... | |
Implementation of a simple brute force search algorithm.
Definition at line 51 of file brute_force.h.
|
inline |
Definition at line 87 of file brute_force.h.
|
overridedefault |
Destructor for KdTree.
|
overridevirtual |
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_distances | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
Implements pcl::search::Search< PointT >.
Definition at line 54 of file brute_force.hpp.
References pcl::isFinite().
|
overridevirtual |
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 334 of file brute_force.hpp.
References pcl::isFinite().