user1491548
user1491548

Reputation: 111

Webcam access in c++ without openCV

Can I make some c++ webcam program without using opencv (and without others external library)? My idea is to take the data from the webcam and display it on window, like a live video. Could you show me some example? Sorry for my bad english. Thank you very much.

Upvotes: 6

Views: 6512

Answers (1)

Viktor Latypov
Viktor Latypov

Reputation: 14467

Long story short: for windows and C/C++ the most straightforward way is by using the DirectShow.

There is a nice wrapper of DirectShow framegrabber here: http://www.muonics.net/school/spring05/videoInput/

Yes, you still need the DXSDK installed, but actually I managed to extract the required DShow interfaces into the single 100kb file. So my advice: live with the videoInput library.

On linux the Video4Linux(2) library is somewhat simpler. Everything is done through file-like APIs.

On MacOS X you have the QTKit. To make a simple window with live camera stream is a breeze. The sample is right in the Apple's documentation.

Upvotes: 5

Related Questions