在PCL中最基本的数据类型是 PointCloud。这是一个模板类,意味着你需要指定它应该包含的数据类型。
例如:
pcl::PointCloud<pcl::PointXYZ> cloud;
cloud.push_back(pcl::PointXYZ(rand(), rand(), rand()));
其中包括如下数据字段:
1.width
2.height 特别说明:当height设置为1时,表示点云数据是无序的;
cloud.width = 640;cloud.height=480;//表示点云数据是有序的,640行,480列。
cloud.width = 307200, cloud.height = 1;//表示点云数据是无序的。
3.points
包含所有存储的点云(Point<T>)的数组。如果一个点云包含XYZ的数据,那么points的数据结构为pcl::PointXYZ。
pcl::Point<pcl::PointXYZ> cloud;
std::vector<pcl::PointXYZ> data = cloud.points;
4.is_dense
指定某些点的XYZ值中的所有点的数据是有限的(真) ,还是可能包含INF / NaN值(假) 。
本文详细介绍了PCL(点云库)中点云数据的基本数据类型PointCloud及其使用方法。主要内容包括PointCloud类的模板特性、width和height字段的作用、points数组的存储方式以及is_dense标志位的含义。

2446

被折叠的 条评论
为什么被折叠?



