当前位置:网站首页>如何在树莓派上使用OAK相机?
如何在树莓派上使用OAK相机?
2022-06-29 18:04:00 【OAK中国_官方】
编辑:OAK中国
首发:oakchina.cn
喜欢的话,请多多️
▌前言
Hello,大家好,这里是OAK中国,我是助手君。
之前有个零基础的用户想在树莓派上用OAK相机,问我该如何上手。今天我们就来分享这个内容,内容来自官网的使用教程。
▌硬件连接
不管你用的是树莓派3,还是树莓派4,我们推荐你将OAK相机接在USB3.0的口上。
▌启用 USB 设备
由于OAK是USB设备,因此为了在使用 udev 工具的系统上与之通信, 您需要添加udev规则以使设备可访问。
以下命令将向您的系统添加新的udev规则:
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | sudo tee /etc/udev/rules.d/80-movidius.rules
sudo udevadm control --reload-rules && sudo udevadm trigger
▌安装depthai
安装方式有两种,任选其一即可。(我们推荐1)
国外有用户做了两个视频教程:
大家也可以任选其一,跟着装depthai,都很简单。
1. 下载镜像安装
下载OAK树莓派镜像:
| 百度网盘 | 密码:surj |
|---|---|
| sourceforge | 地址 |
(PS:百度网盘如果下载较慢,建议从sourceforge下载。)
我们准备了一个安装好OAK依赖的树莓派镜像。烧录完成后插入树莓派启动即可。
打开软件,选择我们的oak树莓派镜像和您要烧录进的内存卡,即可开始烧录。

启动成功后,打开命令行执行以下命令就可以运行oak:
cd depthai
python3 depthai_demo.py
2. git拉取安装
depthai
git clone https://gitee.com/oakchina/depthai.git
depthai-python
git clone https://gitee.com/oakchina/depthai-python.git
depthai-experiments
git clone https://gitee.com/oakchina/depthai-experiments.git
安装依赖:
python3 -m pip install -r depthai/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
执行以下命令:
python3 depthai/depthai_demo.py
▌使用示例
现在你可以查看depthai-examples里的示例,挑选感兴趣的示例来上手跑一遍了。
▌常见错误
在树莓派上,运行 sudo upgrade 后,在导入cv2的时候可能会出现 realloc(): invalid pointern Aborted 错误。我们也遇到了同样的问题,并且找到了解决方案 :
- 通过运行
sudo apt install -y --allow-downgrades libc6=2.28-10+rpi1命令使libc6降级。 - 通过运行
sudo curl -fL http://docs.luxonis.com/_static/install_dependencies.sh | bash命令重新安装depthai依赖。
▌参考资料
https://docs.oakchina.cn/en/latest/
https://www.oakchina.cn/selection-guide/
OAK中国
| OpenCV AI Kit在中国区的官方代理商和技术服务商
| 追踪AI技术和产品新动态
戳「+关注」获取最新资讯
边栏推荐
- Kubekey2.2.1 kubernetes1.23.7 offline package production +harbor Department summer and upload image
- 【目标跟踪】|stark配置 win otb
- JS merge two 2D arrays and remove the same items (collation)
- SD6.25集训总结
- lodash深拷贝使用
- Premature end of script headers 或 End of script output before headers
- 自动化软件测试 - 利用短信转发器结合Selenium读取短信验证码
- Request header field XXXX is not allowed by access control allow headers in preflight response
- MaxCompute Studio
- 6.29模拟赛总结
猜你喜欢
随机推荐
Anaconda安装并配置jupyter notebook远程
[tcapulusdb knowledge base] tcapulusdb doc acceptance - Introduction to creating game area
lodash深拷贝使用
[tcapulusdb knowledge base] tcapulusdb doc acceptance - create business introduction
Request header field xxxx is not allowed by Access-Control-Allow-Headers in preflight response问题
Jar package background startup and log output
Xiaomai technology x hologres: high availability of real-time data warehouse construction of ten billion level advertising
C comparison of the performance of dapper efcore sqlsugar FreeSQL hisql sqlserver, an ORM framework at home and abroad
Kubekey2.2.1 kubernetes1.23.7 offline package production +harbor Department summer and upload image
Proxmox VE Install 7.2
Adobe Premiere foundation - opacity (mixed mode) (XII)
Adobe Premiere foundation - batch material import sequence - variable speed and rewind (recall) - continuous action shot switching - subtitle requirements (13)
[wangdingbei 2020 Qinglong formation]areuserialz
等保测评结论为差,是不是表示等保工作白做了?
POJ 1975 (transitive closure)
Error building sqlsession problem
Shell tutorial circular statements for, while, until usage
Application and practice of DDD in domestic hotel transaction -- Theory
Relationship among controller, service and Dao
Detailed analysis on the use of MySQL stored procedure loop









