#include<pcl/range_image/range_image.h>
int main(int argn, char** argv)
{
pcl::PointCloud<pcl::PointXYZ> pointCloud;
// Generate the data
for (float y = -0.5f; y <= 0.5f; y += 0.01f) {
for (float z = -0.5f; z <= 0.5f; z += 0.01f) {
pcl::PointXYZ point;
point.x = 2.0f - y;
point.y = y;
point.z = z;
pointCloud.push_back(point);
}
}
pointCloud.width = (uint32_t)pointCloud.points.size();
pointCloud.height = 1; //设置点云对象的头信息
//实现一个呈矩形形状的点云
// We now want to create a range image from the above point cloud, with a 1deg angular resolution
//angular_resolution为模拟的深度传感器的角度分辨率,即深度图像中一个像素对应的角度大小
float angularResolution = (float)(1.0f * (M_PI / 180.0f)); // 1.0 degree in radians
//max_angle_width为模拟的深度传感器的水平最大采样角度,