How to solve cv2.VideoCapture(index) problem on Ubuntu 16.04 ?

asked 2018-02-12 21:57:28 -0500

Edocit gravatar image

If I start my computer with a cam like sj4000 setted as "PC camera" and then I run my python program to do live face recognition it takes the sj4000 as camera for whatever index i set from -1 to 9. In the opposite way if I start my computer without connect the external camera it take the default PC webcam as video input and again it makes no difference if I change the index from -1 to 9; there aren't possibility to change the input camera without restarting the system. Can someone help me ? Programming language -->python 3.5.2 OpenCV version --> 3.4.0 OS --> Ubuntu 16.04 LTS

edit retag flag offensive close merge delete