开发者

Implications of using many USB web cameras

开发者 https://www.devze.com 2022-12-24 00:09 出处:网络
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 sing

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 archi开发者_运维技巧tecture 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.


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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消