Hi all, any and all advice here would be greatly appreciated!
I’m trying to initialize a camera for reading video frames in Python using CV2’s VideoCapture utility and the GStreamer pipeline below:
pipe = "v4l2src device=/dev/video0 ! video/x-raw, format=BGRx ! videoflip method=rotate-180 ! videoconvert ! videoscale ! video/x-raw ! queue ! appsink sync=False"
capture_device = cv2.VideoCapture(pipe, cv2.CAP_GSTREAMER)
I’ve also tested and confirmed that using the following get-launch-1.0 command on the command line gives a live video stream:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, format=BGRx ! videoflip method=rotate-180 ! videoconvert ! videoscale ! video/x-raw ! queue ! ximagesink sync=False
jtop shows OpenCV version 4.5.1 and is compiled for CUDA, however cv2.version in the script described above shows OpenCV version 4.5.4-dev.
Any advice would be hugely helpful. Thank you again in advance!