当前位置:网站首页>如何在树莓派上使用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技术和产品新动态
戳「+关注」获取最新资讯
边栏推荐
- Adobe Premiere Foundation - réglage du son (correction du volume, réduction du bruit, tonalité téléphonique, changement de hauteur, égaliseur de paramètres) (XVIII)
- 2022.6.29-----leetcode.535
- Adobe Premiere基础-声音调整(音量矫正,降噪,电话音,音高换挡器,参数均衡器)(十八)
- 2022.6.29-----leetcode. five hundred and thirty-five
- codeforces每日5题(均1700)-第二天
- Shell tutorial circular statements for, while, until usage
- Spingmvc requests and responses
- Relationship among controller, service and Dao
- shell教程之循环语句for,while,until用法
- MaxCompute Studio
猜你喜欢

JWT login authentication

【目标跟踪】|stark配置 win otb

Travel card "star picking" hot search first! Stimulate the search volume of tourism products to rise

The soft youth under the blessing of devcloud makes education "smart" in the cloud

Adobe Premiere基础-编辑素材文件常规操作(脱机文件,替换素材,素材标签和编组,素材启用,便捷调节不透明度,项目打包)(十七)

Premature end of script headers 或 End of script output before headers

关于微服务

Spingmvc requests and responses

jdbc_相关代码

Adobe Premiere基礎-聲音調整(音量矯正,降噪,電話音,音高換擋器,參數均衡器)(十八)
随机推荐
【目标跟踪】|stark配置 win otb
最长异或路径(dfs+01trie)
jdbc认识上手
Software testing - you may not understand the basic theoretical knowledge
Adobe Premiere foundation - cool text flash (14)
字典树(随学)
[tcapulusdb knowledge base] tcapulusdb operation and maintenance doc introduction
6.29 simulation summary
【TcaplusDB知识库】TcaplusDB单据受理-创建游戏区介绍
VMware安装ESXI
QQ如何开通在线客服
Goldfish rhca memoirs: do447 build advanced job workflow -- create job template survey to set work variables
Anaconda安装并配置jupyter notebook远程
数据分析--时间序列预测
Elegant writing controller (parameter verification + unified exception handling)
MaxCompute Studio
Adobe Premiere基础-素材嵌套(制作抖音结尾头像动画)(九)
ABC253 D FizzBuzz Sum Hard(容斥定理)
记录服务器被入侵病毒:ssh密码被更改登录失败、恶意程序跑满了cpu、jar包启动失败自动kill、一直弹出You have new mail in /var/spool/mail/root
The soft youth under the blessing of devcloud makes education "smart" in the cloud
