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