Skip to content
forked from benlaug/labgen

Source code of the LaBGen stationary background generation method.

License

Notifications You must be signed in to change notification settings

KandaIsMe/labgen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LaBGen

OpenCV Version Build Status

LaBGen is a patch-based stationary background generation method that was introduced in [2] and extensively described in [1]. The purpose of this repository is twofold:

  1. To share the source code of the method.
  2. To embed the method in a ready-to-use program.

Graphical Abstract

Our method won an award and has been ranked first during the IEEE Scene Background Modeling Contest (SBMC) 2016, and on the SBI dataset [4] according to three metrics over six. The current ranking and the quantitative metrics computed on the SBMnet dataset are available here.

Award

Here is a video showing some backgrounds estimated by LaBGen (click on the image below to play it):

Demonstration of LaBGen

Compiling the program

The program implementing the method has been developed in C++11 and is distributed under the GPLv3 license. In order to compile it, you need a modern C++ compiler, a copy of the Boost library, a copy of the OpenCV library, and the CMake build automation tool. On UNIX-like environments, the program can be compiled as follows, considering that your terminal is in the source code directory:

$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make

Running the program

Once the program has been compiled, the following command gives the complete list of available options:

$ ./LaBGen-cli --help

As an example, the IBMtest2 sequence of the SBI dataset [4] can be processed with the default set of parameters as follows:

$ ./LaBGen-cli -i path_to_IBMtest2/IBMtest2_%6d.png -o my_output_path -d -v

Screenshot

A full documentation of the options of the program is available on the wiki.

Citation

If you use LaBGen in your work, please cite papers [1] and [2] as below:

@article{Laugraud2017LaBGen,
  title = {{LaBGen}: A method based on motion detection for generating the background of a scene},
  author = {B. Laugraud and S. Pi{\'e}rard and M. {Van Droogenbroeck}},
  journal = {Pattern Recognition Letters},
  publisher = {Elsevier},
  volume = {96},
  pages = {12-21},
  year = {2017},
  doi = {10.1016/j.patrec.2016.11.022}
}

@inproceedings{Laugraud2015Simple,
  title = {Simple median-based method for stationary background generation using background subtraction algorithms},
  author = {B. Laugraud and S. Pi{\'e}rard and M. Braham and M. {Van Droogenbroeck}},
  booktitle = {International Conference on Image Analysis and Processing (ICIAP), Workshop on Scene Background Modeling and Initialization (SBMI)},
  publisher = {Springer},
  series = {Lecture Notes in Computer Science},
  volume = {9281},
  pages = {477-484},
  year = {2015},
  month = {September},
  address = {Genova, Italy},
  doi = {10.1007/978-3-319-23222-5_58}
}

Alternatives

  • A variant, called LaBGen-OF, and leverages optical flow algorithms for motion detection.
  • A pixel-level variant of LaBGen, called LaBGen-P.

Testing

Each commited revision is automatically tested using Travis CI on:

  • Ubuntu 14.04 with the g++ compiler and OpenCV 2.3 installed from the Ubuntu repositories.
  • Ubuntu 14.04 with the g++ compiler and OpenCV 3.2 compiled from the sources.
  • OS X El Capitan with the clang++ compiler and OpenCV 2.4 installed with Homebrew.
  • OS X El Capitan with the clang++ compiler and OpenCV 3.2 installed with Homebrew.

Acknowledgments

This program incorporates some parts of the BGSLibrary [3]. We are very grateful to Andrews Sobral for sharing his library.

References

[1] B. Laugraud, S. Piérard, and M. Van Droogenbroeck. LaBGen: A method based on motion detection for generating the background of a scene. Pattern Recognition Letters, 96:12-21, 2017.

[2] B. Laugraud, S. Piérard, M. Braham, M. Van Droogenbroeck. Simple median-based method for stationary background generation using background subtraction algorithms. International Conference on Image Analysis and Processing (ICIAP), Workshop on Scene Background Modeling and Initialization (SBMI), 9281:477-484, 2015.

[3] A. Sobral. BGSLibrary: An OpenCV C++ Background Subtraction Library. Workshop de Visao Computacional (WVC), 2013.

[4] L. Maddalena, A. Petrosino. Towards Benchmarking Scene Background Initialization. International Conference on Image Analysis and Processing Workshops (ICIAP Workshops), 9281:469-476, 2015.

About

Source code of the LaBGen stationary background generation method.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.7%
  • C 1.7%
  • CMake 1.6%