学习PCL心得体会——结构点云(Organized PointClouds)

有在学习PCL的朋友们,或多或少会接触到结构点云(Organized PointClouds)。

结构点云的定义

什么是结构点云?下面引用PCL官网的一段解释。

1 结构点云:An organized point cloud dataset is the name given to point clouds that resemble

an organized image (or matrix) like structure, where the data is split into rows and columns.

也就是说,像平常的照片一样,有行列顺序的点云,叫结构点云。

例如:

cloud.width = 640; // Image-like organized structure, with 640 rows and 480 columns,

cloud.height = 480; // thus 640*480=307200 points total in the dataset

相反,结构点云以外的点云,就叫无结构点云。

例如:

cloud.width = 307200;

cloud.height = 1; // unorganized point cloud dataset with 307200 points

结构点云的重要性

由Kinect等支持OpenNI接口的相机获取的点云为结构点云,但是结构点云经过某些人为操作后,会变为无结构点云,比如滤波操作等。

而PCL算法库里面的某些重要算法,仅支持结构点云,比如多平米分割算法(OrganizedMultiPlaneSegmentation)。

想必有不少朋友遇到过这样的问题:

[pcl::IntegralImageNormalEstimation::setInputCloud] Input dataset is not organized (height=1).

下面,我们以直通滤波为例,解释如何让结构点云经过操作之后,仍为结构点云。闲话不多说,直接上代码:

pcl::PassThrough<pcl::PointXYZ> pass;
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud1(new pcl::PointCloud<pcl::PointXYZ>);
pass.setInputCloud(cloud);
pass.setFilterFieldName("z");
pass.setFilterLimits(0.4, 0.94);
pass.setKeepOrganized(true);
pass.filter(*cloud1);

我们只需要在进行滤波的时候,将点云设置为KeepOrganized即可,也就是pass.setKeepOrganized(true);这条语句。

下面附上一幅OrganizedMultiPlaneSegmentation的效果图,祝大家学习愉快!

 

转载于:https://www.cnblogs.com/william-chan/p/6404717.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值