Moving Object Detection Laboratory, ICAR-CNR

Moving Object Detection Software: SOBS

This page has been created in order to distribute a prototype software implementing the Self-Organizing Background Subtraction (SOBS) algorithm presented in

L. Maddalena, A. Petrosino, A Self-Organizing Approach to Background Subtraction for Visual Surveillance Applications, IEEE Transactions on Image Processing, DOI: 10.1109/TIP.2008.924285, Vol. 17, no. 7, pagg. 1168-1177, July 2008

Click here to download the Windows executable (WinRar compressed). If you have problems downloading, please contact lucia.maddalena "at"; if you use the software, please cite the above mentioned paper.


SOBS <SeqName> <#FirstFrame> <#LastFrame> [Parameters]


o       <SeqName>: sequence name (complete path), not including frame numbers. Image sequences consist of  binary PPM image frames with consecutive numbers, named in the following form


The number of digits for <number> must be the same for all sequence frames (e.g. a sequence with 120 frames must be numbered from 1001 to 1120, and not from 1 to 120)

o       <#FirstFrame>,  <#LastFrame>: number of first and last sequence frame to be considered.

o       [parameters]:  optional, including:

  -n #:   (square root of) number of weight vectors for each pixel. Default 3

  -K #: Number of initial frames for calibration. Default 200

  -e1 #: Distance threshold e1 for calibration phase (eqn. (2)). Default 0.1

  -e2 #: Distance threshold e2 for online phase (eqn. (2)). Default 0.03

  -c1 #: Learning rate c1 for calibration phase (eqn. (4)). Default 1.0

  -c2 #: Learning rate c2 for online phase (eqn. (4)). Default 0.05

  -g #:   Value for g in eqn. (5). Default 0.7

  -b #:   Value for b in eqn. (5). Default 1.0

  -tS #:             Value for tS in eqn. (5). Default 0.1

  -tH #: Value for tH in eqn. (5). Default 10.0

  -s:      To apply shadow removal. Default: no shadow removal

  -m:     To save background model images. Default: do not save

  -l:       To save just last detection mask. Default: save all


Example of use:

SOBS c:/Sequences/WavingTrees/WavingTrees 1000 1247 -n 3 -e1 0.1 -e2 0.03 -K 200 -c1 1.0 -c2 0.05 –l

where sequence WavingTrees, coming from sequences adopted in K. Toyama, J. Krumm, B. Brumitt, and B. Meyers, “Wallflower: principles and practice of background maintenance,” in Proc. 7th IEEE Conf. Computer Vision, 1999, vol. 1, pp. 255–261, has been saved in binary PPM image files named:

WavingTrees.1000.ppm, …, WavingTrees.1247.ppm

and stored in directory c:/Sequences/WavingTrees.

Last update: March 5, 2009.