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