Background Subtraction Program
by Computer Vision Lab at University of Maryland
There may be unexpected error messages you got while running the program. Please let me know those through e-mail at knkim at cs.umd.edu. That would be of much help to me. Thanks. (Oct. 27, 2003)
If you don't have a live camera working on your computer, you may get several DirectShow warning messages while running the program. (Oct. 27, 2003).
This background subtraction (BGS) program processes input video data captured from a static single camera to generate foreground/background binary image outputs. Inputs can be live video (from any camera accepted by DirectShow, i.e., IEEE1394, USB camera, etc) , video files (*.avi, *.mpg, etc), or a sequence of image files (*.bmp, *.jpg, *.gif, *.ppm) . Our codebook BGS algorithm adopts a quantization/clustering technique to construct a background model from long observation sequences. For each pixel, it builds a codebook consisting of one or more codewords. Samples at each pixel are clustered into the set of codewords based on a color distortion metric together with a brightness ratio. Not all pixels have the same number of codewords. The clusters represented by codewords do not necessarily correspond to single Gaussian or other parametric distribution. Even if the distribution at a pixel were a single normal, there could be several codewords for that pixel. The background is encoded on a pixel by pixel basis. Thus a pixel is represented by a codebook which consists of one or multiple codewords. Our algorithm has the following characteristics:
This is the main window of the program. 'Files - Train - Detect' buttons can be used for a sequence of image files. 'Live-Video-Capture-Train-Detect' buttons can be used for live video or video files.
These four sub-windows represent (1) Input Image, (2) Detection Image, (3) Binary Map, and (4) Foreground Blobs respectively.
When you click 'Setting' button, you can see this dialog window. All parameters can be adjusted here. If you are not sure, just use the default values given initially.
Name Contributions * Kyungnam Kim knkim at cs.umd.edu He developed the current version of the BGS program and is maintaining the source codes and the program. Thanarat Horprasert thanarat at umiacs.umd.edu started the project and developed the early version. Kyongil Yoon kiyoon at cs.umd.edu implemented the DirectShow part using video processing application wizard
* contact person
Download Files Description DirectShow Version This version is what is described here at the web page. No manual but you can refer to the manual in the research version below. Just copy these files onto any directory and run UMD-BGS.exe. Two DLL files are required because it uses Microsoft VisSDK library 1.2. Research Version Executable-withManual.zip This version is not covered in this web page, but its algorithm used is almost identical to that of DirectShow version. If you are ok to process image sequences (not video files or live videos), this version may also be good for you. There is a manual you can refer to. Sometimes, this version seems to be more robust.
If you want to use the program for your research, please put this citation information on your publication. Thanks.
T. H. Chalidabhongse, D. Harwood and L. Davis,
Foreground-Background Segmentation using Codebook Model",
Volume 11, Issue 3, Pages 167-256 (June 2005)
The programs can be used as a pre-processing step in many visual surveillance projects.