Access to webcams in C ++ without openCV

Is it possible to create some C ++ webcam program without using opencv (and without an external library)? My idea is to take data from a webcam and display it in a window, for example, in real time. Could you show me an example? Sorry for my bad english. Thank you very much.

+4
source share
1 answer

In short: for Windows and C / C ++, the easiest way is to use DirectShow.

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

Yes, you still need DXSDK, but in fact I managed to extract the necessary DShow interfaces into one 100kb file. So my advice is: live with a video integration library.

In linux, the Video4Linux (2) library is somewhat simpler. Everything is done through file APIs.

On MacOS X, you have QTKit . Making a simple window with a live stream of the camera is a breeze. A sample is provided in the Apple documentation.

+3
source

Source: https://habr.com/ru/post/1434927/


All Articles