39#ifndef PCL_KEYPOINT_IMPL_H_
40#define PCL_KEYPOINT_IMPL_H_
42#include <pcl/console/print.h>
44#include <pcl/search/organized.h>
45#include <pcl/search/kdtree.h>
50template <
typename Po
intInT,
typename Po
intOutT>
bool
59 if (
input_->isOrganized ())
77 PCL_ERROR (
"[pcl::%s::initCompute] Both radius (%f) and K (%d) defined! Set one of them to zero first and then re-run compute ().\n",
getClassName ().c_str (),
search_radius_,
k_);
88 return tree_->radiusSearch (index, radius, k_indices, k_distances, 0);
96 return tree_->radiusSearch (cloud, index, radius, k_indices, k_distances, 0);
110 return tree_->nearestKSearch (index, k, k_indices, k_distances);
118 return tree_->nearestKSearch (cloud, index, k, k_indices, k_distances);
124 PCL_ERROR (
"[pcl::%s::initCompute] Neither radius nor K defined! Set one of them to a positive number first and then re-run compute ().\n",
getClassName ().c_str ());
136template <
typename Po
intInT,
typename Po
intOutT>
inline void
141 PCL_ERROR (
"[pcl::%s::compute] initCompute failed!\n",
getClassName ().c_str ());
146 detectKeypoints (output);
151 if (input_ == surface_)
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.
const std::string & getClassName() const
Get a string representation of the name of this class.
int k_
The number of K nearest neighbors to use for each point.
virtual bool initCompute()
pcl::PointCloud< PointInT > PointCloudIn
double search_parameter_
The actual search parameter (casted from either search_radius_ or k_).
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
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.
double search_radius_
The nearest neighbors search radius for each point.
PointCloudConstPtr input_
bool initCompute()
This method should get called before starting the actual computation.
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...
OrganizedNeighbor is a class for optimized nearest neighbor search in organized projectable point clo...
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.