我正在关注为较旧版本的OpenCV(PACT提供的OpenCV 2 Computer Vision)编写的书,它告诉我在创建新的属性表时在我的Visual Studio 2013属性管理器中包含lib文件夹。
我在当前的GitHub版本(opencv-master,即OpenCV 3.1.x)中看不到名为lib的目录。此文件夹是否已被其他东西替换?
I built OpenCV with cmake. I found a 4 year old unanswered question wherein someone was also looking for this folder. They tried building the library from another directory that no longer exists, but that didn't work for them anyway...
Another OpenCV user just told me that GitHub doesn't include the libraries, so you have to cmake them locally. I'm still not clear on where / how I can cmake them.
I realize the pre-built binaries have this, but I'm avoiding them because I need the SURF functions in opencv_contrib, so I needed to build it from source.
The pre-built binaries will have a library folder in the corresponding path
Local System Path(Opencv Folder)-> build->x64/x86->vc10/vc11/vc12->lib.
正如您提到的那样,您不希望使用它,那么剩下的唯一选择是在本地构建它,如果您打算将Opencv库用于各种功能和项目,那么这是一个更好的选择,因为它可以解决许多构建错误,可能稍后再面对。
我使用了Cmake图形用户界面来构建opencv,以下是在系统上成功构建库所遵循的步骤。