since about one week I am active working on a project where I have to capture images from USB Webcams. I got 3x "Logitech Quickcam Pro 4000" and they are working ok with Scronty's test programm.

I say "ok" because VFW doesnt provide a way to manual select the video source. Sure, you can select the driver (which in this case is "Microsoft WDM Image Capture (WDM)") but you get a ugly "Video Source" selection dialog with a combobox top select the source camera. Read what Microsoft says about that selection box:

[b]- Programmatically open a specific WDM capture device.[/b]
There is a compatibility issue in allowing a VfW application to programmatically
open a specific capture device without using the video source dialog box.
However, because most VfW client applications allow a user to bring up the
video source dialog, this issue has a workaround.

Thanks Microsoft, thats -1000 points for programm automation!


Another way of to capture images is using DirectShow (formerly "ActiveMovie") instead of the (old) VFW interface. I googled the last 2 days for documentation/examples covering video/image capturing using DirectShow and beside from two applications and a free OCX (which doesnt work as I would like it to do) I found nothing usefull.

A good start would be the ability to select the cameras as capture devices. But when I look at the example code Microsoft provides about that topic, I get sick :(

To sum it up:

    [*]does anyone have information about video/image capture of webcams with DirectShow (I need video preview and capturing of a single frame)?
    [*]Can anyone provide understandable example code?

    Thanks in advance,
Posted on 2003-06-24 02:59:40 by bazik
Anyone got a idea? :/
Posted on 2003-06-25 00:34:15 by bazik
Video Capture with directshow is very well documented inside dxsdk.

hint# : try first with graphedit to build your capture graph and later you can load it from your code (look for : Loading a Graphedit File programatically ).

if you like to process captured images with your prg, insert samplegrabber filter to the graph (between capture device and rendering filter (if you dont like realtime preview, you can use null renderer as video rendering filter).

note : i never used dshow for video capture, i dont have any example code..
Posted on 2003-06-26 12:52:57 by kamilh