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 #ifndef PCL_ESF_H_
00041 #define PCL_ESF_H_
00042
00043 #include <pcl/features/feature.h>
00044 #define GRIDSIZE 64
00045 #define GRIDSIZE_H GRIDSIZE/2
00046
00047 #include <vector>
00048
00049 namespace pcl
00050 {
00059 template <typename PointInT, typename PointOutT = pcl::ESFSignature640>
00060 class ESFEstimation: public Feature<PointInT, PointOutT>
00061 {
00062 public:
00063 using Feature<PointInT, PointOutT>::feature_name_;
00064 using Feature<PointInT, PointOutT>::getClassName;
00065 using Feature<PointInT, PointOutT>::indices_;
00066 using Feature<PointInT, PointOutT>::k_;
00067 using Feature<PointInT, PointOutT>::search_radius_;
00068 using Feature<PointInT, PointOutT>::input_;
00069 using Feature<PointInT, PointOutT>::surface_;
00070
00071 typedef typename pcl::PointCloud<PointInT> PointCloudIn;
00072 typedef typename Feature<PointInT, PointOutT>::PointCloudOut PointCloudOut;
00073
00075 ESFEstimation () : lut_ (), local_cloud_ ()
00076 {
00077 feature_name_ = "ESFEstimation";
00078 lut_.resize (GRIDSIZE);
00079 for (int i = 0; i < GRIDSIZE; ++i)
00080 {
00081 lut_[i].resize (GRIDSIZE);
00082 for (int j = 0; j < GRIDSIZE; ++j)
00083 lut_[i][j].resize (GRIDSIZE);
00084 }
00085
00086 search_radius_ = 0;
00087 k_ = 5;
00088 }
00089
00093 void
00094 compute (PointCloudOut &output);
00095
00096 protected:
00097
00102 void
00103 computeFeature (PointCloudOut &output);
00104
00106 int
00107 lci (const int x1, const int y1, const int z1,
00108 const int x2, const int y2, const int z2,
00109 float &ratio, int &incnt, int &pointcount);
00110
00112 void
00113 computeESF (PointCloudIn &pc, std::vector<float> &hist);
00114
00116 void
00117 voxelize9 (PointCloudIn &cluster);
00118
00120 void
00121 cleanup9 (PointCloudIn &cluster);
00122
00124 void
00125 scale_points_unit_sphere (const pcl::PointCloud<PointInT> &pc, float scalefactor, Eigen::Vector4f& centroid);
00126
00127 private:
00128
00130
00131 std::vector<std::vector<std::vector<int> > > lut_;
00132
00134 PointCloudIn local_cloud_;
00135
00139 void
00140 computeFeatureEigen (pcl::PointCloud<Eigen::MatrixXf> &) {}
00141 };
00142 }
00143
00144 #endif // #