赞
踩
(1)下载安装包
官网地址:ZED SDK 3.7 - Download | Stereolabs
本机配置是Ubuntu20、cuda11.0. 下载 ZED_SDK_Ubuntu20_cuda11.4_v3.6.1.run
(2)安装zed sdk
在终端中输入:
<错误处理>
- WARNING: The scripts f2py, f2py3 and f2py3.8 are installed in '/home/robot/.local/bin' which is not on PATH.
- Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
- WARNING: The scripts cygdb, cython and cythonize are installed in '/home/robot/.local/bin' which is not on PATH.
- Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
解决办法:
在终端输入:
gedit ~/.bashrc
然后把 export PATH=/home/cyd/.local/bin/:$PATH 放到最后,然后更新文件。
source ~/.bashrc
测试: 到这一步
import pyzed
如果成功就可以了。
(3) ZED python api 安装
确保电脑python-opencv安装好了
ZED SDK(windows下文件夹名字)ZED (ubuntu20下文件夹名字)中有一个 Python 脚本(get_python_api.py),可以自动检测操作系统、CUDA 和 Python 版本并下载相应的预编译 Python API 包(pyzed)。
运行程序:
sudo python3 get_python_api.py
下载得到ZED-Python-API 包,也就是pyzed的.whl文件,将pyzed.whl文件放入ZED SDK 文件夹。
下载xxxxxxxxxxxxxxxxxxxxxx.whl pip3 install xxxxxxxxxxxxxxxxxxxxxx.whl
完成环境的配置
(4) 测试ZED相机
打开
./usr/local/zed/tools/ZED Explorer
<错误处理:>
./usr/local/zed/tools/ZED Explorer 打不开的情况
import pyzed.sl as sl 出现错误
1. libcuda.so.1 找不到
解决办法: 忘记安装驱动
2. libaimage(可能是这个名字)
解决办法:该库没有安装上
在pycharm 中直接下载即可
参考文献:Ubuntu18.04+CUDA 11.1+ZED SDK3.4+ZED Python API配置 - 哔哩哔哩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。