Jetson nano使用jetcam运行CSI摄像头

539 阅读1分钟

安装traitlets

首先记得查看自己的python版本,以python3.7为分界线。 python3.7以下用traitlets 4.x;

pip3 install traitlets==4.3.3

python3.7以上才可以用traitlets 5.x

pip3 install traitlets

traitlets的历史版本pypi.org/project/tra…

安装Jetcam

参考官方github的内容github.com/NVIDIA-AI-I…

git clone https://github.com/NVIDIA-AI-IOT/jetcam
cd jetcam
sudo python3 setup.py install

使用CSI摄像头

参考官方的内容

from jetcam.csi_camera import CSICamera
camera = CSICamera(capture_device=0, width=224, height=224)
frame = camera.read()

这个变量frame便可以送入opencv进行运算处理了。capture_device不一定等于0,根据你的连接摄像头的端口来。