LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQdx, DirectShow, and multiple USB Webcams

Hello,

 

I have encountered the issue of using multiple (identical) USB webcams via IMAQdx, that depends on DirectShow porting (Windows), which in turn render simultaneous operation of multiple identical webcams dependent on the actual driver the operating system controls the device by. Having contacted some larger manufacturers for a list of their respective webcam models that can be operated simultaneously (using identical devices and drivers), my experience is that tech support people either don't know what I am talking about, often coupled with them not knowing what THEY talk about, or they simply state no cams can be operated simultaneously. This is clearly not true, some have already been found to work fine.

 

I would like to create a list of models known to work simultaneously, with 2 cams or optionally more. Below are my findings so far, if you know of further models confimed to work simultaneously, by all means, please do add it here - many would be interested.

1) CANYON CN-WCAMN1 (30 fps: VGA only)

 

loses fps due to moderate light conditions rapidly, otherwise ok + good user control

2) Creative VF0220  (30 fps: VGA only)

 

reported to be working

3) Creative VF0330  (30 fps: VGA only)

 

reported to be working

 

4) Logitech Webcam Pro 9000 HD (30 fps: WXGA/HD)

 

not to be confused with "Quickcam" Pro 9000, which is reported to fail
relatively robust frame rates in low light conditions

lots of resolutions available, with nice fps choice incl. 25fps which is somewhat rare
certain resolutions are prone to artefacts, image quality is not the best, acceptable though
                        
5) Micro$oft Lifecam Cinema HD (30 fps: WXGA/HD*)

 

some report 2 cameras maximum, seems bus address / HW controller related

somewhat less robust frame rates in low light conditions (compared to Logitech Webcam Pro 9000 HD)

decent number of resolutions available, much better image quality (compared to Logitech Webcam Pro 9000 HD)
* some also report 1280x720 @ 30 fps only if using generic USB Camera driver
* Micro$oft claims that HD 30 fps is enabled via MS driver "if the PC is powerful enough" (cheap, and invalid excuse for not supporting advertised specifications via manufacturer driver)

6) Sony PlayStation 3 Eye (60 fps: VGA only)

 

codelaboratories.com: driver (1 cam, free), SDK (n cams), and Packs (n cams)
codelaboratories.com CL-Eye Platform Packs for 2/4/8/16 cams, USD 20/35/60/115)
IMAQdx may still port multiple cams via DirectShow, even with free driver / SDK API
Could someone with a PS3 w/ 2 cams check perhaps? above driver/SDK downloads are free
60fps really is available, and at a truly budget cam price of only EUR ~15 each
due to the availability of 60fps, I would assume lower framerates to be quite robust to light conditions (fixed fps?)

0 Kudos
Message 1 of 5
(6,126 Views)

To the margin of USB 2.0 bandwidth induced resolution limitations (and associated excuses)

 

Some webcammanufacturer tech support people (of all tiers) tend to try this cheap this excuse to justify why the advertised resolution/fps combo is does not work (i.e. false advertisement applies, which should be a legal offence in any civilised country). I can assure you this is totally invalid, see the table below (let us know about any extra insight to USB 2.0 though, I am happy to correct myself if shown to be wrong, of course).

THEORETICAL USB 2.0 BANDWIDTH (480 Mbps) INDUCED RES LIMITATION @ 30FPS:

      1 CAM              2 CAMS

HORZ X VERT         HORZ X VERT     ASPECT ( depth) FORMAT

1632 X 1224         1152 X  864        4:3 ( 8 bit) U800
1332 X  999          940 X  705        4:3 (12 bit) YUV2
1152 X  864          816 X  612        4:3 (16 bit) YUYV
 940 X  705          664 X  498        4:3 (24 bit) RGB

1872 X 1053         1328 X  747       16:9 ( 8 bit) U800
1536 X  864         1088 X  612       16:9 (12 bit) YUV2
1328 X  747          928 X  522       16:9 (16 bit) YUYV
1088 X  612          768 X  432       16:9 (24 bit) RGB

SAME WITH 20% USB 2.0 BANDWIDTH HEADROOM FOR PRACTICAL CONSIDERATIONS:

1460 X 1095         1032 X  774        4:3 ( 8 bit) U800
1192 X  894          840 X  630        4:3 (12 bit) YUV2
1032 X  774          728 X  546        4:3 (16 bit) YUYV
 840 X  630          596 X  447        4:3 (24 bit) RGB

1680 X  945         1184 X  666       16:9 ( 8 bit) U800
1376 X  774          960 X  540       16:9 (12 bit) YUV2
1184 X  666          832 X  468       16:9 (16 bit) YUYV
 960 X  540          688 X  387       16:9 (24 bit) RGB

 

Number of cams to be interpreted per USB controller only. Most webcams' outputs are 12bit, but 16 bit at a maximum, both of which should confidently fit into the USB 2.0 bandwidth therefore, even with 20% headroom.

Decent expresscard, pci-e, firewire, e-sata, etc to USB 2.0 hubs should all remove bandwidth sharing limitations (on-chip), and so does simply using different USB controllers of the motherboard.

 

Used the following simple Matlab function to calculate above values (can also be used for other bandwidths, custom apsect ratii, etc):

 

function [maxres] = camreslims(bandwidth, framerate, bitdepth, aspect_h, aspect_v, cams, hr)
% I: (bandwidth(Mbps), framerate(fps), bitdepth(bits), aspect_h, aspect_v, cams/usbcontroller, headroom(%))
% O: [maxres_h maxres_v]
res = ((((((100-hr)/100)*bandwidth*10^6)/(framerate*bitdepth*cams))/(aspect_h*aspect_v))^0.5)*[aspect_h aspect_v];
maxres = [(floor(res(2)/aspect_v))*aspect_h (floor(res(2)/aspect_v))*aspect_v];
end

 

Finally, it may worth checking machine vision cameras of course, dependent on your budget window of course, but considering the price of some of the high-end webcams, and the zero uncertainlty factor / performance of machine vision cams, value for money ratio may actually prove higher with machine vision. Will need lens, and probably IR filters, but you get passive IR functionality therefore, too. One cheap example (best price I have found so far, let us know if you know a better offer):

 

DMK/DFK 22AUC03, EUR 219 (no trig version)

USB CMOS mono or colour (same price), format, fps, reso control of course, and fixed framerate

744x480 @ 76 fps

640x480 @ 87 fps

320x240 @ 150 fps

comprehensive drivers include a dedicated LabVIEW driver

http://www.theimagingsource.com/en_US/products/cameras/usb-cmos-mono/ (mono version: DMK 22AUC03)

http://www.theimagingsource.com/en_US/products/cameras/usb-cmos-color/  (colour version: DFK 22AUC03)

German engineering, should we concern quality...

 

Again, should you know about webcams known to work simultaneously (using identical devices / drivers) via IMAQdx, please add. Cheers.

 

 

0 Kudos
Message 2 of 5
(6,125 Views)

Further to the above issue, I have just bought two PS3 Eye cams, and I can confirm that, using the new codelaboriatories.com drivers, now it does output fixed frame rate video streams in YUYV 16bit/pixel (indicated as "RGB") at a VERY detailed range of speeds (tested with LabVIEW 2010 Pro SP1 x86 on x64 sys):

 

320x240 @ 0.1 - 187 fps FIXED FPS

640x480 @ 0.1 - 75 fps FIXED FPS

 

CL Eye Platform Dirver v5.0.1.0528: LV IMQAQdx OK, VisionExpress OK

CL Eye Platform Dirver v5.1.1.0177: LV IMQAQdx OK, VisionExpress OK (current latest version)

 

horizontal FoV 56 or 75 deg, manual (lens)

noise increases with fps above 30 fps, but is not excessive

sensor compensates for gain, not integration time (hence the fixed fps)

includes 4 directional microphones, too (may be of interest to some)

 

Three options are available from codelabs, none of which seems to provide a solution for multi-cam development in LabVIEW to present date (third option yet to be confirmed, which did not support multi-cam DirectShow components in Sep 2010, just might have changed since):

 

Platform Driver (free donwload)

DirectShow component is single cam only

output format option:

YUYV only (16bit "RGB")

some speeds, if set via VIsionExpress, incorrectly initialise, e.g. 40fps setting is 33.3fps, but most are correct (non-critical, though I happen to want 40fps, typical)

has to be physically replugged after each reboot (non-critical, some tend to think they have to reinstall after every reboot)

Does not help the DirectShow multi-cam LabVIEW issue at all, unless:

Forced version manipulation leads to multi-cam recognition within LabVIEW (tried a few combinations, these don't)

Some alternative driver accidentally provides DirectShow multi-cam (alternative devices also using Omnivision OV538 USB 2.0 Bridge and/or OV7720 CMOS sensor)

 

Platform SDK (free download)

AS3, C#, C, C++, Java classes and examples

output format options:

YUYV (16bit "RGB")

Y800 (8bit grayscale)

Bayer (unprocessed)

multi-cam DLLs included

Does not help the DirectShow multi-cam LabVIEW issue at all, unless:

Call Library Node method is used (VERY troublesome, exact code mapping is needed, no function pointer mapping in LV, wrapper required for parameter control)

Someone can convert any of the above into a bloody PS3 Eye Acquisition Node (with property nodes or inputs) / ExpressVI / separate EXE that ports to LV

 

Platform Packs (USD 20, 35, 60, 115 for 2, 4, 8, 16 camera credits packages)

DirectShow component is STILL single cam only

output format options:

YUYV (16bit "RGB")

Y800 (8bit grayscale)

Bayer (unprocessed)

Does not help the DirectShow multi-cam LabVIEW issue at all, unless:

They have changed the DirectShow component to multi-cam since Sep 2010 when it definitely was single cam only

I manage to successfully lobby at codelaboratories.com to do this

 

Since LabVIEW is also a programming language (inter alia / at a very minimum), I would expect CL software to support LV fully, via VisionExpress / DirectShow / IMAQdx, at least when purchasing a Platform Pack intended for "development / research purposes". If so, I am very happy to pay USD 35 in my case. I keep on indicating the quite populated segment of LabVIEW users who would gladly do the same, I assume, in order to be able to use VERY cost-effective, USB, desktop low-grade machine vision system replica consisting of multiple cameras, with fixed fram rates up to 640x480 @ 75fps, 75 deg FoV, and at a cost of GBP 7.49 each (!!) (as of June 2012, from Amazon, extra GBP 2.99 for TV-mount clips each if you want such). Absolute best webcam so far (as long as 640x480 max resolution is satisfactory - I personally would be happier with a 16:9 800x450 fixed frame rate mono batch of 4, but at least a pair, working fine with LV, but will cope with VGA too).

 

I would still ask, if anyone knows of any webcam models that work simultaneously as a DirectShow component (and therefore in LabVIEW) using identical devices, and/or happen to offer a FIXED frame rate option, please let me know.

0 Kudos
Message 3 of 5
(6,047 Views)

Codelaboratories finally responded to my harrassment today, indicated that they'll look into LabVIEW driver / DirectShow component (VisionExpress) availability for multiple PS3 Eye cameras. Since their free SDK supports 2 cameras with C, C#, Java, and AS3, I suggested that it would be both highly productive and fair to provide the same functionality for LabVIEW, either via a deidcated driver or a DirectShow component via VisionExpress, considering that it is one of the most potent languages for a broad range of vision development scopes and applications in both industry and academia.

 

Awaiting eagerly.

0 Kudos
Message 4 of 5
(6,010 Views)

do you have any LabView VI thats works with two or more cameras?

 

I'm trying to use Two at the same time put I'm not sure if gona work.

 

I try to make my own VI, but no luck.

 

Thank you

0 Kudos
Message 5 of 5
(5,229 Views)