A hacker's guide to building, editing, and running OpenBR.
Linux
Install GCC 4.9.2
$ sudo apt-get update $ sudo apt-get install build-essentialInstall CMake 3.0.2
$ sudo apt-get install cmake cmake-curses-guiDownload OpenCV 2.4.11, note Build OpenCV with video support
$ 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*Install Qt 5.4.1
$ sudo apt-get install qt5-default libqt5svg5-dev qtcreatorCreate a GitHub account, follow their instructions for setting up Git.
$ git clone https://github.com/biometrics/openbr.git $ cd openbr $ git checkout v1.1.0 $ git submodule init $ git submodule updateBuild OpenBR!
$ mkdir build # from the OpenBR root directory $ cd build $ cmake -DCMAKE_BUILD_TYPE=Release .. $ make -j4 $ sudo make installHack OpenBR!
Open Qt Creator IDE
$ qtcreator &
From the Qt Creator "File" menu select "Open File or Project...".
Select "openbr/CMakeLists.txt" then "Open".
Browse to your pre-existing build directory "openbr/build" then select "Next".
Select "Run CMake" then "Finish".
You're all set! You can find more information on Qt Creator here if you need it.
(Optional) Test OpenBR!
$ cd openbr/scripts $ ./downloadDatasets.sh $ cd ../build $ make test(Optional) Package OpenBR!
$ cd openbr/build $ sudo cpack -G TGZ(Optional) Build OpenBR documentation!
Build the docs
$ pip install mkdocs $ cd openbr/docs $ sh build_docs.sh $ mkdocs serveNavigate to
http://127.0.0.1:8000in your browser to view the docs.
OSX
Download and install the latest "XCode" and "Command Line Tools" from the Apple Developer Downloads page.
-
$ cd ~/Downloads $ tar -xf cmake-3.0.2.tar.gz $ cd cmake-3.0.2 $ ./configure $ make -j4 $ sudo make install $ cd .. $ rm -rf cmake-3.0.2* -
$ 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* Create a GitHub account, follow their instructions for setting up Git.
$ git clone https://github.com/biometrics/openbr.git $ cd openbr $ git checkout v1.1.0 $ git submodule init $ git submodule updateBuild OpenBR!
$ mkdir build # from the OpenBR root directory $ cd build $ cmake -DCMAKE_PREFIX_PATH=~/Qt/5.4.1/clang_64 -DCMAKE_BUILD_TYPE=Release .. $ make -j4 $ sudo make installHack OpenBR!
Open Qt Creator IDE
$ open ~/Qt/Qt\ Creator.appFrom the Qt Creator "File" menu select "Open File or Project...".
Select "openbr/CMakeLists.txt" then "Open".
Browse to your pre-existing build directory "openbr/build" then select "Continue".
Select "Run CMake" then "Done".
You're all set! You can find more information on Qt Creator here if you need it.
(Optional) Test OpenBR!
$ cd openbr/scripts $ ./downloadDatasets.sh $ cd ../build $ make test(Optional) Package OpenBR!
$ cd openbr/build $ sudo cpack -G TGZ(Optional) Build OpenBR documentation!
Build the docs
$ pip install mkdocs $ cd openbr/docs $ sh build_docs.sh $ mkdocs serveNavigate to
http://127.0.0.1:8000in your browser to view the docs.
Windows
Download Visual Studio Express 2013 for Windows Desktop and install. You will have to register with Microsoft, but it's free.
Download and Install CMake 3.0.2
- During installation setup select "Add CMake to PATH".
-
- Consider the free open source program 7-Zip if you need a program to unarchive tarballs.
- Move the "opencv-2.4.11" folder to "C:\".
Open "VS2013 x64 Cross Tools Command Prompt" (from the Start Menu, select "All Programs" -> "Microsoft Visual Studio 2013" -> "Visual Studio Tools" -> "VS2013 x64 Cross Tools Command Prompt") and enter:
$ cd C:\opencv-2.4.11 $ mkdir build-msvc2013 $ cd build-msvc2013 $ 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
Create a GitHub account and follow their instructions for setting up Git.
Launch "Git Bash" from the Desktop and clone OpenBR:
$ cd /c $ git clone https://github.com/biometrics/openbr.git $ cd openbr $ git checkout v1.1.0 $ git submodule init $ git submodule update
Build OpenBR!
From the VS2013 x64 Cross Tools Command Prompt:
$ cd C:\openbr $ mkdir build-msvc2013 $ cd build-msvc2013 $ cmake -G "CodeBlocks - NMake Makefiles" -DCMAKE_PREFIX_PATH="C:/opencv-2.4.11/build/install;C:/Qt/Qt5.4.1/5.4/msvc2013_64" -DCMAKE_INSTALL_PREFIX="./install" -DBR_INSTALL_DEPENDENCIES=ON -DCMAKE_BUILD_TYPE=Release .. $ nmake $ nmake installCheck out the "install" folder.
Hack OpenBR!
- From the VS2013 x64 Cross Tools Command Prompt: $ C:\Qt\Qt5.4.1\Tools\QtCreator\bin\qtcreator.exe
- From the Qt Creator "Tools" menu select "Options..."
- Under "Kits" select "Desktop (default)"
- For "Compiler:" select "Microsoft Visual C++ Compiler 11.0 (x86_amd64)" and click "OK"
- From the Qt Creator "File" menu select "Open File or Project...".
- Select "C:\openbr\CMakeLists.txt" then "Open".
- If prompted for the location of CMake, enter "C:\Program Files (x86)\CMake 3.0.2\bin\cmake.exe".
- Browse to your pre-existing build directory "C:\openbr\build-msvc2013" then select "Next".
- Select "Run CMake" then "Finish".
- You're all set! You can find more information on Qt Creator here if you need.
(Optional) Package OpenBR!
- From the VS2013 x64 Cross Tools Command Prompt: $ cd C:\openbr\build-msvc2013 $ cpack -G ZIP
Raspbian
Install CMake 2.8.9
$ sudo apt-get install cmakeDownload OpenCV 2.4.9
$ wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip $ unzip opencv-2.4.9.zip $ cd opencv-2.4.9 $ mkdir build $ cd build $ cmake -DCMAKE_BUILD_TYPE=Release .. $ make $ sudo make install $ cd ../.. $ rm -rf opencv-2.4.9*Install Qt5
Modify source list
$ nano /etc/apt/sources.listby changing:
$ deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpito:
$ deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
Update apt-get
$ sudo apt-get updateInstall packages
$ sudo apt-get install qt5-default libqt5svg5-devCreate a GitHub account, follow their instructions for setting up Git.
$ git clone https://github.com/biometrics/openbr.git $ cd openbr $ git checkout v1.1.0 $ git submodule init $ git submodule updateBuild OpenBR!
$ mkdir build # from the OpenBR root directory $ cd build $ cmake -DCMAKE_BUILD_TYPE=Release .. $ make $ sudo make install(Optional) Test OpenBR!
$ cd openbr/scripts $ ./downloadDatasets.sh $ cd ../build $ make test