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
00039
00040
00041 #ifndef PCL_FEATURES_USC_H_
00042 #define PCL_FEATURES_USC_H_
00043
00044 #include <pcl/point_types.h>
00045 #include <pcl/features/feature.h>
00046
00047 namespace pcl
00048 {
00063 template <typename PointInT, typename PointOutT = pcl::ShapeContext1980, typename PointRFT = pcl::ReferenceFrame>
00064 class UniqueShapeContext : public Feature<PointInT, PointOutT>,
00065 public FeatureWithLocalReferenceFrames<PointInT, PointRFT>
00066 {
00067 public:
00068 using Feature<PointInT, PointOutT>::feature_name_;
00069 using Feature<PointInT, PointOutT>::getClassName;
00070 using Feature<PointInT, PointOutT>::indices_;
00071 using Feature<PointInT, PointOutT>::search_parameter_;
00072 using Feature<PointInT, PointOutT>::search_radius_;
00073 using Feature<PointInT, PointOutT>::surface_;
00074 using Feature<PointInT, PointOutT>::fake_surface_;
00075 using Feature<PointInT, PointOutT>::input_;
00076 using Feature<PointInT, PointOutT>::searchForNeighbors;
00077 using FeatureWithLocalReferenceFrames<PointInT, PointRFT>::frames_;
00078
00079 typedef typename Feature<PointInT, PointOutT>::PointCloudOut PointCloudOut;
00080 typedef typename Feature<PointInT, PointOutT>::PointCloudIn PointCloudIn;
00081 typedef typename boost::shared_ptr<UniqueShapeContext<PointInT, PointOutT, PointRFT> > Ptr;
00082 typedef typename boost::shared_ptr<const UniqueShapeContext<PointInT, PointOutT, PointRFT> > ConstPtr;
00083
00084
00086 UniqueShapeContext () :
00087 radii_interval_(0), theta_divisions_(0), phi_divisions_(0), volume_lut_(0),
00088 azimuth_bins_(12), elevation_bins_(11), radius_bins_(15),
00089 min_radius_(0.1), point_density_radius_(0.2), descriptor_length_ (), local_radius_ (2.5)
00090 {
00091 feature_name_ = "UniqueShapeContext";
00092 search_radius_ = 2.5;
00093 }
00094
00095 virtual ~UniqueShapeContext() { }
00096
00097
00098
00099
00101 inline size_t
00102 getAzimuthBins () const { return (azimuth_bins_); }
00103
00104
00105
00106
00108 inline size_t
00109 getElevationBins () const { return (elevation_bins_); }
00110
00111
00112
00113
00115 inline size_t
00116 getRadiusBins () const { return (radius_bins_); }
00117
00121 inline void
00122 setMinimalRadius (double radius) { min_radius_ = radius; }
00123
00125 inline double
00126 getMinimalRadius () const { return (min_radius_); }
00127
00132 inline void
00133 setPointDensityRadius (double radius) { point_density_radius_ = radius; }
00134
00136 inline double
00137 getPointDensityRadius () const { return (point_density_radius_); }
00138
00142 inline void
00143 setLocalRadius (double radius) { local_radius_ = radius; }
00144
00146 inline double
00147 getLocalRadius () const { return (local_radius_); }
00148
00149 protected:
00154 void
00155 computePointDescriptor (size_t index, std::vector<float> &desc);
00156
00158 virtual bool
00159 initCompute ();
00160
00164 virtual void
00165 computeFeature (PointCloudOut &output);
00166
00168 std::vector<float> radii_interval_;
00169
00171 std::vector<float> theta_divisions_;
00172
00174 std::vector<float> phi_divisions_;
00175
00177 std::vector<float> volume_lut_;
00178
00180 size_t azimuth_bins_;
00181
00183 size_t elevation_bins_;
00184
00186 size_t radius_bins_;
00187
00189 double min_radius_;
00190
00192 double point_density_radius_;
00193
00195 size_t descriptor_length_;
00196
00198 double local_radius_;
00199 };
00200 }
00201
00202 #ifdef PCL_NO_PRECOMPILE
00203 #include <pcl/features/impl/usc.hpp>
00204 #endif
00205
00206 #endif //#ifndef PCL_USC_H_