GithubHelp home page GithubHelp logo

benlaug / labgen Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 8.0 1.76 MB

Source code of the LaBGen stationary background generation method.

License: GNU General Public License v3.0

CMake 1.58% C++ 96.72% C 1.71%
background-generation background-modeling background-estimation background-extraction background background-reconstruction computer-vision opencv background-initialization

labgen's Introduction

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.

labgen's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

labgen's Issues

Support installation on OSes

A make install target, packages, and installation wizards should be created to install LaBGen on a targeted operating system. The plan is to use CPack.

question

Why do I compile with vs2019, and it always prompts that I can't open the input file labgen.lib, and this file does not exist in the folder.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.