我需要使用PCL的八叉树数据结构将数据分割成体素。我想我成功地创造了八叉树和体素。然而,对于PCL的八叉树结构,我有两个问题。
float resolution = 0.009f; pcl::octree::OctreePointCloudSearch<pcl::PointXYZ> octree(resolution);据我所知,这个分辨率参数在八叉树的最底层定义了体素边长的维数。在这种情况下,最低水平的体素的边长等于0.009m,对吗?
发布于 2017-04-04 12:14:00
但只是为了说明:
pcl::PointCloud<pcl::PointXYZ> cloud_in_meters;
resolution = 1.0f;
pcl::octree::OctreePointCloudSearch<pcl::PointXYZ> octree(resolution);和
pcl::PointCloud<pcl::PointXYZ> cloud_in_meters;
cloud_in_millimeters = cloud_in_meters*1000;
resolution = 1.0f/1000.f;
pcl::octree::OctreePointCloudSearch<pcl::PointXYZ> octree(resolution);基本上都是一样的。
例如:
std::vector< int > k_indices;
octree.getIntersectedVoxelIndices(origin, direction, k_indices, 1);k_indices是由射线相交的体积中具有点索引的向量。
您可以检查这个函数正在做什么:search.hpp#L613
https://stackoverflow.com/questions/43128043
复制相似问题