curvature_classifier.h
Go to the documentation of this file.
00001 
00063 #ifndef COB_3D_MAPPING_FEATURES_CURVATURE_CLASSIFIER_H_
00064 #define COB_3D_MAPPING_FEATURES_CURVATURE_CLASSIFIER_H_
00065 
00066 #include <pcl/point_cloud.h>
00067 #include <pcl/point_types.h>
00068 #include <pcl/pcl_base.h>
00069 #include "cob_3d_mapping_common/label_defines.h"
00070 
00071 namespace cob_3d_features
00072 {
00074   template<typename PointInT, typename PointOutT> class CurvatureClassifier : public pcl::PCLBase<PointInT>
00075   {
00076   public:
00077     using pcl::PCLBase<PointInT>::input_;
00078     using pcl::PCLBase<PointInT>::indices_;
00079     using pcl::PCLBase<PointInT>::initCompute;
00080 
00081     typedef pcl::PointCloud<PointInT> PointCloudIn;
00082     typedef typename PointCloudIn::Ptr PointCloudInPtr;
00083     typedef typename PointCloudIn::ConstPtr PointCloudInConstPtr;
00084 
00085     typedef pcl::PointCloud<PointOutT> PointCloudOut;
00086     typedef typename PointCloudOut::Ptr PointCloudOutPtr;
00087     typedef typename PointCloudOut::ConstPtr PointCloudOutConstPtr;
00088 
00090     CurvatureClassifier() :
00091       c_upper_(0.11),
00092       c_lower_(0.02),
00093       c_ratio_cylinder_sphere_(7.0),
00094       c_ratio_edge_corner_(2.75)
00095     {}
00097     ~CurvatureClassifier() {}
00098 
00099     void setUpperThreshold (const float &threshold)
00100     {
00101       c_upper_ = threshold;
00102     }
00103 
00104     void setLowerThreshold (const float &threshold)
00105     {
00106       c_lower_ = threshold;
00107     }
00108 
00109     void setMaxMinRatio (const float &ratio)
00110     {
00111       c_ratio_cylinder_sphere_ = ratio;
00112     }
00113 
00119     void classify(PointCloudOut &output);
00120 
00121     void classifyForSegmentation(PointCloudOut &output);
00122 
00123   protected:
00124     //virtual inline bool
00125     //  initCompute();
00126 
00127     float c_upper_; //everything above is edge
00128     float c_lower_; //everything below is plane
00129     float c_ratio_cylinder_sphere_; //max min ratio to differentiate between cylinder and sphere
00130     float c_ratio_edge_corner_; //max min ratio to differentiate between edge and corner
00131 
00132   };
00133 }
00134 
00135 #endif


cob_3d_features
Author(s): Georg Arbeiter
autogenerated on Wed Aug 26 2015 11:02:26