基本用法
不知道怎么入门,就先从阅读官方文档开始了,记录下学习的过程和出现的错误。官方文档的walkthrough介绍了各个部分,学到的时候再细看
入门\基本结构
pcl::PointCloud<pcl::PointCloud>
是基本的数据类型,PointCloud是一个c++的类,包含以下的数据:
1.pcl::PointCloud<pcl::PointCloud::width>
width在无序数据集表示点的总数;在有序的点云数据集表示一行中的总点数。
2.pcl::PointCloud<pcl::PointCloud::height>
在有序的点云数据集中表示总行数;无序的数据集中为1
cloud.width = 640; // there are 640 points per line
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
要判断点云是否有序,不用判断height,用函数if (!cloud.isOrganized ())
3.pcl::points<pcl::PointCloud::points>
points用于储存PointT类型点的向量,例如PointXYZ类型的点
pcl::PointClou