39 #ifndef PCL_KEYPOINTS_AGAST_KEYPOINT_2D_IMPL_H_
40 #define PCL_KEYPOINTS_AGAST_KEYPOINT_2D_IMPL_H_
42 #include <pcl/common/io.h>
45 template <
typename Po
intInT,
typename Po
intOutT,
typename IntensityT>
bool
50 PCL_ERROR (
"[pcl::%s::initCompute] init failed.!\n", name_.c_str ());
54 if (!input_->isOrganized ())
56 PCL_ERROR (
"[pcl::%s::initCompute] %s doesn't support non organized clouds!\n", name_.c_str ());
64 template <
typename Po
intInT,
typename Po
intOutT>
void
68 const std::size_t width = input_->width;
69 const std::size_t height = input_->height;
72 std::vector<unsigned char> image_data (width*height);
74 for (std::size_t i = 0; i < image_data.size (); ++i)
75 image_data[i] =
static_cast<unsigned char> (intensity_ ((*input_)[i]));
80 detector_->setMaxKeypoints (nr_max_keypoints_);
82 if (apply_non_max_suppression_)
85 detector_->detectKeypoints (image_data, tmp_cloud);
88 image_data, tmp_cloud, detector_, output);
93 image_data, detector_, output);
97 output.is_dense =
true;
101 #define AgastKeypoint2D(T,I) template class PCL_EXPORTS pcl::AgastKeypoint2D<T,I>;