I have an Oak-D-Pro-W a stereo camera that’s capable of outputting an organized PCL point cloud object. I’d like to be able to then do surface normal estimation on top of the point cloud.
I started with this example. However I just get [pcl::OrganizedNeighbor::estimateProjectionMatrix] Input dataset is not from a projective device! Residual (MSE) -0.011383, using 1088 valid points
.
When I try the regular normal estimation example the ne.compute line never returns (or at least in no reasonable time, I left it for a few minutes just to see and it didn’t return).
pcl::IntegralImageNormalEstimation<pcl::PointXYZ, pcl::Normal> ne;
// pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> ne;
ne.setInputCloud(cloud);
// pcl::search::KdTree<pcl::PointXYZ>::Ptr tree(new pcl::search::KdTree<pcl::PointXYZ>());
// ne.setSearchMethod(tree);
// ne.setRadiusSearch(0.03);
ne.setNormalEstimationMethod(ne.AVERAGE_DEPTH_CHANGE);
ne.setMaxDepthChangeFactor(0.02F);
ne.setNormalSmoothingSize(10.0F);
pcl::PointCloud<pcl::Normal>::Ptr normals(new pcl::PointCloud<pcl::Normal>);
ne.compute(*normals);
This is the point cloud visualized
and the point cloud + normals (it’s there, just there’s only a handful of points):
I’ve tried using the two normal estimation methods mentioned in the tutorials page, I’ve tried messing with a few of the options, but there’s wasn’t a noticeable difference.