Implications of using many USB web cameras

2019-01-27 06:18发布

I'm looking into connecting multiple low resolution USB webcams to a single computer. What implications might this have on performance? How does, for example, four 320x240 cameras fare against a single 640x480 camera? I'm not well versed in the architecture of the USB interface, what are the performance caveats? By performance I mean how would it affect the time to read the image data from multiple cameras compared to a single one.

3条回答
你好瞎i
2楼-- · 2019-01-27 06:28

Each webcam is connected to a different USB port? If so, its good.

Even if its just 1 port with 4 connected webcams. I dont think 4 320x240 will have any problem either. USB 2.0 = 320Mbps. Streaming a 320x240 video wouldn't be over 1mbps. Worst case scenario, putting a 320x240 at 2mbps + 1mb of other data. That would be 12mbps bandwidth between your usb port and the device.

So from the above, the 1 USB port can handle 4 webcams connected by a splitter just as fast as 1 640x480 webcam.,

Processing these images depends on your computer speed and how you write your algorithm.

查看更多
放我归山
3楼-- · 2019-01-27 06:48

The maximum data rate of USB is way higher than what you will actually get. Webcams will probably use isochronous transfer, which under USB 2 can only get about 40% (if I recall correctly) of the bus time, and this also has a good bit of overhead. I don't know for sure, but I suspect that this is why usb webcam resolutions and data rates seem to have hit a ceiling several years ago. They may start to increase again with the use of USB 3. I'd suggest that you attach each of your cameras to it's own USB 2 port, as the 40% is shared among all isochronous connections. One of those connections sharing bandwidth with a keyboard or even a usb mass storage device should be ok, because they would only use parts of the remainder of the bandwidth.

查看更多
迷人小祖宗
4楼-- · 2019-01-27 06:50

Wrong.

First, USB 2.0 is 480mbps theoretical, and you should be able to get up to about 80% of that with a direct connection.

Second, to calculate the bandwidth used by a camera, image bit depth must be taken into account, therefore: BW = hresolution() * vresolution() * imagebitdepth(bit) * framerate(frame/s) (in bit/sec) imagebitdepth can be, for webcams, 8, 16, 24, or 32 bits (ranging from Y800 monochrome to RGBA/RGBT colour full, check spec)

Therefore, a typical webcam @ 640*480 resolution, 30fps, 16bit RGB bit-masked RGBA image bit depth will require 147.456 Mbps, and consequently, one of similar spec but @ 320*240 resolution would require 36.864 Mbps, as opposed to the major BS stated by Shawn above with his 1mbps which then is also inconsistent with just about all of his other, also wrong data.

Simulatenous operation is nevertheless largely driver dependent, it is up to the manufacturer to take the otherwise minimal effort and expose unique device IDs to DirectShow.

查看更多
登录 后发表回答