PointCloudLibrary (PCL) - Octree - 获取*分支*节点内所有点的索引
PointCloudLibrary (PCL) - Octree - get indices of all points within a *branch* node
我是 PCL 的新手,我想从 pcl::octree
中的分支节点获取所有索引。因此,例如,根节点应为每个索引和每个子分支节点提供此分支节点中所有叶节点的点的索引。实现这一目标的最佳方法是什么?
我正在使用
pcl::octree::OctreePointCloudSearch<pcl::PointXYZ, pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerPointIndices>
并希望将BranchContainerT
的第三个模板参数也设置为pcl::octree::OctreeContainerPointIndices
,以便能够调用类似的东西
std::vector<int> indices;
auto it = m_octree->breadth_begin();
it.getBranchContainer().getPointIndices(indices)
但是,索引向量为空。当然,我可以手动迭代所有节点,获取叶子并插入索引,但也许我在这里缺少一些东西......?
好的,我缺少的是设置为 pcl::octree::OctreeContainerPointIndices
的 BranchContainerT
的模板参数仅为您提供将索引存储在此类容器中的选项。但是,添加这些索引是您必须手动完成的操作。
鉴于只需检查每个节点的类型并从叶中收集索引并将它们添加到分支节点即可。
相关文章:
- 反向给定链表中的K节点
- 数组索引的值没有增加
- 如果我只是不访问queue_front节点的子节点,而是将它们推到队列中呢?还是BFS吗
- 芬威克树(BIT).找到具有给定累积频率的最小索引,单位为 O(logN)
- Boost Graph Library,修复节点大小
- 查找最接近的大于当前数字的数字的索引
- C++A*算法并不总是在路径中具有目标节点
- 为什么提升图库的 read_graphviz() 函数会改变节点的索引
- 修改链表主函数代码,用户将在其中输入节点的索引和数据以及正确的消息
- 使用 Netlink 获取进程索引节点
- 在索引中插入节点:链接列表未正确返回列表
- 节点.js C++插件 - 设置数组的某个索引
- 倒排索引节点添加字
- PointCloudLibrary (PCL) - Octree - 获取*分支*节点内所有点的索引
- 双链表删除节点与索引C++
- C++-从单链循环列表中的任何索引中删除一个节点
- 对数组的索引号求和并将总和发送给主节点(C++ 或 Java)
- 在窗口的情况下,索引节点是什么?
- 遍历查找节点中的顶点并返回索引
- [C++]传递节点的索引还是节点本身更好?哪个更快?