39#ifndef PCL_KEYPOINTS_AGAST_KEYPOINT_2D_IMPL_H_
40#define PCL_KEYPOINTS_AGAST_KEYPOINT_2D_IMPL_H_
42#include <pcl/common/io.h>
48template <
typename Po
intInT,
typename Po
intOutT,
typename IntensityT>
bool
53 PCL_ERROR (
"[pcl::%s::initCompute] init failed.!\n", name_.c_str ());
57 if (!input_->isOrganized ())
59 PCL_ERROR (
"[pcl::%s::initCompute] %s doesn't support non organized clouds!\n", name_.c_str ());
67template <
typename Po
intInT,
typename Po
intOutT>
void
71 const std::size_t width = input_->width;
72 const std::size_t height = input_->height;
75 std::vector<unsigned char> image_data (width*height);
77 for (std::size_t i = 0; i < image_data.size (); ++i)
78 image_data[i] =
static_cast<unsigned char> (intensity_ ((*input_)[i]));
83 detector_->setMaxKeypoints (nr_max_keypoints_);
85 if (apply_non_max_suppression_)
88 detector_->detectKeypoints (image_data, tmp_cloud);
91 image_data, tmp_cloud, detector_, output);
96 image_data, detector_, output);
100 output.is_dense =
true;
105#define AgastKeypoint2D(T,I) template class PCL_EXPORTS pcl::AgastKeypoint2D<T,I>;
bool initCompute() override
Initializes everything and checks whether input data is fine.
typename Keypoint< PointInT, PointOutT >::PointCloudOut PointCloudOut
void detectKeypoints(PointCloudOut &output) override
Detects the keypoints.
Keypoint represents the base class for key points.
PointCloud represents the base class in PCL for storing collections of 3D points.
Detector class for AGAST corner point detector (7_12s).