0

How difficult is it to make software for a webcam such as the Gateway USB 2.0 Web Cam? I would like to be able to retrieve picture snapshots on demand. Is there a C++ library or other API that I may use to do so?

Steve Guidi
  • 19,700
  • 9
  • 74
  • 90
blood
  • 746
  • 5
  • 13
  • 22

1 Answers1

4

The answer depends on what platform you are using. For example, if on Windows, you can retrieve data from the camera using the DirectX API, Linux has Video4Linux and Mac has QuickTime.

There are some cross-platform wrappers which provide a layer above the native video API, and therefore offer a common API across multiple platforms. One such project is OpenCV which - although not intended primarily for camera capture use cases - does support them via the cvCaptureFromCAM and cvQueryFrame functions.

The QtMobility Multimedia APIs will also offer cross-platform camera support, but this API is not yet implemented. Check back in Qt 4.7 if this library looks interesting to you.

Gareth Stockwell
  • 3,112
  • 18
  • 23