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_PRINCIPAL_CURVATURES_H_
00039 #define PCL_PRINCIPAL_CURVATURES_H_
00040
00041 #include <Eigen/StdVector>
00042 #include <Eigen/Sparse>
00043 #include <pcl/features/feature.h>
00044
00045 namespace pcl
00046 {
00048
00055 template <typename PointInT, typename PointNT, typename PointOutT>
00056 class PrincipalCurvaturesEstimation : public FeatureFromNormals<PointInT, PointNT, PointOutT>
00057 {
00058 public:
00059 using Feature<PointInT, PointOutT>::feature_name_;
00060 using Feature<PointInT, PointOutT>::getClassName;
00061 using Feature<PointInT, PointOutT>::indices_;
00062 using Feature<PointInT, PointOutT>::k_;
00063 using Feature<PointInT, PointOutT>::search_parameter_;
00064 using Feature<PointInT, PointOutT>::surface_;
00065 using FeatureFromNormals<PointInT, PointNT, PointOutT>::normals_;
00066
00067 typedef typename Feature<PointInT, PointOutT>::PointCloudOut PointCloudOut;
00068 typedef pcl::PointCloud<PointInT> PointCloudIn;
00069
00071 PrincipalCurvaturesEstimation ()
00072 {
00073 feature_name_ = "PrincipalCurvaturesEstimation";
00074 };
00075
00088 void computePointPrincipalCurvatures (const pcl::PointCloud<PointNT> &normals, int p_idx, const std::vector<int> &indices, float &pcx, float &pcy, float &pcz, float &pc1, float &pc2);
00089
00090 protected:
00091
00097 void computeFeature (PointCloudOut &output);
00098
00099 private:
00101 std::vector<Eigen::Vector3f> projected_normals_;
00102
00104 Eigen::Vector3f xyz_centroid_;
00105
00107 Eigen::Vector3f demean_;
00108
00110 EIGEN_ALIGN16 Eigen::Matrix3f covariance_matrix_;
00111
00113 EIGEN_ALIGN16 Eigen::Matrix3f eigenvectors_;
00115 Eigen::Vector3f eigenvalues_;
00116 };
00117 }
00118
00119 #endif //#ifndef PCL_PRINCIPAL_CURVATURES_H_