点云实时在线网络传输

编解码

PointCompress3D - 智能交通系统中用于路侧的激光雷达的点云压缩框架

20240325更新:

点云压缩/编解码技术:

 G-PCC更适合用在存储空间有限且高保真度要求的情况下,Draco更能应对实时性要求高的任务;

google/draco: Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics. (github.com)

 MPEGGroup/mpeg-pcc-tmc13: Geometry based point cloud compression (G-PCC) test model (github.com)

点云压缩研究进展与趋势-CSDN博客

 Draco点云压缩测试-CSDN博客

RobotWebTools/depthcloud_encoder: Point Cloud Encoder for Web-Based Streaming (github.com)

发送端

Base64编码

dhlab-epfl-students/eratosthene-stream: Vulkan streaming engine that renders PLY point cloud models and stream rendered frames over the network (github.com)

接收端

TCP:

snesgaard/cloudstreamer: Program for live visualization of point clouds streamed via TCP, remote or local host. (github.com)

谷歌魔镜:WEB-RTC(todo)

视频推流(todo)

ROS的点云传输路线:

发送

        
    sensor_msgs::PointCloud2 msg; //<sensor_msgs/PointCloud2.h>
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);


    pcl::PCLPointCloud2 pcl_pc2;
    pcl::toPCLPointCloud2(*cloud, pcl_pc2); //<pcl/PCLPointCloud2.h>,pcl库里的

    
   //https://github.com/ros-perception/perception_pcl/blob/ros2/pcl_conversions/include/pcl_conversions/pcl_conversions.h
    pcl_conversions::fromPCL(pcl_pc2, msg); 

    // publish
    pub.publish(msg);

其中转换二进制点云是pcl::toPCLPointCloud2

  /** \brief Convert a pcl::PointCloud<T> object to a PCLPointCloud2 binary data blob.
    * \param[in] cloud the input pcl::PointCloud<T>
    * \param[out] msg the resultant PCLPointCloud2 binary blob
    */
  template<typename PointT> void
  toPCLPointCloud2 (const pcl::PointCloud<PointT>& cloud, pcl::PCLPointCloud2& msg)
  {
    // Ease the user's burden on specifying width/height for unorganized datasets
    if (cloud.width == 0 && cloud.height == 0)
    {
      msg.width  = static_cast<std::uint32_t>(cloud.points.size ());
      msg.height = 1;
    }
    else
    {
      assert (cloud.points.size () == cloud.width * cloud.height);
      msg.height = cloud.height;
      msg.width  = cloud.width;
    }

    // Fill point cloud binary data (padding and all)
    std::size_t data_size = sizeof (PointT) * cloud.points.size ();
    msg.data.resize (data_size);
    if (data_size)
    {
      memcpy(&msg.data[0], &cloud.points[0], data_size);
    }

    // Fill fields metadata
    msg.fields.clear ();
    for_each_type<typename traits::fieldList<PointT>::type> (detail::FieldAdder<PointT>(msg.fields));

    msg.header     = cloud.header;
    msg.point_step = sizeof (PointT);
    msg.row_step   = static_cast<std::uint32_t> (sizeof (PointT) * msg.width);
    msg.is_dense   = cloud.is_dense;
    /// @todo msg.is_bigendian = ?;
  }

接收

    sensor_msgs::PointCloud2ConstPtr &cloud;
    pcl::PointCloud<pcl::PointXYZ>::Ptr temp_cloud(new pcl::PointCloud<pcl::PointXYZ>);

    pcl::PCLPointCloud2 pcl_pc2;
    pcl_conversions::toPCL(*cloud, pcl_pc2);
    pcl::fromPCLPointCloud2(pcl_pc2, *temp_cloud);

数据类型

深度图

深度用uint16_t,像素用uint8_t

点云转极坐标系

为什么点云的size是这么算的?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值