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 size_t width = input_->width;
69 const size_t height = input_->height;
72 std::vector<unsigned char> image_data (width*height);
74 for (
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);
101 #define AgastKeypoint2D(T,I) template class PCL_EXPORTS pcl::AgastKeypoint2D<T,I>; Detector class for AGAST corner point detector (7_12s).
virtual void detectKeypoints(PointCloudOut &output)
Detects the keypoints.
Keypoint represents the base class for key points.
PointCloud represents the base class in PCL for storing collections of 3D points.
bool initCompute()
Initializes everything and checks whether input data is fine.
bool is_dense
True if no points are invalid (e.g., have NaN or Inf values in any of their floating point fields).