开发者

Getting webcam to work in OpenCV 2.3 with Cygwin

开发者 https://www.devze.com 2023-04-05 14:29 出处:网络
I have a problem trying to get a webcam in OpenCV 2.3 to work with Cygwin.I have a Windows 7 64-bit system and I use Notepad++ and cygwin compilers to do my C++ programming. I have seen other posts wi

I have a problem trying to get a webcam in OpenCV 2.3 to work with Cygwin. I have a Windows 7 64-bit system and I use Notepad++ and cygwin compilers to do my C++ programming. I have seen other posts with similar problems:

Getting Webcam to work in OpenCV

Can't access webcam with OpenCV

I first tried installing OpenCV via the Cygwin Ports. This is rather easy to install, but alas I run into the webcam problem (always returns false when trying to find a device). I have also attempted to buil开发者_如何学JAVAd OpenCV and install manually using the command line flavor of CMake. I tried adding the HAVE_VIDEOINPUT and HAVE_DSHOW flags, but no dice. All my programs compile nicely and I have all the functionality of OpenCV aside for this webcam thing.

Has anyone successfully built OpenCV 2.3 on Cygwin with webcam working?


It is unlikely that cygwin build of OpenCV will be able to access a webcam. At least it is not possible without hacking OpenCV cmake scripts. Under cygwin OpenCV build always follows the UNIX branch and videoinput/directshow is excluded from build.

0

精彩评论

暂无评论...
验证码 换一张
取 消