How to connect camera to Jetson?

So you may try a gstreamer pipeline with nvarguscamerasrc. Assuming you are locally logged into Jeston with a GUI :

gst-launch-1.0  nvarguscamerasrc sensor-id=0 ! nvvidconv ! xvimagesink 

You may select the resolution of framerate (pick one from available ones listed above) with such caps:

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! nvvidconv ! xvimagesink 

From opencv, you would create a videoCapture with gstreamer API. The pipeline reads camera and converts into BGR for opencv:

cap = cv2.videoCapture('nvarguscamerasrc sensor_mode=0 ! video/x-raw(memory:NVMM), format=NV12 ! nvvidconv ! video/x-raw, format=BGRx ! videoconvert ! video/x-raw, format=BGR ! appsink', cv2.CAP_GSTREAMER)
1 Like