OpenCV 2.1:facedetect.cpp在找到丑陋的脸时崩溃

Mat*_*tag 6 opencv image-processing visual-studio-2010

我正在尝试在Visual Studio 2010中的OpenCV\Samples\C文件夹中编译facedetect.cpp.项目编译并开始正常,显示我的相机的预览,然后似乎在cascade.detectMultiScale()崩溃一旦它检测到一张脸.我断定OpenCV认为我太难看了.

Unhandled exception at 0x100342bf in HeadTrackerExample.exe: 0xC0000005: Access violation writing location 0x00000000.

不幸的是,调试信息不​​允许我深入探究.我正在链接cv210.lib; cxcore210.lib; highgui210.lib; 调试版本不起作用:

LDR: LdrpWalkImportDescriptor() failed to probe D:\OpenCV2.1\bin\cv210d.dll for its manifest, ntstatus 0xc0150002

我将尝试用安妮海瑟薇的打印输出来欺骗分类器,但我愿意接受其他建议.

https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/c/facedetect.cpp

Mat*_*tag 0

我花了一天时间试图解决这个问题。谁知道为什么会崩溃?我无法链接到调试 DLL,所以我们永远不会知道。我下载了 OpenCV-2.1.0-win32-vs2008.exe 发行版。我使用的是 Visual Studio 2010。因此,exe 崩溃了

LDR: LdrpWalkImportDescriptor() failed to probe D:\OpenCV2.1\bin\cv210d.dll for its manifest, ntstatus 0xc0150002 Debugger:: An unhandled non-continuable exception was thrown during process load The program '[5172] HeadTrackerExample.exe: Native' has exited with code -1072365566 (0xc0150002).

这就是“0xc0150002 错误”。根据 Dependency Walker 的说法,OpenCV 调试 DLL 正在尝试查找 msvcr90d.dll 和 msvct90d.dll(Visual Studio 2008 调试运行时 DLL)。好吧,我获得了这些,但它仍然不起作用,所以这进入了深奥的 Windows 并排和清单内容。

我切换到 OpenCV-2.3.1-win-superpack.exe 发行版,它现在可以工作了。