39 #ifndef PCL_KEYPOINTS_AGAST_KEYPOINT_2D_H_
40 #define PCL_KEYPOINTS_AGAST_KEYPOINT_2D_H_
42 #include <pcl/point_cloud.h>
43 #include <pcl/point_types.h>
44 #include <pcl/keypoints/keypoint.h>
45 #include <pcl/common/intensity.h>
65 typedef boost::shared_ptr<AbstractAgastDetector>
Ptr;
66 typedef boost::shared_ptr<const AbstractAgastDetector>
ConstPtr;
76 const double threshold,
80 , threshold_ (threshold)
81 , nr_max_keypoints_ (std::numeric_limits<unsigned int>::max ())
93 detectKeypoints (
const std::vector<unsigned char> &intensity_data,
101 detectKeypoints (
const std::vector<float> &intensity_data,
110 applyNonMaxSuppression (
const std::vector<unsigned char>& intensity_data,
120 applyNonMaxSuppression (
const std::vector<float>& intensity_data,
128 computeCornerScore (
const unsigned char* im)
const = 0;
135 computeCornerScore (
const float* im)
const = 0;
143 threshold_ = threshold;
160 nr_max_keypoints_ = nr_max_keypoints;
167 return (nr_max_keypoints_);
175 detect (
const unsigned char* im,
176 std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const = 0;
183 detect (
const float* im,
184 std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &)
const = 0;
220 const std::vector<ScoreIndex>& scores,
229 computeCornerScores (
const unsigned char* im,
230 const std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > & corners_all,
231 std::vector<ScoreIndex> & scores);
239 computeCornerScores (
const float* im,
240 const std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > & corners_all,
241 std::vector<ScoreIndex> & scores);
269 typedef boost::shared_ptr<AgastDetector7_12s>
Ptr;
270 typedef boost::shared_ptr<const AgastDetector7_12s>
ConstPtr;
280 const double threshold,
281 const double bmax = 255)
294 computeCornerScore (
const unsigned char* im)
const;
300 computeCornerScore (
const float* im)
const;
307 detect (
const unsigned char* im, std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const;
314 detect (
const float* im, std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const;
323 static const int border_width_ = 2;
326 int_fast16_t s_offset0_;
327 int_fast16_t s_offset1_;
328 int_fast16_t s_offset2_;
329 int_fast16_t s_offset3_;
330 int_fast16_t s_offset4_;
331 int_fast16_t s_offset5_;
332 int_fast16_t s_offset6_;
333 int_fast16_t s_offset7_;
334 int_fast16_t s_offset8_;
335 int_fast16_t s_offset9_;
336 int_fast16_t s_offset10_;
337 int_fast16_t s_offset11_;
351 typedef boost::shared_ptr<AgastDetector5_8>
Ptr;
352 typedef boost::shared_ptr<const AgastDetector5_8>
ConstPtr;
362 const double threshold,
363 const double bmax = 255)
376 computeCornerScore (
const unsigned char* im)
const;
382 computeCornerScore (
const float* im)
const;
389 detect (
const unsigned char* im, std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const;
396 detect (
const float* im, std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const;
405 static const int border_width_ = 1;
408 int_fast16_t s_offset0_;
409 int_fast16_t s_offset1_;
410 int_fast16_t s_offset2_;
411 int_fast16_t s_offset3_;
412 int_fast16_t s_offset4_;
413 int_fast16_t s_offset5_;
414 int_fast16_t s_offset6_;
415 int_fast16_t s_offset7_;
429 typedef boost::shared_ptr<OastDetector9_16>
Ptr;
430 typedef boost::shared_ptr<const OastDetector9_16>
ConstPtr;
440 const double threshold,
441 const double bmax = 255)
454 computeCornerScore (
const unsigned char* im)
const;
460 computeCornerScore (
const float* im)
const;
467 detect (
const unsigned char* im, std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const;
474 detect (
const float* im, std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const;
483 static const int border_width_ = 3;
486 int_fast16_t s_offset0_;
487 int_fast16_t s_offset1_;
488 int_fast16_t s_offset2_;
489 int_fast16_t s_offset3_;
490 int_fast16_t s_offset4_;
491 int_fast16_t s_offset5_;
492 int_fast16_t s_offset6_;
493 int_fast16_t s_offset7_;
494 int_fast16_t s_offset8_;
495 int_fast16_t s_offset9_;
496 int_fast16_t s_offset10_;
497 int_fast16_t s_offset11_;
498 int_fast16_t s_offset12_;
499 int_fast16_t s_offset13_;
500 int_fast16_t s_offset14_;
501 int_fast16_t s_offset15_;
514 template <
typename Out>
518 const std::vector<unsigned char> &image_data,
524 detector->applyNonMaxSuppression (image_data, tmp_cloud, output_temp);
525 pcl::copyPointCloud<pcl::PointUV, Out> (output_temp, output);
534 const std::vector<unsigned char> &image_data,
539 detector->applyNonMaxSuppression (image_data, tmp_cloud, output);
543 template <
typename Out>
547 const std::vector<unsigned char> &image_data,
552 detector->detectKeypoints (image_data, output_temp);
553 pcl::copyPointCloud<pcl::PointUV, Out> (output_temp, output);
562 const std::vector<unsigned char> &image_data,
566 detector->detectKeypoints (image_data, output);
588 template <
typename Po
intInT,
typename Po
intOutT,
typename IntensityT = pcl::common::IntensityFieldAccessor<Po
intInT> >
752 template <
typename Po
intInT,
typename Po
intOutT = pcl::Po
intUV>
772 name_ =
"AgastKeypoint2D";
816 :
public AgastKeypoint2DBase<pcl::PointXYZ, pcl::PointUV, pcl::common::IntensityFieldAccessor<pcl::PointXYZ> >
822 name_ =
"AgastKeypoint2D";
841 #include <pcl/keypoints/impl/agast_2d.hpp>