25-总结-【cartographer源码分析】系列的第三部分【sensor源码分析】

【cartographer源码分析】系列的第三部分【sensor源码分析】。

现总结sensor文件夹涉及到的主要功能:

【1】sensor/point_cloud.h:

  • 点云数据是指在一个三维坐标系统中的一组向量的集合。
  • cartographer的PointCloud是由Vector3f组成的vector即std::vector
  • PointCloudWithIntensities则是由点云和光线强度组成的struct类。
  • point_cloud.h主要定义了跟点云相关的处理操作。包括4个函数
    • PointCloud TransformPointCloud(const PointCloud& point_cloud, const transform::Rigid3f& transform);根据三维网格参数转换点云
    • PointCloud Crop(const PointCloud& point_cloud, float min_z, float max_z);去掉z轴区域外的点云,返回一个新的点云
    • proto::PointCloud ToProto(const PointCloud& point_cloud);序列化
    • PointCloud ToPointCloud(const proto::PointCloud& proto);反序列化

【2】sensor/compressed_point_cloud.h

  • CompressedPointCloud点云压缩类,压缩ponits以减少存储空间,压缩后有精度损失。方法:按照block分组。提供5个函数:
    • CompressedPointCloud(const PointCloud& point_cloud) 使用点云数据初始化,并将点云压缩到 std::vector point_data_中,num_points_为点云数量
    • PointCloud Decompress() const;返回解压缩的点云
    • bool empty() const; 点云是否为空
    • size_t size() const; 点云数量
    • ConstIterator begin() const;访问点云block的迭代器
    • ConstIterator end() const;点云block的尾后迭代器
  • 3
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值