Reputation: 16285
I am computing the surface normals for an organized point cloud as follows:
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud = create_point_cloud_ptr(cap_depth, cap_rgb);
// estimate normals
pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal>);
pcl::IntegralImageNormalEstimation<pcl::PointXYZRGB, pcl::Normal> ne;
ne.setNormalEstimationMethod (ne.AVERAGE_3D_GRADIENT);
ne.setMaxDepthChangeFactor(15);
ne.setNormalSmoothingSize(10.0f);
ne.setInputCloud(cloud);
ne.compute(*normals);
When I iterate through the normals, the curvature field is set to NAN for all points. Am I doing something wrong in the calculation?
Upvotes: 1
Views: 1298
Reputation: 16285
Turns out the AVERAGE_3D_GRADIENT
method does not compute surface curvature, need to use ne.COVARIANCE_MATRIX
Upvotes: 3