1

when asking Google I get a lot of information and - and that's my problem - many different ways of capturing images from an Webcam using Windows. It seems the programming interface that gives this possibility has changed very often.

So my question: when I target a modern Windows (XP, Vista, 7) - which way should I use to capture images? Is there a C/C++ example somewhere available that describes the current way of doing this?

Thanks!

Elmi
  • 5,899
  • 15
  • 72
  • 143
  • 1
    A DirecShow (WDM) filter graph is the normal way of doing this. This has been the preferred method since Windows 2000 where it supersceded the Video for Windows interface. – Deanna Apr 08 '13 at 12:50
  • @Deanna: thanks! So WDM and DirectShow are the same interface? Funny, I thought they are something different... – Elmi Apr 09 '13 at 06:45
  • In the concept of video capture, they're the effectively seen as the same thing. WDM is the driver system, DirectShow makes full use of the updated drivers to provide its functionality. – Deanna Apr 09 '13 at 08:42
  • @Elmi: DirectShow is the API. Typical video capture devices are WDM driver based, DirectShow supports them through [WDM Video Capture](http://msdn.microsoft.com/en-us/library/windows/desktop/dd390974%28v=vs.85%29.aspx) filter + it also supports other devices as well. – Roman R. Apr 09 '13 at 09:00

1 Answers1

0

A good library for this is something like opencv and it is written with c++ in mind.

http://opencv.org/

This is a good option if you would like to do some processing on the images that you capture. the documentation on the c++ side of this is great as well so that is also a plus.

alex_milhouse
  • 891
  • 1
  • 13
  • 31
  • OpenCV is a tremendous overkill for just capturing an image. Additionally it uses legacy (wrong) API to capture by default. – Roman R. Apr 09 '13 at 08:59
  • 1
    Currently I try to *replace* OpenCV since it has enormous problems capturing images in native resolution of the camera - they always come with 640x480 instead of what the camera is able to handle. – Elmi Apr 09 '13 at 12:39