【PCL】pcl中是怎么计算特征的

写在前面

在计算特征向量descriptors的时候,需要只对关键点keypoints计算关键点在其原始点云处的邻域特征,那么就会用到setSearchSurface这个函数。


四种计算特征的方法

在这里插入图片描述

1. !indices & !isurface

无索引,搜索原点云上的每一个点的邻域。

2. indices & !isurface

有索引,搜索原点云上的每一个点的邻域。

3. !indices & isurface

无索引,搜索指定的点云上的每一个点的邻域。

4. indices & isurface

有索引,搜索指定的点云上的每一个点的邻域。

三个接口辨析

1. setInputCloud(PointCloudConstPtr &)

设置搜索的点云

2. setIndices(IndicesConstPtr &)

设置cloud的索引,类似于下采样

3. setSearchSurface(PointCloudConstPtr &)

具体计算某一个点处的特征时,设置需要考虑的哪个点云上对应于该点的邻域特征。

例子

下面例子中具体考虑哪个点云集合的邻域,是取决于tree的,看程序注释可以发现是优先考虑 search surface。

1. 直接计算全部的点云的法向量,每一个点邻域考虑本身的邻域。

#include <pcl/point_types.h>
#include <pcl/features/normal_3d.h>

{
   
  pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);

  ... read, pass in or create a point cloud ...

  // Create the normal estimation class, and pass the input dataset to it
  pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> ne;
  ne.setInputCloud (cloud);

  // Create an empty kdtree representation, and pass it to the normal estimation object.
  // Its content will be filled inside the object, based on the given input dataset (as no other search surface is given).
  pcl::search::KdTree<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ> ());
  ne.setSearchMeth
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Tech沉思录

点赞加投币,感谢您的资瓷~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值