当前位置:网站首页>Point cloud target detection Kitti dataset bin file visualization, one-stop solution
Point cloud target detection Kitti dataset bin file visualization, one-stop solution
2022-07-26 18:02:00 【Marstein】
Refer to the link method 1 , Need to install mayavi,numpy,pyqt5;
numpy+mayavi.mlab
1. Install dependency library
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install mayavi -i https://pypi.tuna.tsinghua.edu.cn/simple2. Read .bin Format file for visualization
import mayavi.mlab
import numpy as np
import os
def viz_mayavi(points, vals="distance"): # Visualization only uses 3 D data (x,y,z)!
x=points[:, 0]
y=points[:, 1]
z=points[:, 2]
r=points[:, 3] # reflectance value of point
d=np.sqrt(x**2+y**2)
if vals == "height":
col = z
else:
col = d
# Create the size of the visualization template
fig=mayavi.mlab.figure(bgcolor=(0, 0, 0), size=(1280, 720))
mayavi.mlab.points3d(x, y, z,
col,
mode="point",
colormap='spectral',
figure=fig,
)
mayavi.mlab.show()
if __name__ == "__main__":
bin_file_path = 'bin_2pcd'
bin_files = os.listdir(bin_file_path)
for bin_file in bin_files:
if bin_file.endswith(".bin"):
mypointcloud = np.fromfile(bin_file_path + '/' + bin_file, dtype=np.float32, count=-1).reshape([-1, 4])
viz_mayavi(mypointcloud,vals="height")3. You can get visual results
remarks :
The following error that cannot be run was encountered during , You can directly refer to the following link :Ubuntu18.04 Let's work it out Qt appear qt.qpa.plugin:Could not load the Qt platform plugin “xcb“ problem _ Hope Xiaohui's blog -CSDN Blog _bicyclegan
Generally, the problem is the same , See the above link for details , The solution is as follows ;
sudo apt-get install libxcb-xinerama0thus , Happy to see some clouds !
边栏推荐
- PMP考试详解,新考纲有什么变化?
- 3、 Topic communication: create your own information format
- Coscon'22 city / school / institution producer solicitation order
- 深度学习实验:Softmax实现手写数字识别
- JS 递归 斐波那契数列 深克隆
- [training Day1] Dwaves line up
- ACL实验演示(Huawei路由器设备配置)
- We were tossed all night by a Kong performance bug
- Hardware development and market industry
- Analysis of interface testing
猜你喜欢

Hosts this file has been set to read-only solution

Ascend target detection and recognition - customize your own AI application

Interview with celebrities | open source is a double-edged sword for security -- Wei Jianfan, author of the Chinese translation of cathedral and market

【云原生】 iVX 低代码开发 引入腾讯地图并在线预览

5、 Parameter server principle, code implementation

【集训Day2】Sculpture

kaggle猫狗数据集开源——用于经典CNN分类实战
![[metauniverse OMI theory] analyze Web3 risk challenges and build Web3 ecological security](/img/d1/4a424d810f7a6aaccae80b4fe232c0.png)
[metauniverse OMI theory] analyze Web3 risk challenges and build Web3 ecological security
![[training Day1] spy dispatch](/img/cd/34845de1093c777f6ecff35d9452c3.png)
[training Day1] spy dispatch

Diagram of seven connection modes of MySQL
随机推荐
kaggle猫狗数据集开源——用于经典CNN分类实战
[virtual machine data recovery] data recovery cases in which XenServer virtual machine is unavailable due to accidental power failure and virtual disk files are lost
Analysis of interface testing
股票公司开户万一免五这是真的安全靠谱的吗
Zhaoqi science and technology innovation overseas high-level talent introduction platform, entrepreneurship event Roadshow
VS Code 格式化后 自动让函数名后有空格
Three ways of de duplication in SQL
[Day2] cinema ticket
跨站脚本攻击(XSS)
【集训Day2】Sculpture
【集训Day2】Torchbearer
uni-app
Is it safe for Changzheng securities to open an account?
来吧开发者!不只为了 20 万奖金,试试用最好的“积木”来一场头脑风暴吧!
COSCon'22城市/学校/机构出品人征集令
【静态代码质量分析工具】上海道宁为您带来SonarSource/SonarQube下载、试用、教程
Heavy! The 2022 China open source development blue book was officially released
Laozi cloud and Fuxin Kunpeng achieved a major breakthrough in 3D ofd 3D format documents for the first time
DTS搭载全新自研内核,突破两地三中心架构的关键技术|腾讯云数据库
[static code quality analysis tool] Shanghai daoning brings you sonarource/sonarqube download, trial and tutorial