A hacker's guide to building, editing, and running OpenBR.
Linux
-
Install GCC 4.7.3
$ sudo apt-get update $ sudo apt-get install build-essential -
Install CMake 2.8.10.1
$ sudo apt-get install cmake cmake-curses-gui -
Download OpenCV 2.4.5, note Build OpenCV with video support
$ cd ~/Downloads $ tar -xf opencv-2.4.5.tar.gz $ cd opencv-2.4.5 $ mkdir build $ cd build $ cmake -DCMAKE_BUILD_TYPE=Release .. $ make -j4 $ sudo make install $ cd ../.. $ rm -rf opencv-2.4.5* -
Install Qt 5.0.1
$ sudo apt-get install qt5-default libqt5svg5-dev qtcreator -
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 submodule init $ git submodule update -
Build OpenBR!
$ mkdir build # from the OpenBR root directory $ cd build $ cmake -DCMAKE_BUILD_TYPE=Release .. $ make -j4 $ sudo make install -
Hack 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!
Need to rewrite this step for the new docs!
OSX
-
Download and install the latest "Xcode" and "Command Line Tools" from the Apple Developer Downloads page.
-
$ 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* -
$ cd ~/Downloads $ tar -xf opencv-2.4.6.1.tar.gz $ cd opencv-2.4.6.1 $ mkdir build $ cd build $ cmake -DCMAKE_BUILD_TYPE=Release .. $ make -j4 $ sudo make install $ cd ../.. $ rm -rf opencv-2.4.6.1* -
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 submodule init $ git submodule update -
Build OpenBR!
$ mkdir build # from the OpenBR root directory $ cd build $ cmake -DCMAKE_PREFIX_PATH=~/Qt5.1.1/5.1.1/clang_64 -DCMAKE_BUILD_TYPE=Release .. $ make -j4 $ sudo make install -
Hack OpenBR!
-
Open Qt Creator IDE
$ open ~/Qt5.1.1/Qt\ Creator.app -
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 "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!
Need to remake this step with the new docs!
Windows
-
Download Visual Studio 2012 Express Edition for Windows Desktop and install.
- Consider the free open source program WinCDEmu if you need a program to mount ISO images.
- You will have to register with Microsoft after installation, but it's free.
- Grab any available Visual Studio Updates.
- Download and install Windows 8 SDK.
-
Download and Install CMake 2.8.11.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.6.1" folder to "C:\".
- Open "VS2012 x64 Cross Tools Command Prompt" (from the Start Menu, select "All Programs" -> "Microsoft Visual Studio 2012" -> "Visual Studio Tools" -> "VS2012 x64 Cross Tools Command Prompt") and enter:
$ cd C:\opencv-2.4.6.1 $ mkdir build-msvc2012 $ cd build-msvc2012 $ 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 0.5 $ git submodule init $ git submodule update
- Launch "Git Bash" from the Desktop and clone OpenBR:
-
Build OpenBR!
-
From the VS2012 x64 Cross Tools Command Prompt:
$ cd C:\openbr $ mkdir build-msvc2012 $ cd build-msvc2012 $ cmake -G "CodeBlocks - NMake Makefiles" -DCMAKE_PREFIX_PATH="C:/opencv-2.4.6.1/build-msvc2012/install;C:/Qt/Qt5.1.1/5.1.1/msvc2012_64" -DCMAKE_INSTALL_PREFIX="./install" -DBR_INSTALL_DEPENDENCIES=ON -DCMAKE_BUILD_TYPE=Release .. $ nmake $ nmake install -
Check out the "install" folder.
-
-
Hack OpenBR!
- From the VS2012 x64 Cross Tools Command Prompt: $ C:\Qt\Qt5.1.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 2.8\bin\cmake.exe".
- Browse to your pre-existing build directory "C:\openbr\build-msvc2012" 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 VS2012 x64 Cross Tools Command Prompt: $ cd C:\openbr\build-msvc2012 $ cpack -G ZIP
Raspian
-
Install CMake 2.8.9
$ sudo apt-get install cmake -
Download 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 update -
Install packages
$ sudo apt-get install qt5-default libqt5svg5-dev -
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 submodule init $ git submodule update -
Build 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