|
本帖最后由 just_rookie 于 2013-12-20 20:39 编辑
RT,我用BoundaryEstimation提取点云的边缘点,但是得到边缘点为零,请问是什么原因?附图为我的点云图。请指教,谢谢!
部分代码:
// compute normals;
pcl::search::Search<pcl::PointXYZ>::Ptr tree(new pcl::search::KdTree<pcl::PointXYZ>());
pcl::PointCloud<pcl::Normal>::Ptr normals(new pcl::PointCloud<pcl::Normal>);
pcl::NormalEstimation<pcl::PointXYZ,pcl::Normal> normal_est;
normal_est.setSearchMethod(tree);
normal_est.setInputCloud(cloud);
normal_est.setKSearch(50);
normal_est.compute(*normals);
//normal_est.setViewPoint(0,0,0);
//calculate boundary;
pcl::PointCloud<pcl::Boundary> boundary;
pcl::BoundaryEstimation<pcl::PointXYZ,pcl::Normal,pcl::Boundary> boundary_est;
boundary_est.setInputCloud(cloud);
boundary_est.setInputNormals(normals);
boundary_est.setRadiusSearch(0.02);
//boundary_est.setAngleThreshold(PI/4);
boundary_est.setSearchMethod(pcl::search::KdTree<pcl::PointXYZ>::Ptr(new pcl::search::KdTree<pcl::PointXYZ>));
boundary_est.compute(boundary);
|
|