其他分享
首页 > 其他分享> > 深度图像(6)

深度图像(6)

作者:互联网

对三维信息的描述,除了点云的直接描述外,常见的RGB-D相机获取的深度影像也是目前重要的三维信息描述方式。

创建点云对应的深度图像:

//头文件
#include <pcl/range_image/range_image.h>

//设置观测弧度间隔、最大水平观测范围、最大垂直观测范围
float angularResolution = (float)(1.0f * (M_PI / 180.0f));
float maxAngleWidth = (float)(360.0f * (M_PI / 180.0f));
float maxAngleHeight = (float)(180.0f * (M_PI / 180.0f));

//设置采集位置
Eigen::Affine3f sensorPose = (Eigen::Affine3f)Eigen::Translation3f(0.0f,0.0f,0.0f);
//设置深度坐标系
pcl::RangeImage::CoordinateFrame coordinate_frame = pcl::RangeImage::CAMERA_FRAME;
float noiseLevel = 0.00;
float minRange = 0.0f;
int borderSize = 1;
//声明深度图像
pcl::RangeImage range_image;
range_image.createFromPointCloud(cloud,angularResolution,maxAngleWidth,maxAngleHeight,sensorPose,coordinate_frame,noiseLevel,minRange,borderSize);

深度图像提取边界:

pcl::RangeImageBorderExtractor border_extractor(&range_image);
pcl::PointCloud<pcl::BorderDescription> border_descriptions;
border_extractor.compute(border_descriptions);

标签:180.0,0.0,float,图像,pcl,深度,border
来源: https://blog.csdn.net/harden1013/article/details/121568680