编译最新版本的OpenCV
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了编译最新版本的OpenCV相关的知识,希望对你有一定的参考价值。
参考:https://github.com/opencv/opencv/wiki/Windows_7_and_TortoiseGit_contribution_guide
一 下载最新代码,可以通过GIT或Http直接下载
一 下载最新代码,可以通过GIT或Http直接下载

二 cmake(注意,如果编译为静态库,需要选择 BUILd_WITH_STATIC_CRT)
两次build,一次generate,然后直接OpenCV project

三 生成

VS里面选择Install,并生成
四 使用
如果是动态库,使用方法和下载的Prebuild方法一样;如果是静态库,设置如下
设置Include

设置引入

设置lib(注意填全)

五 联系试用

在项目中将OpenCV项目引入,则在编译的时候可以直接调试原始代码。
TIP:代码生产 运行库 选择多线程,可以将MFC静态编入。

程:如果使用静态库,那么最后所有生成的只有一个程序,这是非常好的。
以上是关于编译最新版本的OpenCV的主要内容,如果未能解决你的问题,请参考以下文章
sh 获取最新版本的opencv以及构建和安装它的说明。从http://docs.opencv.org/trunk/d7/获取的一些说明