Sunday, February 13, 2011

Video Capture with DirectShow

Hooked up my Canon camera as a PC webcam with ExtraWebCam. Worked fine with Skype/VideoLAN. OpenCV failed to open as DirectShow device. In fact, the DirectShow and code of other video capture methods are disabled because HAVE_VIDEOINPUT macro is not defined. (see cap.cpp)

Updated CMakefile according to this ticket and it worked.

At the beginning I thought the macro is somehow related to missing DirectShow SDK. Then I also installed DirectX-11 SDK (thinking that it comes with DirectShow), followed by Windows SDK for Windows 7 (.Net Framework 3.5SP1). Full installation of Windows SDK requires 4G of hard-disk space. Removing .Net related matters lowers the space needed to 1.5G.

'fback' is a good sample to test.

No comments:

Post a Comment