// Compute the normals
pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> normalEstimation;
pcl::search::KdTree<pcl::PointXYZ>::Ptr tree(new pcl::search::KdTree<pcl::PointXYZ>);
normalEstimation.setInputCloud(source_cloud);
normalEstimation.setSearchMethod(tree);大家好,我是学习PCL的初学者,我在“normalEstimation.setSearchMethod(树)”上不理解;这部分是什么意思?这是否意味着我们必须选择一些方法?
有时我看到代码是这样的
// Normal estimation
pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> n;
pcl::search::KdTree<pcl::PointXYZ>::Ptr tree(new pcl::search::KdTree<pcl::PointXYZ>);
tree->setInputCloud(cloud_smoothed)*/; [this part I dont understand too]
n.setInputCloud(cloud_smoothed);
n.setSearchMethod(tree);谢谢你们干杯
发布于 2019-10-17 06:01:50
您可以在以下位置找到有关如何计算法线的信息:http://pointclouds.org/documentation/tutorials/normal_estimation.php。
基本上,要计算一个特定点的法线,你需要“分析”它的邻域,也就是它周围的点。通常,您可以选择N个最近的点,也可以选择目标点周围某个半径内的所有点。如果点云是完全非结构化的,那么找到这些邻接点并不是一件容易的事情。KD-trees就是用来加速这个搜索的。事实上,它们是一种优化的数据结构,例如,允许非常快的最近邻搜索。你可以在这里找到更多关于KD-trees的信息,http://pointclouds.org/documentation/tutorials/kdtree_search.php。
因此,行normalEstimation.setSearchMethod(tree);只设置了一个空的KD-树,它将被正常的估计算法使用。
https://stackoverflow.com/questions/58392744
复制相似问题