OpenBR之一:Windows下配置OpenBR

Windows下配置OpenBR

一.下载并安装Visual Studio 2013;


二.下载并安装Cmake 3.0.2;


三.下载opencv 2.4.13:

1.将opencv 2.4.13解压至D:\;
OpenBR之一:Windows下配置OpenBR_第1张图片
2.打开Visual Studio 2013 本机工具命令提示并输入依次如下指令(编译opencv);

<span style="font-size:24px;">$ cd D:\opencv2\opencv\sources
$ mkdir build-msvc2013
$ cd build-msvc2013</span><span style="font-size:18px;">
$ cmake -G "NMake Makefiles" -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DWITH_FFMPEG=OFF -DCMAKE_BUILD_TYPE=Debug ..
$ nmake
$ nmake install
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ nmake
$ nmake install
$ nmake clean</span></span>

四. 下载并安装Qt 5.5.1

OpenBR之一:Windows下配置OpenBR_第2张图片


五. 创建一个Github帐号并遵从他们的指示设置Git

从桌面启动Git Bash并下载OpenBr

<span style="font-size:24px;">$ cd D:\
$ git clone https://github.com/biometrics/openbr.git
$ cd openbr
$ git checkout v1.1.0
$ git submodule init
$ git submodule update</span>

六. 编译OpenBR

1. 打开Visual Studio 2013 本机工具命令提示并输入依次如下指令(编译OpenBR)
<span style="font-size:24px;">$ cd D:\openbr
$ mkdir build-msvc2013
$ cd build-msvc2013
$ cmake -G "CodeBlocks - NMake Makefiles" -DCMAKE_PREFIX_PATH="D:\opencv2\opencv\sources\build-msvc2013\install;D:\QT5.1\5.5\msvc2013" -DCMAKE_INSTALL_PREFIX="./install" -DBR_INSTALL_DEPENDENCIES=ON -DCMAKE_BUILD_TYPE=Release ..
$ nmake
$ nmake install</span>
2. 检查Install文件夹看是否安装成功

七. Hack OpenBR

1. 启动QT;
2. 点击QT菜单栏“工具”选择“选项”;

3. 在”构建套件(Kit)“中选择"Desktop (default)"
4. For "Compiler:" select "Microsoft Visual C++ Compiler 11.0 (x86_amd64)" and click "OK"
5. From the Qt Creator "File" menu select "Open File or Project...".
6. Select "C:\openbr\CMakeLists.txt" then "Open".
7. If prompted for the location of CMake, enter "C:\Program Files (x86)\CMake 3.0.2\bin\cmake.exe".
8. Browse to your pre-existing build directory "C:\openbr\build-msvc2013" then select "Next".
9. Select "Run CMake" then "Finish".
10. You're all set! You can find more information on Qt Creator here if you need.

八. 打包OpenBR(可选)

打开Visual Studio 2013 本机工具命令提示并输入依次如下指令:
<span style="font-size:24px;">$ cd D:\openbr\build-msvc2013 $ cpack -G ZIP</span></span>

你可能感兴趣的:(OpenBR之一:Windows下配置OpenBR)