使用Cygwin让网络摄像头在OpenCV 2.3中工作 [英] Getting webcam to work in OpenCV 2.3 with Cygwin
问题描述
我有一个问题,试图在OpenCV 2.3中使用网络摄像头与Cygwin一起工作。我有一个Windows 7 64位系统,我使用Notepad ++和cygwin编译器来做我的C ++编程。我看到过类似问题的其他帖子:
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:
我第一次尝试通过Cygwin端口安装OpenCV。这是很容易安装,但是我遇到了网络摄像头的问题(当尝试找到一个设备时总是返回false)。我也试图构建OpenCV并使用CMake的命令行风格手动安装。我试图添加HAVE_VIDEOINPUT和HAVE_DSHOW标志,但没有骰子。所有我的程序编译得很好,我拥有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 build 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.
有没有人用网络摄像头成功地在Cygwin上构建OpenCV 2.3?
Has anyone successfully built OpenCV 2.3 on Cygwin with webcam working?
推荐答案
OpenCV的cygwin构建不太可能访问网络摄像头。至少不可能没有黑客OpenCV cmake脚本。在cygwin下,OpenCV构建始终遵循UNIX分支,并且videoinput / directshow从构建中排除。
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.
这篇关于使用Cygwin让网络摄像头在OpenCV 2.3中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!