我需要使用PCL的八叉树数据结构将我的数据划分为体素。我想我设法创建了八叉树和体素。但是,我有两个关于PCL的八叉树结构的问题。
float resolution = 0.009f;
pcl::octree::OctreePointCloudSearch<pcl::PointXYZ> octree(resolution);
据我所知,此分辨率参数定义了八度树最低级别的体素边长的尺寸。在这种情况下,最低水平的体素的边长等于0.009m,是否正确?
答案 0 :(得分:0)
但只是为了说明:
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是在光线相交的体积中具有点索引的矢量。