I am trying to access a Logitech c310 webcam on my beaglebone. It always returns false for any device ID, I am not sure why.
I use the following code.
It depends on the argument being passed to the cv2.VideoCapture().
Normally, it is 0 for making the primary webcam of your pc work. Similarly, if you want to get access to a second camera installed on you system pass the argument as 2.
But if you have only 1 camera and indexing '0' is not helping, then try passing the index as -1 instead.