I installed opencv 4.4.1 using this https://github.com/JetsonHacksNano/buildOpenCV
But I can’t use VideoCapture.
a = cv2.VideoCapture(0)
[ WARN:0] global /home/tigerit/opencv/modules/videoio/src/cap_gstreamer.cpp (1757) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Internal data stream error.
[ WARN:0] global /home/tigerit/opencv/modules/videoio/src/cap_gstreamer.cpp (886) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global /home/tigerit/opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
VIDEOIO ERROR: V4L: can’t open camera by index 0
I’m using a raspberry pi v2 camera, I’m able to run the camera with command
gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! nvoverlaysink
I tried installing v4l-utils, but getting this error:
Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: v4l-utils : Depends: libv4l2rds0 (= 1.14.2-1) but it is not installable E: Unable to correct problems, you have held broken packages.