# /usr/obj/OpenCV-2.2.0/OpenCV-2.2.0/modules/video/include/opencv2/video/background_segm.hpp File Reference

Go to the source code of this file.

## Classes

class | cv::BackgroundSubtractor
class | cv::BackgroundSubtractorMOG
struct | CvBGCodeBookElem
struct | CvBGCodeBookModel
struct | CvBGPixelCCStatTable
struct | CvBGPixelCStatTable
struct | CvBGPixelStat
struct | CvBGStatModel
struct | CvFGDStatModel
struct | CvFGDStatModelParams
struct | CvGaussBGModel
struct | CvGaussBGPoint
struct | CvGaussBGStatModelParams
struct | CvGaussBGValues

## Namespaces

namespace | cv

## Defines

#define | CV_BG_MODEL_FGD 0
#define | CV_BG_MODEL_FGD_SIMPLE 2
#define | CV_BG_MODEL_MOG 1
#define | CV_BG_STAT_MODEL_FIELDS()
#define | CV_BGFG_FGD_ALPHA_1 0.1f
#define | CV_BGFG_FGD_ALPHA_2 0.005f
#define | CV_BGFG_FGD_ALPHA_3 0.1f
#define | CV_BGFG_FGD_BG_UPDATE_TRESH 0.5f
#define | CV_BGFG_FGD_DELTA 2
#define | CV_BGFG_FGD_LC 128
#define | CV_BGFG_FGD_LCC 64
#define | CV_BGFG_FGD_MINAREA 15.f
#define | CV_BGFG_FGD_N1C 15
#define | CV_BGFG_FGD_N1CC 25
#define | CV_BGFG_FGD_N2C 25
#define | CV_BGFG_FGD_N2CC 40
#define | CV_BGFG_FGD_T 0.9f
#define | CV_BGFG_MOG_BACKGROUND_THRESHOLD 0.7
#define | CV_BGFG_MOG_MAX_NGAUSSIANS 500
#define | CV_BGFG_MOG_MINAREA 15.f
#define | CV_BGFG_MOG_NCOLORS 3
#define | CV_BGFG_MOG_NGAUSSIANS 5
#define | CV_BGFG_MOG_SIGMA_INIT 30
#define | CV_BGFG_MOG_STD_THRESHOLD 2.5
#define | CV_BGFG_MOG_WEIGHT_INIT 0.05
#define | CV_BGFG_MOG_WINDOW_SIZE 200

## Typedefs

typedef struct CvBGCodeBookElem | CvBGCodeBookElem
typedef struct CvBGCodeBookModel | CvBGCodeBookModel
typedef struct CvBGPixelCCStatTable | CvBGPixelCCStatTable
typedef struct CvBGPixelCStatTable | CvBGPixelCStatTable
typedef struct CvBGPixelStat | CvBGPixelStat
typedef struct CvBGStatModel | CvBGStatModel
typedef struct CvFGDStatModel | CvFGDStatModel
typedef struct CvFGDStatModelParams | CvFGDStatModelParams
typedef struct CvGaussBGModel | CvGaussBGModel
typedef struct CvGaussBGPoint | CvGaussBGPoint
typedef struct CvGaussBGStatModelParams | CvGaussBGStatModelParams
typedef struct CvGaussBGValues | CvGaussBGValues
typedef int(CV_CDECL * | CvUpdateBGStatModel )(IplImage *curr_frame, struct CvBGStatModel *bg_model, double learningRate)

## Functions

void | cvBGCodeBookClearStale (CvBGCodeBookModel *model, int staleThresh, CvRect roi CV_DEFAULT(cvRect(0, 0, 0, 0)), const CvArr *mask CV_DEFAULT(0))
int | cvBGCodeBookDiff (const CvBGCodeBookModel *model, const CvArr *image, CvArr *fgmask, CvRect roi CV_DEFAULT(cvRect(0, 0, 0, 0)))
void | cvBGCodeBookUpdate (CvBGCodeBookModel *model, const CvArr *image, CvRect roi CV_DEFAULT(cvRect(0, 0, 0, 0)), const CvArr *mask CV_DEFAULT(0))
int | cvChangeDetection (IplImage *prev_frame, IplImage *curr_frame, IplImage *change_mask)
CvBGCodeBookModel * | cvCreateBGCodeBookModel ()
CvBGStatModel * | cvCreateFGDStatModel (IplImage *first_frame, CvFGDStatModelParams *parameters CV_DEFAULT(NULL))
CvBGStatModel * | cvCreateGaussianBGModel (IplImage *first_frame, CvGaussBGStatModelParams *parameters CV_DEFAULT(NULL))
void | cvRefineForegroundMaskBySegm (CvSeq *segments, CvBGStatModel *bg_model)
void | cvReleaseBGCodeBookModel (CvBGCodeBookModel **model)
void | cvReleaseBGStatModel (CvBGStatModel **bg_model)
CvSeq * | cvSegmentFGMask (CvArr *fgmask, int poly1Hull0 CV_DEFAULT(1), float perimScale CV_DEFAULT(4.f), CvMemStorage *storage CV_DEFAULT(0), CvPoint offset CV_DEFAULT(cvPoint(0, 0)))
int | cvUpdateBGStatModel (IplImage *current_frame, CvBGStatModel *bg_model, double learningRate CV_DEFAULT(-1))
typedef | void (CV_CDECL *CvReleaseBGStatModel)(struct CvBGStatModel **bg_model)

## Define Documentation

#define CV_BG_MODEL_FGD 0

#define CV_BG_MODEL_FGD_SIMPLE 2

#define CV_BG_MODEL_MOG 1

#define CV_BG_STAT_MODEL_FIELDS | ( | ) |

Value:

    int             type; /*type of BG model*/                                      \
        CvReleaseBGStatModel release;                                                   \
        CvUpdateBGStatModel update;                                                     \
        IplImage*       background;   /*8UC3 reference background image*/               \
        IplImage*       foreground;   /*8UC1 foreground image*/                         \
        IplImage**      layers;       /*8UC3 reference background image, can be null */ \
        int             layer_count;  /* can be zero */                                 \
        CvMemStorage*   storage;      /*storage for foreground_regions*/                \
        CvSeq*          foreground_regions

#define CV_BGFG_FGD_ALPHA_1 0.1f

#define CV_BGFG_FGD_ALPHA_2 0.005f

#define CV_BGFG_FGD_ALPHA_3 0.1f

#define CV_BGFG_FGD_BG_UPDATE_TRESH 0.5f

#define CV_BGFG_FGD_DELTA 2

#define CV_BGFG_FGD_LC 128

#define CV_BGFG_FGD_LCC 64

#define CV_BGFG_FGD_MINAREA 15.f

#define CV_BGFG_FGD_N1C 15

#define CV_BGFG_FGD_N1CC 25

#define CV_BGFG_FGD_N2C 25

#define CV_BGFG_FGD_N2CC 40

#define CV_BGFG_FGD_T 0.9f

#define CV_BGFG_MOG_BACKGROUND_THRESHOLD 0.7

#define CV_BGFG_MOG_MAX_NGAUSSIANS 500

#define CV_BGFG_MOG_MINAREA 15.f

#define CV_BGFG_MOG_NCOLORS 3

#define CV_BGFG_MOG_NGAUSSIANS 5

#define CV_BGFG_MOG_SIGMA_INIT 30

#define CV_BGFG_MOG_STD_THRESHOLD 2.5

#define CV_BGFG_MOG_WEIGHT_INIT 0.05

#define CV_BGFG_MOG_WINDOW_SIZE 200

## Typedef Documentation

typedef struct CvBGCodeBookElem CvBGCodeBookElem

typedef struct CvBGCodeBookModel CvBGCodeBookModel

typedef struct CvBGPixelCCStatTable CvBGPixelCCStatTable

typedef struct CvBGPixelCStatTable CvBGPixelCStatTable

typedef struct CvBGPixelStat CvBGPixelStat

typedef struct CvBGStatModel CvBGStatModel

typedef struct CvFGDStatModel CvFGDStatModel

typedef struct CvFGDStatModelParams CvFGDStatModelParams

typedef struct CvGaussBGModel CvGaussBGModel

typedef struct CvGaussBGPoint CvGaussBGPoint

typedef struct CvGaussBGStatModelParams CvGaussBGStatModelParams

typedef struct CvGaussBGValues CvGaussBGValues

typedef int(CV_CDECL * CvUpdateBGStatModel)(IplImage *curr_frame, struct CvBGStatModel *bg_model, double learningRate)

## Function Documentation

void cvBGCodeBookClearStale | ( | CvBGCodeBookModel * | model,
|  | int | staleThresh,
|  | CvRect roi | CV_DEFAULTcvRect(0, 0, 0, 0),
|  | const CvArr *mask | CV_DEFAULT0
| ) |  |

int cvBGCodeBookDiff | ( | const CvBGCodeBookModel * | model,
|  | const CvArr * | image,
|  | CvArr * | fgmask,
|  | CvRect roi | CV_DEFAULTcvRect(0, 0, 0, 0)
| ) |  |

void cvBGCodeBookUpdate | ( | CvBGCodeBookModel * | model,
|  | const CvArr * | image,
|  | CvRect roi | CV_DEFAULTcvRect(0, 0, 0, 0),
|  | const CvArr *mask | CV_DEFAULT0
| ) |  |

int cvChangeDetection | ( | IplImage * | prev_frame,
|  | IplImage * | curr_frame,
|  | IplImage * | change_mask
| ) |  |

CvBGCodeBookModel* cvCreateBGCodeBookModel | ( | ) |

CvBGStatModel* cvCreateFGDStatModel | ( | IplImage * | first_frame,
|  | CvFGDStatModelParams *parameters | CV_DEFAULTNULL
| ) |  |

CvBGStatModel* cvCreateGaussianBGModel | ( | IplImage * | first_frame,
|  | CvGaussBGStatModelParams *parameters | CV_DEFAULTNULL
| ) |  |

void cvRefineForegroundMaskBySegm | ( | CvSeq * | segments,
|  | CvBGStatModel * | bg_model
| ) |  |

void cvReleaseBGCodeBookModel | ( | CvBGCodeBookModel ** | model ) |

void cvReleaseBGStatModel | ( | CvBGStatModel ** | bg_model ) |

CvSeq* cvSegmentFGMask | ( | CvArr * | fgmask,
|  | int poly1Hull0 | CV_DEFAULT1,
|  | float perimScale | CV_DEFAULT4.f,
|  | CvMemStorage *storage | CV_DEFAULT0,
|  | CvPoint offset | CV_DEFAULTcvPoint(0, 0)
| ) |  |

int cvUpdateBGStatModel | ( | IplImage * | current_frame,
|  | CvBGStatModel * | bg_model,
|  | double learningRate | CV_DEFAULT-1
| ) |  |

typedef void | ( | CV_CDECL * | CvReleaseBGStatModel ) |

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines