organized_curvature_estimation.h
Go to the documentation of this file.
00001 
00063 #ifndef __ORGANIZED_CURVATURE_ESTIMATION_H__
00064 #define __ORGANIZED_CURVATURE_ESTIMATION_H__
00065 
00066 #include "cob_3d_features/organized_features.h"
00067 #include "cob_3d_mapping_common/label_defines.h"
00068 
00069 // number of currently used labels:
00070 #define I_SIZE 3
00071 
00072 namespace cob_3d_features
00073 {
00074   template <typename PointInT, typename PointNT, typename PointLabelT, typename PointOutT>
00075     class OrganizedCurvatureEstimation : public OrganizedFeatures<PointInT,PointOutT>
00076   {
00077     public:
00078 
00079     using OrganizedFeatures<PointInT,PointOutT>::pixel_search_radius_;
00080     using OrganizedFeatures<PointInT,PointOutT>::pixel_steps_;
00081     using OrganizedFeatures<PointInT,PointOutT>::circle_steps_;
00082     using OrganizedFeatures<PointInT,PointOutT>::n_points_;
00083     using OrganizedFeatures<PointInT,PointOutT>::mask_;
00084     using OrganizedFeatures<PointInT,PointOutT>::input_;
00085     using OrganizedFeatures<PointInT,PointOutT>::indices_;
00086     using OrganizedFeatures<PointInT,PointOutT>::surface_;
00087     using OrganizedFeatures<PointInT,PointOutT>::skip_distant_point_threshold_;
00088     using OrganizedFeatures<PointInT,PointOutT>::feature_name_;
00089 
00090     typedef pcl::PointCloud<PointInT> PointCloudIn;
00091     typedef typename PointCloudIn::Ptr PointCloudInPtr;
00092     typedef typename PointCloudIn::ConstPtr PointCloudInConstPtr;
00093 
00094     typedef pcl::PointCloud<PointNT> NormalCloudIn;
00095     typedef typename NormalCloudIn::Ptr NormalCloudInPtr;
00096     typedef typename NormalCloudIn::ConstPtr NormalCloudInConstPtr;
00097 
00098     typedef pcl::PointCloud<PointLabelT> LabelCloudOut;
00099     typedef typename LabelCloudOut::Ptr LabelCloudOutPtr;
00100     typedef typename LabelCloudOut::ConstPtr LabelCloudOutConstPtr;
00101 
00102     typedef pcl::PointCloud<PointOutT> PointCloudOut;
00103     typedef typename PointCloudOut::Ptr PointCloudOutPtr;
00104     typedef typename PointCloudOut::ConstPtr PointCloudOutConstPtr;
00105 
00106     OrganizedCurvatureEstimation ()
00107     {
00108       feature_name_ = "OrganizedCurvatureEstimation";
00109     };
00110 
00111     inline void
00112       setInputNormals(const NormalCloudInConstPtr &normals) { normals_ = normals; }
00113 
00114     inline void
00115       setOutputLabels(LabelCloudOutPtr labels) {labels_ = labels; }
00116 
00117     inline void
00118       setEdgeClassThreshold(float th)
00119     {
00120       edge_curvature_threshold_ = th;
00121     }
00122 
00123     void
00124       computePointCurvatures(
00125         const NormalCloudIn &normals,
00126         const int index,
00127         const std::vector<int> &indices,
00128         float &pcx,
00129         float &pcy,
00130         float &pcz,
00131         float &pc1,
00132         float &pc2,
00133         int &label_out);
00134 
00135     void
00136       computePointCurvatures(
00137         const NormalCloudIn &normals,
00138         const int index,
00139         const std::vector<int> &indices,
00140         const std::vector<float> &sqr_distances,
00141         float &pcx,
00142         float &pcy,
00143         float &pcz,
00144         float &pc1,
00145         float &pc2,
00146         int &label_out);
00147 
00148     protected:
00149 
00150     void
00151       computeFeature (PointCloudOut &output);
00152 
00153     NormalCloudInConstPtr normals_;
00154     LabelCloudOutPtr labels_;
00155 
00156     float edge_curvature_threshold_;
00157 
00158   };
00159 }
00160 
00161 #endif


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