三、摄像头

jetson@jetson-desktop:~$ ls /dev/video*
/dev/video0  /dev/video1  

1. CSI摄像头

尽量避免带电操作,接入CSI摄像头时注意FPC排线金属触点一面朝下

1.1 使用gst-launch打开摄像头

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)NV12, framerate=(fraction)30/1" ! nvvidconv ! xvimagesink sync=false    
gst-launch-1.0 nvarguscamerasrc sensor-id=1 ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)NV12, framerate=(fraction)30/1" ! nvvidconv ! xvimagesink sync=false  #打开另一个命令行窗口运行

4.png

2. USB摄像头

sudo apt install cheese

1.png

将USB摄像头连接至开发板USB接口,并打开cheese软件

3.png


sudo apt install guvcview

7.png

8.png

您也仍然可以使用nvgstcapture来打开USB摄像头

# V4L2 USB camera (where <N> is the /dev/videoN node)
sudo nvgstcapture --cap-dev-node 2   #0,1默认为CSI摄像头

6.png

更详细的说明可参考NVIDIA Developer


版本号 #11
由 edit 创建于 10 七月 2025 06:39:19
由 edit 更新于 23 七月 2025 01:33:50