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>
50 template <
typename Po
intInT,
typename Po
intOutT>
bool
59 if (input_->isOrganized ())
70 tree_->setInputCloud (surface_);
73 if (search_radius_ != 0.0)
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_);
82 search_parameter_ = search_radius_;
83 if (surface_ == input_)
86 search_method_ = [
this] (
pcl::index_t index,
double radius,
pcl::Indices &k_indices, std::vector<float> &k_distances)
88 return tree_->radiusSearch (index, radius, k_indices, k_distances, 0);
96 return tree_->radiusSearch (cloud, index, radius, k_indices, k_distances, 0);
104 search_parameter_ = k_;
105 if (surface_ == input_)
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 ());
130 keypoints_indices_->indices.reserve (input_->size ());
136 template <
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_)
Keypoint represents the base class for key points.
virtual bool initCompute()
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.