Replies: 1 comment
-
So I looked up the content of CAP_V4L2 and its 200. So I tried to put 200 in the "align camera" field. When I press open camera it gives no error anymore. It doesn't show anything either. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, when I try to open the camera I get the following message: (see image)
I am on rpi 4b with 8 gb ram and the csi v2 pi camera.
I have tried using
$ python3 $ import cv2 $ cam = cv2.VideoCapture(0)
Which gives the same error.
However it works perfectly fine when I use
cam = cv2.VideoCapture(cv2.CAP_V4L2)
So to me it seems this is some issue with openCV. However I figured I might be able to work around this by simply changing some code in bCNC.
So I found this
self.camera = cv.VideoCapture(self.idx)
It appears pass a variabele idx defined as
self.idx = Utils.getInt("Camera", prefix)
In utils I found this function basically gets the "Camera" input from the config.
In the config I don't find any single camera = entry. There is a [Camera] section tho. But it only contains aligncam_xxx entrys. Which don't seem to have anything to do with this.
So I wonder. Is it save to replace the self.idx with cv2.CAP_V4L2 ?
Also I have never used python before. Since I need to use the python command to launch a "module", I have gotten the impression that python program is not compiled. Can I edit this locally? If so, what is the default installation directory? Or do I need to fork the github and install it somehow from my own source then?
Or if you know how to fix this on opencv side I am very open for suggestions.
Thanks in advance for any help.
Beta Was this translation helpful? Give feedback.
All reactions