This repository contains a C++ implementation of the ViBe background subtraction algorithm.
The following instructions will help you install the required libraries
- Boost
- OpenCV (only if you want to compile the example programs)
The compilation process has been tested on Linux Mint 17.3 and OS X El Capitan.
To compile the program, go into the 'build' directory and enter the following commands:
cmake -DCMAKE_BUILD_TYPE=Release ..
make
By default, the example programs are compiled. If you want to disable the
compilation of these programs, you must set to 'OFF' the
libvibe++_COMPILE_EXAMPLES
variable in the cache of CMake. As an alternative,
you can use the following commands instead of the previous ones:
cmake -DCMAKE_BUILD_TYPE=Release -Dlibvibe++_COMPILE_EXAMPLES:BOOL=OFF ..
make
Note that on OS X, the program will not compile with clang++ (the default compiler used by CMake). You can for instance use GCC as following (considering that you installed, for example, GCC 5 with MacPorts):
cmake -DCMAKE_CXX_COMPILER=g++-mp-5 -DCMAKE_BUILD_TYPE=Release ..
make
or the Intel compiler:
cmake -DCMAKE_CXX_COMPILER=icpc -DCMAKE_BUILD_TYPE=Release ..
make
To install the libvibe++ onto your system after the compilation step, you can enter the following command (in superuser mode):
make install
or
sudo make install
The files will be installed into '/usr/local'.
To compile a program using the libvibe++, you must use the '-lvibe++' linkage flag.
If you encounter the following error:
error while loading shared libraries: libvibe++.so: cannot open shared object
file: No such file or directory'
check that /usr/local/lib
is in your library path. If it is not, you can add
it temporarily by entering the following command:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
See the AUTHORS file for details.
Custom non-permissive. This work is protected by several patents.
See the LICENSE file for details.