Hello,
I am trying to connect the camera for the Dobot Vision kit to my Raspberry Pi 4 (Raspbian 32-bit) but I am having problems.
System recognizes the camera on the port but then it fails to get a picture.
jamnikjakob@raspberrypi:~ $ lsusb
Bus 002 Device 002: ID 2bdf:0001 U3V MV-CE050-30UC <==== this is the camera
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I am programming with Python3 and OpenCV.
Code:
import cv2
_cam = cv2.VideoCapture(0)_
_ret , image = cam.read() _
_print(ret)_
This returns an error:
_/tmp/pip-req-build-r02f5qx8/opencv/modules/videoio/src/cap_v4l.cpp (890) open VIDEOIO(V4L2:/dev/video7): can't open camera by index_
Then if I change to cv2.VideoCapture(-1) it returns:
/tmp/pip-req-build-r02f5qx8/opencv/modules/videoio/src/cap_v4l.cpp (877) open VIDEOIO(V4L2): can't find camera device
When I add an argument cv2.VideoCapture( cv2.CAP_DSHOW , 0 ) I don’t get an error but I still don’t get any returns even when I change the index
I also tried to take a picture in terminal but it also returns an error:
~ $ fswebcam -r 1280x720 --no-banner /images/image1.jpg
--- Opening /dev/video0...
stat: No such file or directory
Is there any drivers that I could install on Raspberry Pi that would solve my problem.