cv2.VideoCapture.open() always returns FALSE

后端 未结 8 2154
没有蜡笔的小新
没有蜡笔的小新 2020-12-09 17:52

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.



        
8条回答
  •  心在旅途
    2020-12-09 18:28

    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.

提交回复
热议问题