Hi, I am working on Jetson Orin Nano 8Gb running Jetpack 5.1.2 and I am trying to access my imx219 MIPI CSI camera video feed through the opencv-python library (cv2).
The following pipeline successfully launches my camera in CLI:
gst-launch-1.0 nvarguscamerasrc sensor_id =0 ! 'video/x-raw(memory:NVMM), width=1280 ,height=720 , format=(string)NV12' ! nvvidconv ! nvegltransform ! nveglglessink
I adapted the pipeline to work as an input to the openCV function “VideoCapture()” as follows:
pipeline1 = "nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM), width=1280 , height=720 , format=(string)NV12 , framerate = 30/1 ! nvvidconv flip-method=2 ! video/x-raw , width=640 , height=360 , format=(string)BGRx ! videoconvert ! video/x-raw , format=(string)BGR ! appsink"
video_capture = cv2.VideoCapture.open(pipeline1,cv2.CAP_ANY)
But this didn’t work. After a while I realized opencv has Gstreamer support disabled by default by running this python code:
import cv2
print(cv2.getBuildInformation())
the output says “[…] Gstreamer = NO […]”
How can I enable Gstreamer support for opencv-python ?
Any help would be greatly appreciated, thank you.
Jad.