pcl之basic usage
- width(int)
two meanings:
- it can specify the total number of points in the cloud for unorganized point cloud datasets;
- it can specify the width (total number of points in a row) of an organized point cloud dataset.
The advantages of an organized dataset is that by knowing the relationship between adjacent points (e.g. pixels), nearest neighbor operations are much more efficient, thus speeding up the computation and lowering the costs of certain algorithms in PCL.
cloud.width = 640; // there are 640 points per line
- height(int)
two meanings:
- it can specify the height (total number of rows) of an organized point cloud dataset;
- it is set to 1 for unorganized datasets (thus used to check whether a dataset is organized or not).
cloud1.width = 640; // Image-like organized structure, with 480 rows and 640 columns,
cloud1.height = 480; // thus 640*480=307200 points total in the dataset
cloud2.width = 307200;
cloud2.height = 1; // unorganized point cloud dataset with 307200 points
- points(std::vector)
Contains the data array where all the points of type PointT are stored.
pcl::PointCloud<pcl::PointXYZ> cloud;
std::vector<pcl::PointXYZ> data = cloud.points;
- is_dense(bool)
Specifies if all the data in points is finite (true), or whether the XYZ values of certain points might contain Inf/NaN values (false). - isOrganized()
if (!cloud.isOrganized ())
// do something
参考
http://www.pointclouds.org/documentation/tutorials/basic_structures.php#basic-structures
原文地址:https://www.cnblogs.com/ChrisCoder/p/9986357.html
时间: 2024-10-14 16:04:47