在树莓派5上使用opencv时暂时无法使用csi接口的摄像头,只能使用usb摄像头
具体教程可以看B站 马主任不是主任的视频
https://www.bilibili.com/video/BV1fm411f7Ve/?p=8&spm_id_from=pageDriver
安装opencv
- 安装相关前置安装包
这里我将代码贴出来
sudo apt-get install libopenblas-dev m4 libblas-dev cmake
sudo apt-get install python3-pip python3-numpy python3-dev
sudo apt-get install python3-opencv
sudo apt-get install python3-matplotlib
安装完成后,在命令行中打开python输入import cv2
进行测试