Point Cloud Library (PCL)
1.10.0
|
41 #include <pcl/search/search.h>
43 #include <pcl/point_representation.h>
48 template<
typename T>
struct L2;
99 template<
typename Po
intT,
typename FlannDistance=flann::L2_Simple <
float> >
166 unsigned int max_leaf_size_;
272 nearestKSearch (
const PointT &point,
int k, std::vector<int> &k_indices, std::vector<float> &k_sqr_distances)
const override;
284 std::vector< std::vector<int> >& k_indices, std::vector< std::vector<float> >& k_sqr_distances)
const override;
298 std::vector<int> &k_indices, std::vector<float> &k_sqr_distances,
299 unsigned int max_nn = 0)
const override;
310 radiusSearch (
const PointCloud& cloud,
const std::vector<int>& indices,
double radius, std::vector< std::vector<int> >& k_indices,
311 std::vector< std::vector<float> >& k_sqr_distances,
unsigned int max_nn=0)
const override;
320 dim_ = point_representation->getNumberOfDimensions ();
371 #define PCL_INSTANTIATE_FlannSearch(T) template class PCL_EXPORTS pcl::search::FlannSearch<T>;
This file defines compatibility wrappers for low level I/O functions.
shared_ptr< FlannIndexCreator > FlannIndexCreatorPtr
FlannSearch(bool sorted=true, FlannIndexCreatorPtr creator=FlannIndexCreatorPtr(new KdTreeIndexCreator()))
IndexPtr createIndex(MatrixConstPtr data) override
Create a FLANN Index from the input data.
typename Search< PointT >::PointCloudConstPtr PointCloudConstPtr
KdTreeIndexCreator(unsigned int max_leaf_size=15)
~KdTreeIndexCreator()
Empty destructor.
int checks_
Number of checks to perform for approximate NN search using the multiple randomized tree index.
int radiusSearch(const PointT &point, double radius, std::vector< int > &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.
shared_ptr< const Indices > IndicesConstPtr
void setChecks(int checks)
Set the number of checks to perform during approximate searches in multiple randomized trees.
shared_ptr< const flann::Matrix< float > > MatrixConstPtr
typename PointRepresentation::Ptr PointRepresentationPtr
shared_ptr< const PointRepresentation< PointT > > ConstPtr
Creates a FLANN KdTreeSingleIndex from the given input data.
PointCloud represents the base class in PCL for storing collections of 3D points.
int getChecks()
Get the number of checks to perform during approximate searches in multiple randomized trees.
A point structure representing Euclidean xyz coordinates, and the RGB color.
void convertInputToFlannMatrix()
converts the input data to a format usable by FLANN
virtual IndexPtr createIndex(MatrixConstPtr data)=0
Create a FLANN Index from the input data.
shared_ptr< flann::Matrix< float > > MatrixPtr
typename PointRepresentation::ConstPtr PointRepresentationConstPtr
typename PointCloud::ConstPtr PointCloudConstPtr
Creates a FLANN KdTreeIndex of multiple randomized trees from the given input data,...
PointCloudConstPtr input_
PointRepresentationConstPtr point_representation_
MatrixPtr input_flann_
Input data in FLANN format.
PointRepresentation provides a set of methods for converting a point structs/object into an n-dimensi...
double getEpsilon()
Get the search epsilon precision (error bound) for nearest neighbors searches.
shared_ptr< FlannSearch< PointT, FlannDistance > > Ptr
bool input_copied_for_flann_
Helper class that creates a FLANN index from a given FLANN matrix.
IndexPtr index_
The FLANN index.
Creates a FLANN KdTreeSingleIndex from the given input data.
shared_ptr< std::vector< int > > IndicesPtr
virtual ~KMeansIndexCreator()
Empty destructor.
void setEpsilon(double eps)
Set the search epsilon precision (error bound) for nearest neighbors searches.
KdTreeMultiIndexCreator(int trees=4)
float eps_
Epsilon for approximate NN search.
shared_ptr< const FlannSearch< PointT, FlannDistance > > ConstPtr
typename Search< PointT >::PointCloud PointCloud
virtual ~FlannIndexCreator()
destructor
shared_ptr< flann::NNIndex< FlannDistance > > IndexPtr
search::FlannSearch is a generic FLANN wrapper class for the new search interface.
virtual IndexPtr createIndex(MatrixConstPtr data)
Create a FLANN Index from the input data.
int nearestKSearch(const PointT &point, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances) const override
Search for the k-nearest neighbors for the given query point.
shared_ptr< const std::vector< int > > IndicesConstPtr
virtual IndexPtr createIndex(MatrixConstPtr data)
Create a FLANN Index from the input data.
FlannIndexCreatorPtr creator_
The index creator, used to (re-) create the index when the search data is passed.
virtual ~KdTreeMultiIndexCreator()
Empty destructor.
void setPointRepresentation(const PointRepresentationConstPtr &point_representation)
Provide a pointer to the point representation to use to convert points into k-D vectors.
shared_ptr< PointRepresentation< PointT > > Ptr
const PointRepresentationConstPtr getPointRepresentation()
Get a pointer to the point representation used when converting points into k-D vectors.
std::vector< int > index_mapping_
KMeansIndexCreator()
All FLANN kd trees created by this class will have a maximum of max_leaf_size points per leaf node.
void setInputCloud(const PointCloudConstPtr &cloud, const IndicesConstPtr &indices=IndicesConstPtr()) override
Provide a pointer to the input dataset.
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
~FlannSearch()
Destructor for FlannSearch.