当前位置:网站首页>驱动点云格式修改带来的效率提升
驱动点云格式修改带来的效率提升
2022-08-04 21:25:00 【moneymyone】
驱动点云格式修改带来的效率提升
背景:
原有的自定义点云结构在读取、传输、解码整个时间段耗时非常巨大,因此将点云结构进行升级,提高整体运行时间。
protobuf字段类型介绍
| .proto Type | Notes | C++ Type |
|---|---|---|
| double | double | |
| float | float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 |
| uint32 | Uses variable-length encoding. | uint32 |
| uint64 | Uses variable-length encoding. | uint64 |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 228. | uint32 |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 256. | uint64 |
| sfixed32 | Always four bytes. | int32 |
| sfixed64 | Always eight bytes. | int64 |
| bool | bool | |
| string | A string must always contain UTF-8 encoded text. | string |
| bytes | May contain any arbitrary sequence of bytes. | string |
修改前:
message PointXYZI {
optional float x = 1 [default = nan];
optional float y = 2 [default = nan];
optional float z = 3 [default = nan];
optional uint32 intensity = 4 [default = 0];
}
message PointCloud {
repeated PointXYZIT point = 1;
}
修改后:
message PointXYZI2 {
repeate float x_array = 1 [default = nan];
repeate float y_array = 2 [default = nan];
repeate float z_array = 3 [default = nan];
optional bytes intensity_array = 4 [default = 0];
}
message PointCloud {
optional PointXYZI2 point_array = 1;
}
修改点:
- PointXYZI由重复的数据结构,改为重复的点。
意义在于:
- 原本读写需要多次读写这个结构体,现在改为直接一次性存储点,将所有点都存到这个结构体里面。
- 而且将intensity等参数改为bytes,后续解析出来,减少了整体点云包的大小,减少传输时间。
protobuf修改字段为bytes需要考虑一些问题:
- 电脑大序端和小序端的问题;不同系统会不一样,解读出的bytes会不同。如果其他语言调用C++的库,不通过自己的语言解析,能解决问题?
- 多语言兼容问题,解析问题
- 字段对齐问题
目前占用时间分析:

经验:
- 通过减小字段类型,提高传输速率,空间换时间;
- 通过一次性写入替代多次写入,解决时间,这部分节约的时间占大头。
边栏推荐
- 硬件开发定制全流程解析
- bracket matching
- Codeforces Round #811 (Div. 3)
- Pinduoduo open platform order information query interface [pdd.order.basic.list.get order basic information list query interface (according to transaction time)] code docking tutorial
- visual studio 2015 warning MSB3246
- SPSS-System Clustering Software Practice
- 3、IO流之字节流和字符流
- 顺序队列
- PyTorch Geometric (PyG) 安装教程
- 27. Dimensionality reduction
猜你喜欢

PowerCLi 批量配置NTP

搬走地下空间开发利用“绊脚石” 中地数码取得地下空间透明化技术突破

立方度量(Cubic Metric)

PowerCLi batch configuration of NTP

LINQ to SQL (Group By/Having/Count/Sum/Min/Max/Avg操作符)

立即升级!WPS Office 出现 0day 高危安全漏洞:可完全接管系统,官方推出紧急更新

Red team kill-free development practice of simulated confrontation

js data type, throttling/anti-shake, click event delegation optimization, transition animation

开发deepstram的自定义插件,使用gst-dseaxmple插件进行扩充,实现deepstream图像输出前的预处理,实现图像自定义绘制图(精四)

NFT宝典:你需要知道NFT的术语和定义
随机推荐
mdk5.14 cannot be burned
【CC3200AI 实验教程 1】疯壳·AI语音人脸识别(会议记录仪/人脸打卡机)-开发环境搭建
8 年产品经验,我总结了这些持续高效研发实践经验 · 协同篇
In action: 10 ways to implement delayed tasks, with code!
动手学深度学习_NiN
三种方式设置特定设备UWP XAML view
1319_STM32F103串口BootLoader移植
链队
Arduino 电机测速
adb控制常用命令
【1403. 非递增顺序的最小子序列】
Spss-系统聚类软件实操
NFT宝典:你需要知道NFT的术语和定义
可视化工作流引擎开发OA系统,让企业少花冤枉钱
PCBA scheme design - kitchen voice scale chip scheme
多个平台显示IP属地,必须大力推行互联网实名制
括号匹配
数电快速入门(五)(编码器的介绍以及通用编码器74LS148和74LS147的介绍)
SPSS-System Clustering Software Practice
visual studio 2015 warning MSB3246