pcl之basic usage
Posted chriscoder
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pcl之basic usage相关的知识,希望对你有一定的参考价值。
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
以上是关于pcl之basic usage的主要内容,如果未能解决你的问题,请参考以下文章
STATES TUTORIAL, PART 1 - BASIC USAGE(第二部分)