41 #include <pcl/pcl_base.h>
42 #include <pcl/search/pcl_search.h>
43 #include <pcl/pcl_config.h>
53 template <
typename Po
intInT,
typename Po
intOutT>
54 class Keypoint :
public PCLBase<PointInT>
57 using Ptr = shared_ptr<Keypoint<PointInT, PointOutT> >;
58 using ConstPtr = shared_ptr<const Keypoint<PointInT, PointOutT> >;
70 using SearchMethod = std::function<int (int, double, std::vector<int> &, std::vector<float> &)>;
71 using SearchMethodSurface = std::function<int (const PointCloudIn &cloud, int index, double, std::vector<int> &, std::vector<float> &)>;
155 searchForNeighbors (
int index,
double parameter, std::vector<int> &indices, std::vector<float> &distances)
const
196 inline const std::string&
205 #include <pcl/keypoints/impl/keypoint.hpp>
~Keypoint()
Empty destructor.
std::function< int(const PointCloudIn &cloud, int index, double, std::vector< int > &, std::vector< float > &)> SearchMethodSurface
PointCloudInConstPtr surface_
An input point cloud describing the surface that is to be used for nearest neighbors estimation...
void setSearchMethod(const KdTreePtr &tree)
Provide a pointer to the search object.
void setRadiusSearch(double radius)
Set the sphere radius that is to be used for determining the nearest neighbors used for the key point...
Keypoint()
Empty constructor.
PointCloudInConstPtr getSearchSurface()
Get a pointer to the surface point cloud dataset.
virtual void setSearchSurface(const PointCloudInConstPtr &cloud)
Provide a pointer to the input dataset that we need to estimate features at every point for...
pcl::PointIndicesConstPtr getKeypointsIndices()
double getRadiusSearch()
Get the sphere radius used for determining the neighbors.
virtual void detectKeypoints(PointCloudOut &output)=0
Abstract key point detection method.
SearchMethod search_method_
The search method template for indices.
std::string name_
The key point detection method's name.
void compute(PointCloudOut &output)
Base method for key point detection for all points given in using t...
void setKSearch(int k)
Set the number of k nearest neighbors to use for the feature estimation.
double search_parameter_
The actual search parameter (casted from either search_radius_ or k_).
KdTreePtr getSearchMethod()
Get a pointer to the search method used.
double getSearchParameter()
Get the internal search parameter.
typename PointCloudIn::Ptr PointCloudInPtr
shared_ptr< Keypoint< PointInT, PointOutT > > Ptr
shared_ptr< PointCloud< PointInT > > Ptr
SearchMethodSurface search_method_surface_
The search method template for points.
PointIndices::ConstPtr PointIndicesConstPtr
typename PointCloudIn::ConstPtr PointCloudInConstPtr
pcl::PointCloud< PointOutT > PointCloudOut
typename KdTree::Ptr KdTreePtr
virtual bool initCompute()
KdTreePtr tree_
A pointer to the spatial search object.
int searchForNeighbors(int index, double parameter, std::vector< int > &indices, std::vector< float > &distances) const
Search for k-nearest neighbors using the spatial locator from setSearchmethod, and the given surface ...
shared_ptr< const Keypoint< PointInT, PointOutT > > ConstPtr
shared_ptr< const PointCloud< PointInT > > ConstPtr
int k_
The number of K nearest neighbors to use for each point.
std::function< int(int, double, std::vector< int > &, std::vector< float > &)> SearchMethod
pcl::PointIndicesPtr keypoints_indices_
Indices of the keypoints in the input cloud.
PointCloudConstPtr input_
The input point cloud dataset.
shared_ptr< pcl::search::Search< PointInT > > Ptr
const std::string & getClassName() const
Get a string representation of the name of this class.
double search_radius_
The nearest neighbors search radius for each point.
int getKSearch()
get the number of k nearest neighbors used for the feature estimation.
PointIndices::Ptr PointIndicesPtr