Connect multi usb cameras

551 views Asked by At

I'm trying to connect two USB webcams that are connected to a single USB port. the problem is that only one cam works at the time... I'm using OpenCV with python. Is that even possible? my goal is to connect multi cameras to a single computer for machine vision application. any advice?

1

There are 1 answers

0
Ulrich Stern On

Most USB webcams are USB 2.0, so you have only 480 Mbit/s to share for your webcams per USB controller. So the resolution, frame rate, and whether compression is used (better webcams usually support at least MJPG) matters. 720p at 30 fps without compression is about 660 Mbit/s (720*1280*30*3*8). In addition, some webcams (e.g., Microsoft LifeCam) reserve bandwidth independent of the actual requirements. On Linux, one can override this reservation. This question and its answers have lots of good info for Linux. For both Linux and Windows, I have added USB cards (controllers) to increase the number of webcams I can use. The controller chip can make a difference (some examples below). My setup with the largest number of webcams has 24 of them on a single Linux box. The "Handling many webcams" section of a paper I put on bioRxiv gives some additional info.

To give some surprising examples I ran into, in one case I could use two LifeCams, which reserve about 48% of USB 2.0 bandwidth each, reliably only after moving mouse and keyboard to different USB ports; all four ports I used initially were internally using the same USB controller. In another case, both NEC (Renesas)'s D720200 and D720201 USB 3.0 chips seem to have so-so USB 2.0 support and both supported only one LifeCam but not two. For VIA's VL800, had frame loss at 720p but lower resolutions worked fine; I am a fan of the VL805, though.