This page has been created in order to distribute a prototype software implementing the Spatially Coherent Self-Organizing Background Subtraction (SC-SOBS) algorithm presented in :
L. Maddalena, A. Petrosino, The SOBS Algorithm: What Are the Limits?, 2012 IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), DOI: 10.1109/CVPRW.2012.6238922, pp.21-26, 16-21 June 2012
Click here to download the Windows
executable (WinZip compressed) together with the needed OpenCV .dll's.
Please, observe that, compared to the previous version, it includes a bug fix (for properly handling also image sequences with "unusual" resolution, e.g., 238x158) and it has a slightly different syntax for specifying the input parameters (see "Usage with generic image sequences").
If you have problems downloading, please contact lucia.maddalena "at" cnr.it; if you use the software, please cite the above mentioned paper.
Basic usage for Change Detection Competition: Unzip the SC-SOBS.exe and the .dll's into the directory holding the "dataset" directory containing the Change Detection Challenge sequences . To obtain all masks for the "baseline/highway" sequence, just type:
Click here to download the masks computed by SC-SOBS for the whole dataset.
Usage with generic image sequences:
SC-SOBS <SeqName> [Parameters]
o <SeqName>: sequence name (complete path), not including frame numbers. Image sequences consist of .jpg image frames with consecutive 6 digit numbers, named in the following form
o [parameters]: optional, including:
-nini #: number of first sequence frame to be considered. Default: 1
-nend #: number of last sequence frame to be considered. Default: toIdx (toIdx read from file ‘temporalROI.txt’ as in )
-n #: (square root of) number of weight vectors for each pixel. Default: 3
-K #: Number of initial frames for training. Default: fromIdx-1 (fromIdx read from file ‘temporalROI.txt’ as in )
-e1 #: Distance threshold e1 for training phase (Eq. (12)). Default: 1.0
-e2 #: Distance threshold e2 for testing phase (Eq. (12)). Default: 0.008
-c1 #: Learning rate c1 for training phase (Eq. (14)). Default: 1.0
-c2 #: Learning rate c2 for testing phase (Eq. (14)). Default: 0.05
-Cw #: Size of the neighbourhood for Spatial Coherence (Eq. (10)). Default: 5
-s #: To apply shadow removal (as in ). Default: 1 (apply)
-g #: Shadow detection value for g in Eq. (5) in . Default: 0.7
-b #: Shadow detection value for b in Eq. (5) in . Default: 1.0
-tS #: Shadow detection value for tS in Eq. (5) in . Default: 0.1
-tH #: Shadow detection value for tH in Eq. (5) in . Default: 10.0
-ROI #: To use ROI.bmp mask as in . Default: 1 (do use)
-Med #: Size of the neighbourhood for Median Filtering Post-Processing (through OpenCV function cvSmooth). Default: 1
-m #: To save background model images. Default: 0 (do not save; only models for frames K-1 and #LastFrame are saved)
-l #: To save only last detection mask. Default 0 (save all in the temporal ROI)
Examples of use with generic image sequences:
Provides the above information on usage.
2) SC-SOBS c:/Sequences/WavingTrees/WavingTrees -nini 1000 -nend 1247 -K 200 -e1 0.1 -e2 0.03 -c1 1.0 -c2 0.05 –l 1 –ROI 0
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 .jpg image files named:
WavingTrees001000.jpg, …, WavingTrees001247.jpg
and stored in directory c:/Sequences/WavingTrees.
This gives the moving object detection mask for last frame (named bin001247.png) as well the background model (named Model001199.ppm) achieved by training on the first 200 frames and the updated background model (named Model001247.ppm) for the last frame.
3) SC-SOBS c:/Sequences/WavingTrees/WavingTrees -nini 1000 –nend 1247 -K 200 -e1 0.1 -e2 0.03 -c1 1.0 -c2 0.05 –l 1 –ROI 0 –Med 0
same as before, but without applying median filtering post-processing.
 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.
 L. Maddalena, A. Petrosino, The SOBS Algorithm: What Are the Limits?, 2012 IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), DOI: 10.1109/CVPRW.2012.6238922, pp.21-26, 16-21 June 2012
Last update: November 5, 2015.