OpenBR编译

我是在OS X上编译OpenBR的,另外在云主机上编译Qt这种东西简直太坑了!

OpenBR有一个人脸比对的功能,效果还可以,主要是在标数据时候用。

编译过程基本遵循如下:

  1. Download and install the latest "XCode" and "Command Line Tools" from the Apple Developer Downloads page.

  2. Download CMake 3.0.2

        $ cd ~/Downloads
        $ tar -xf cmake-2.8.11.2.tar.gz
        $ cd cmake-2.8.11.2
        $ ./configure
        $ make -j4
        $ sudo make install
        $ cd ..
        $ rm -rf cmake-2.8.11.2*
    
  3. Download OpenCV 2.4.11

    $ cd ~/Downloads
    $ unzip opencv-2.4.11.zip
    $ cd opencv-2.4.11
    $ mkdir build
    $ cd build
    $ cmake -DCMAKE_BUILD_TYPE=Release ..
    $ make -j4
    $ sudo make install
    $ cd ../..
    $ rm -rf opencv-2.4.11*
    
  4. Download and install Qt 5.4.1

  5. Create a GitHub account, follow their instructions for setting up Git.

    $ git clone https://github.com/biometrics/openbr.git 

    $ cd openbr 

    $ git checkout 0.5   官方给出的是错的,此处应为:git checkout master

    $ git submodule init 

    $ git submodule update

  6. Build OpenBR!

    mkdir build # from the OpenBR root directory 

    cd build 

    $ cmake -DCMAKE_PREFIX_PATH=~/Qt/5.4.1/clang_64 -DCMAKE_BUILD_TYPE=Release ..  应为:cmake -DCMAKE_PREFIX_PATH=~/Qt5.4.1/5.4/clang_64 -DCMAKE_BUILD_TYPE=Release  -DBR_EMBEDDED=True -DBR_WITH_STASM4=False ..

    make -j4 

    sudo make install

  7. Hack OpenBR!

    1. Open Qt Creator IDE

      $ open ~/Qt/Qt\ Creator.app   应为:  open ~/Qt5.4.1/Qt\ Creator.app/

    2. From the Qt Creator "File" menu select "Open File or Project...".

    3. Select "openbr/CMakeLists.txt" then "Open".
    4. Browse to your pre-existing build directory "openbr/build" then select "Continue".
    5. Select "Run CMake" then "Done".
    6. You're all set! You can find more information on Qt Creator here if you need it.
  8. (Optional) Test OpenBR!

    $ cd openbr/scripts
    $ ./downloadDatasets.sh
    $ cd ../build
    $ make test
    
  9. (Optional) Package OpenBR!

    $ cd openbr/build
    $ sudo cpack -G TGZ
    
  10. (Optional) Build OpenBR documentation!

Need to remake this step with the new docs!

 

我标红字的地方注意即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值