python 2 cameras under usb hub

asked 2014-05-31 09:38:11 -0600

romajr gravatar image

Hi everyone,

I'm doing some tests and I read that the function to get frames from cameras (cv2.videoCapture) has as parameter the index of the device. If you put '-1' you give the code the permission to get frames from the first accessible camera (in my case, my notebook's webcam) and you can put 0 if you have only one.

I'd like to develop with 2 cameras - and as I have only 1 usb port in my notebook - I broke the others 2 - I'm trying to make it run under an USB HUB.

via lsusb I can identify the device index but I can't access the second camera in my python-opencv script...

Does anyone know to solve the problem or what is the best method to work with 2 external cameras ?

Tks for your attention.. =)))

edit retag flag offensive close merge delete

Comments

try with 0 for the 1st one , and 1 for the 2nd cam.

but again, both on the same usb hub are a problem, as the IO rate is barely enough for one camera.

berak gravatar imageberak ( 2014-06-01 02:34:23 -0600 )edit