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?
Asked
Active
Viewed 1,181 times
0
-
Duplicate of http://stackoverflow.com/questions/688165/cross-platform-webcam-access – Gareth Stockwell Feb 19 '10 at 07:36
-
Duplicate?.. o xD lol look at that lol. sorry i did not see that post. – blood Feb 19 '10 at 19:00
1 Answers
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