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;
134 computeCornerScore (
const float* im)
const = 0;
140 setThreshold (
const double threshold)
142 threshold_ = threshold;
157 setMaxKeypoints (
const unsigned int nr_max_keypoints)
159 nr_max_keypoints_ = nr_max_keypoints;
166 return (nr_max_keypoints_);
174 detect (
const unsigned char* im,
175 std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const = 0;
181 detect (
const float* im,
182 std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &)
const = 0;
218 const std::vector<ScoreIndex>& scores,
227 computeCornerScores (
const unsigned char* im,
228 const std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > & corners_all,
229 std::vector<ScoreIndex> & scores);
237 computeCornerScores (
const float* im,
238 const std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > & corners_all,
239 std::vector<ScoreIndex> & scores);
267 typedef boost::shared_ptr<AgastDetector7_12s>
Ptr;
268 typedef boost::shared_ptr<const AgastDetector7_12s>
ConstPtr;
278 const double threshold,
279 const double bmax = 255)
292 computeCornerScore (
const unsigned char* im)
const;
298 computeCornerScore (
const float* im)
const;
305 detect (
const unsigned char* im, std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const;
312 detect (
const float* im, std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const;
321 static const int border_width_ = 2;
324 int_fast16_t s_offset0_;
325 int_fast16_t s_offset1_;
326 int_fast16_t s_offset2_;
327 int_fast16_t s_offset3_;
328 int_fast16_t s_offset4_;
329 int_fast16_t s_offset5_;
330 int_fast16_t s_offset6_;
331 int_fast16_t s_offset7_;
332 int_fast16_t s_offset8_;
333 int_fast16_t s_offset9_;
334 int_fast16_t s_offset10_;
335 int_fast16_t s_offset11_;
349 typedef boost::shared_ptr<AgastDetector5_8>
Ptr;
350 typedef boost::shared_ptr<const AgastDetector5_8>
ConstPtr;
360 const double threshold,
361 const double bmax = 255)
374 computeCornerScore (
const unsigned char* im)
const;
380 computeCornerScore (
const float* im)
const;
387 detect (
const unsigned char* im, std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const;
394 detect (
const float* im, std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const;
403 static const int border_width_ = 1;
406 int_fast16_t s_offset0_;
407 int_fast16_t s_offset1_;
408 int_fast16_t s_offset2_;
409 int_fast16_t s_offset3_;
410 int_fast16_t s_offset4_;
411 int_fast16_t s_offset5_;
412 int_fast16_t s_offset6_;
413 int_fast16_t s_offset7_;
427 typedef boost::shared_ptr<OastDetector9_16>
Ptr;
428 typedef boost::shared_ptr<const OastDetector9_16>
ConstPtr;
438 const double threshold,
439 const double bmax = 255)
452 computeCornerScore (
const unsigned char* im)
const;
458 computeCornerScore (
const float* im)
const;
465 detect (
const unsigned char* im, std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const;
472 detect (
const float* im, std::vector<
pcl::PointUV, Eigen::aligned_allocator<pcl::PointUV> > &corners_all)
const;
481 static const int border_width_ = 3;
484 int_fast16_t s_offset0_;
485 int_fast16_t s_offset1_;
486 int_fast16_t s_offset2_;
487 int_fast16_t s_offset3_;
488 int_fast16_t s_offset4_;
489 int_fast16_t s_offset5_;
490 int_fast16_t s_offset6_;
491 int_fast16_t s_offset7_;
492 int_fast16_t s_offset8_;
493 int_fast16_t s_offset9_;
494 int_fast16_t s_offset10_;
495 int_fast16_t s_offset11_;
496 int_fast16_t s_offset12_;
497 int_fast16_t s_offset13_;
498 int_fast16_t s_offset14_;
499 int_fast16_t s_offset15_;
512 template <
typename Out>
516 const std::vector<unsigned char> &image_data,
522 detector->applyNonMaxSuppression (image_data, tmp_cloud, output_temp);
523 pcl::copyPointCloud<pcl::PointUV, Out> (output_temp, output);
532 const std::vector<unsigned char> &image_data,
537 detector->applyNonMaxSuppression (image_data, tmp_cloud, output);
541 template <
typename Out>
545 const std::vector<unsigned char> &image_data,
550 detector->detectKeypoints (image_data, output_temp);
551 pcl::copyPointCloud<pcl::PointUV, Out> (output_temp, output);
560 const std::vector<unsigned char> &image_data,
564 detector->detectKeypoints (image_data, output);
586 template <
typename Po
intInT,
typename Po
intOutT,
typename IntensityT = pcl::common::IntensityFieldAccessor<Po
intInT> >
750 template <
typename Po
intInT,
typename Po
intOutT = pcl::Po
intUV>
770 name_ =
"AgastKeypoint2D";
814 :
public AgastKeypoint2DBase<pcl::PointXYZ, pcl::PointUV, pcl::common::IntensityFieldAccessor<pcl::PointXYZ> >
820 name_ =
"AgastKeypoint2D";
839 #include <pcl/keypoints/impl/agast_2d.hpp>