Two webcams on one usb hub - bandwidth issues

2019-01-28 07:45发布

问题:

I'm using OpenCV 2.3 to capture video from two webcams on a Linux computer(Ubuntu 10.04) which only has one USB hub. I'm getting an error "videoc_streamon: No space left on device" when cv.QueryFrame is called for the second camera the first time and "vidioc_qbuf: invalid argument" on subsequent calls.

I know that this is a USB bandwidth issue, so I tried lowering the resolution to 320 x 240 with cv.SetCaptureProperty, which appears to not change anything (confirmed by a call to cv.GetCaptureProperty).

What I need is some way to lower the bandwidth the cameras are using so that I can get frames from them simultaneously. It's for a stereo vision application, so I would like the frames to be grabbed at about the same time.

回答1:

Unfortunately I don't think there is a way to lower the bandwidth with code. I recently worked on a vision project where we used 4 webcams on one computer. We had to purchase PCI usb cards to get more USB bandwidth to run the cameras.