The OpenCV Video Surveillance Module

Unofficial Documentation

This is an attempt to document the OpenCV Video Surveillance Module.

The module consists of multiple layers and modules.

An article describing the complete system can be found here:

Foreground / Background Segmentation

The implementation supports 3 algorithms:

  1. CV_BG_MODEL_FGD

  2. CV_BG_MODEL_FGD_SIMPLE

  3. CV_BG_MODEL_MOG

CV_BG_MODEL_FGD[_SIMPLE]

1 and 2, are apparently related. This is an implementation of Liyuan Li, Weimin Huang, Irene Y.H. Gu, and Qi Tian.Foreground Object Detection from Videos Containing Complex Background. ACM MM2003 Paper ishere. If you know of a free link, please update this link/page.

Internally(in cvbgfg_acmmm2003.cpp) it uses another algorithm for change detection: P.Rosin, Thresholding for Change Detection, ICCV, 1998, available here (pdf).

Parameters for this module are give in the CvFGDStatModelParams struct:

typedef struct CvFGDStatModelParams
{
    int           Lc, N1c, N2c, Lcc, N1cc, N2cc, is_obj_without_holes, perform_morphing;
    float         alpha1, alpha2, alpha3, delta, T, minArea;
}
CvFGDStatModelParams; 

This is initialized with the defaults:

/* default paremeters of foreground detection algorithm */
#define  CV_BGFG_FGD_LC              128
#define  CV_BGFG_FGD_N1C             15
#define  CV_BGFG_FGD_N2C             25

#define  CV_BGFG_FGD_LCC             64
#define  CV_BGFG_FGD_N1CC            25
#define  CV_BGFG_FGD_N2CC            40

/* BG reference image update parameter */
#define  CV_BGFG_FGD_ALPHA_1         0.1f

/* stat model update parameter
   0.002f ~ 1K frame(~45sec), 0.005 ~ 18sec (if 25fps and absolutely static BG) */
#define  CV_BGFG_FGD_ALPHA_2         0.005f

/* start value for alpha parameter (to fast initiate statistic model) */
#define  CV_BGFG_FGD_ALPHA_3         0.1f

#define  CV_BGFG_FGD_DELTA           2

#define  CV_BGFG_FGD_T               0.9f

#define  CV_BGFG_FGD_MINAREA         15.f

#define  CV_BGFG_FGD_BG_UPDATE_TRESH 0.5f

If we want to update alpha2, the paper explains:

CV_BG_MODEL_MOG

This is an implementation of the Mixture of Gaussians paper: P. KadewTraKuPong and R. Bowden,An improved adaptive background mixture model for real-time tracking with shadow detection, in Proc. 2nd European Workshp on Advanced Video-Based Surveillance Systems, 2001. It can be foundhere (pdf)(citeceer).

just a comment

Due to the complexity of the process and lack of documentation, the following link may be quite helpful in understanding all the necessary steps. http://www.merl.com/papers/docs/TR2003-36.pdf

Example

VideoSurveillance (last edited 2007-09-14 17:01:49 by FrancoisCauwe)

SourceForge.net Logo