Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef PCL_NARF_KEYPOINT_H_
00039 #define PCL_NARF_KEYPOINT_H_
00040
00041 #include <pcl/pcl_macros.h>
00042 #include <pcl/point_cloud.h>
00043 #include <pcl/point_types.h>
00044 #include <pcl/keypoints/keypoint.h>
00045
00046 namespace pcl {
00047
00048
00049 class RangeImage;
00050 class RangeImageBorderExtractor;
00051
00057 class PCL_EXPORTS NarfKeypoint : public Keypoint<PointWithRange, int>
00058 {
00059 public:
00060
00061 typedef Keypoint<PointWithRange, int> BaseClass;
00062
00063 typedef Keypoint<PointWithRange, int>::PointCloudOut PointCloudOut;
00064
00065
00067 struct Parameters
00068 {
00069 Parameters() : support_size(-1.0f), max_no_of_interest_points(-1), min_distance_between_interest_points(0.25f),
00070 optimal_distance_to_high_surface_change(0.25), min_interest_value(0.45f),
00071 min_surface_change_score(0.2f), optimal_range_image_patch_size(10),
00072 distance_for_additional_points(0.0f), add_points_on_straight_edges(false),
00073 do_non_maximum_suppression(true), no_of_polynomial_approximations_per_point(0),
00074 max_no_of_threads(1), use_recursive_scale_reduction(false),
00075 calculate_sparse_interest_image(true) {}
00076
00077 float support_size;
00078 int max_no_of_interest_points;
00079 float min_distance_between_interest_points;
00082 float optimal_distance_to_high_surface_change;
00086 float min_interest_value;
00087 float min_surface_change_score;
00088 int optimal_range_image_patch_size;
00092
00093 float distance_for_additional_points;
00097 bool add_points_on_straight_edges;
00099 bool do_non_maximum_suppression;
00102 bool no_of_polynomial_approximations_per_point;
00105 int max_no_of_threads;
00106 bool use_recursive_scale_reduction;
00108 bool calculate_sparse_interest_image;
00110 };
00111
00112
00113 NarfKeypoint (RangeImageBorderExtractor* range_image_border_extractor=NULL, float support_size=-1.0f);
00114 ~NarfKeypoint ();
00115
00116
00118 void
00119 clearData ();
00120
00122 void
00123 setRangeImageBorderExtractor (RangeImageBorderExtractor* range_image_border_extractor);
00124
00126 RangeImageBorderExtractor*
00127 getRangeImageBorderExtractor () { return range_image_border_extractor_; }
00128
00130 void
00131 setRangeImage (const RangeImage* range_image);
00132
00134 float*
00135 getInterestImage () { calculateInterestImage(); return interest_image_;}
00136
00138 const ::pcl::PointCloud<InterestPoint>&
00139 getInterestPoints () { calculateInterestPoints(); return *interest_points_;}
00140
00142 const std::vector<bool>&
00143 getIsInterestPointImage () { calculateInterestPoints(); return is_interest_point_image_;}
00144
00146 Parameters&
00147 getParameters () { return parameters_;}
00148
00150 const RangeImage&
00151 getRangeImage ();
00152
00154 void
00155 compute (PointCloudOut& output);
00156
00157 protected:
00158
00159 void
00160 calculateScaleSpace ();
00161 void
00162 calculateInterestImage ();
00163 void
00164 calculateCompleteInterestImage ();
00165 void
00166 calculateSparseInterestImage ();
00167 void
00168 calculateInterestPoints ();
00169
00170
00172 virtual void
00173 detectKeypoints (PointCloudOut& output);
00174
00175
00176 using BaseClass::name_;
00177 RangeImageBorderExtractor* range_image_border_extractor_;
00178 Parameters parameters_;
00179 float* interest_image_;
00180 ::pcl::PointCloud<InterestPoint>* interest_points_;
00181 std::vector<bool> is_interest_point_image_;
00182 std::vector<RangeImage*> range_image_scale_space_;
00183 std::vector<RangeImageBorderExtractor*> border_extractor_scale_space_;
00184 std::vector<float*> interest_image_scale_space_;
00185 };
00186
00190 inline std::ostream&
00191 operator << (std::ostream& os, const NarfKeypoint::Parameters& p)
00192 {
00193 os << PVARC(p.support_size) << PVARC(p.min_distance_between_interest_points)
00194 << PVARC(p.min_interest_value) << PVARN(p.distance_for_additional_points);
00195 return (os);
00196 }
00197
00198 }
00199
00200 #endif //#ifndef PCL_NARF_KEYPOINT_H_