我正在尝试为Visual C++ Express设置OpenCV 2.0,但无法成功完成。我看了遍整个互联网,并尝试了官方指南。有人可以指导我使用适用于OpenCV 2.0的教程。提前致谢。
最佳答案
由于完成了OpenCV的编译,因此需要在Visual C++中创建一个新项目。
File->New->Project
。 Win32
下的Visual C++
Win32 Console Application
OK
。 Finish
。 lib
的cv200d.lib
文件夹所在的文件夹中找到此文件夹。假设cv200d.lib
在C:\OpenCV2.0\opencv\lib\debug
中,则调试DLL应该在C:\OpenCV2.0\opencv\bin\debug
中,而Release DLL应该在C:\OpenCV2.0\opencv\bin\release
中。如果您对将文件夹添加到路径有任何疑问,请告诉我。4 Add the output directories to the system path, e.g.: C:\OpenCV2.0\vs2008\bin\Debug;C:\OpenCV2.0\vs2008\bin\Release:%PATH% It is safe to add both directories, since the Debug OpenCV DLLs have the "d" suffix, which the Release DLLs do not have.
cv200d.lib
将正确配置项目的Debug
模式。您必须进入项目的Release
模式并添加cv200.lib
(即不使用d
)。
https://stackoverflow.com/questions/2281483/