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.
2 Answers
In general, ecomomies of scale mean a single high res camera, will affect your system less than 4 smaller cameras of quarter of the resolution. The easiest way to measure performance is to look in task manager with one or two cameras connected, and look at the CPU loading for that camera. Ensure it doesn't exceed a few percent or otherwise you could start to see slowdowns. I would recommend you use identical cameras to reduce the number of device drivers you need loaded.
There are though, possibly much better ways to solve your problem than using 4 USB cameras (depending on what you're trying to do). You can for example, get dedicated PCI cards which can take from 4-16 cameras and all the hard work is done in hardware. This means CPU loading is negligable. Most take normal composite inputs which makes the cameras much cheaper. You can probably buy 4 cameras plus the card, for the same price as a couple of decent webcams from eBay - including security software.
- 1,272
One thing that you should bear in mind is that while a QVGA needs very little bandwidth, many cheap webcams only run at 'full-speed' (12Mbit/s) even if they say they are "USB 2.0" devices (only USB 2.0 'Hi-speed' devices run at 480Mbit/s).
Not only that, but if you plug multiple 'full-speed' devices into a standard single-TT USB hub (which is most of them) then all 4 will have to share that 12Mbit/s of a single 'full-speed' link.
That is why, if you want to run multiple 'full-speed' devices as quickly as possibly, make sure you buy a multi-TT hub. The easiest to find is the Belkin Tetra-hub, but you will probably have to get these from the net, they are unlikely to be stocked by your local computer shop.
A 4-port multi-TT hub should be able to run 4 'full-speed' devices with 12Mbit/s for each camera however.
There was a nice article on Tom's Hardware Guide about multi-TT back in 2003.
Also note that if you get true Hi-speed USB 2.0 webcams, you won't have this problem. 480Mbit/s should be enough for lots of QVGA cameras, all simultaneously streaming, if the software that comes with them supports it.
Edit: If this is for a machine vision application, the choice of interface could be guided by the image library you use. Personally, for home applications USB is fine, for industrial use I would always go for Firewire over USB. It has much finer grained bandwidth control and you can decide exactly which cameras get what bandwidth by defining their resolutions and framerates. The firewire DCAM protocol gives you lots of flexibility in windowing your sensor (selecting a subset of the image to be transmitted, potentially giving you much higher frame rates for a given bandwidth). Obviously if you don't need the extra flexibility then the extra expense is not warranted, but if you don't have tight budget requirements, it gives you many more engineering options.
- 2,869