Class cv::cuda::BackgroundSubtractorMOG2#

Gaussian Mixture-based Background/Foreground Segmentation Algorithm. View details

Collaboration diagram for cv::cuda::BackgroundSubtractorMOG2:

Public Member Functions#

Public Member Functions inherited from cv::BackgroundSubtractorMOG2

Return

Name

Description

void

apply(
    InputArray image,
    InputArray knownForegroundMask,
    OutputArray fgmask,
    double learningRate = -1 )

Computes a foreground mask and skips known foreground in evaluation.

void

apply(
    InputArray image,
    OutputArray fgmask,
    double learningRate = -1 )

Computes a foreground mask.

double

getBackgroundRatio()

Returns the “background ratio” parameter of the algorithm.

double

getComplexityReductionThreshold()

Returns the complexity reduction threshold.

bool

getDetectShadows()

Returns the shadow detection flag.

int

getHistory()

Returns the number of last frames that affect the background model.

int

getNMixtures()

Returns the number of gaussian components in the background model.

double

getShadowThreshold()

Returns the shadow threshold.

int

getShadowValue()

Returns the shadow value.

double

getVarInit()

Returns the initial variance of each gaussian component.

double

getVarMax()

double

getVarMin()

double

getVarThreshold()

Returns the variance threshold for the pixel-model match.

double

getVarThresholdGen()

Returns the variance threshold for the pixel-model match used for new mixture component generation.

void

setBackgroundRatio(double ratio)

Sets the “background ratio” parameter of the algorithm.

void

setComplexityReductionThreshold(double ct)

Sets the complexity reduction threshold.

void

setDetectShadows(bool detectShadows)

Enables or disables shadow detection.

void

setHistory(int history)

Sets the number of last frames that affect the background model.

void

setNMixtures(int nmixtures)

Sets the number of gaussian components in the background model.

void

setShadowThreshold(double threshold)

Sets the shadow threshold.

void

setShadowValue(int value)

Sets the shadow value.

void

setVarInit(double varInit)

Sets the initial variance of each gaussian component.

void

setVarMax(double varMax)

void

setVarMin(double varMin)

void

setVarThreshold(double varThreshold)

Sets the variance threshold for the pixel-model match.

void

setVarThresholdGen(double varThresholdGen)

Sets the variance threshold for the pixel-model match used for new mixture component generation.

Public Member Functions inherited from cv::BackgroundSubtractor
Public Member Functions inherited from cv::Algorithm

Return

Name

Description

Algorithm()

~Algorithm()

void

clear()

Clears the algorithm state.

bool

empty()

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.

String

getDefaultName()

void

read(const FileNode & fn)

Reads algorithm parameters from a file storage.

void

save(const String & filename)

void

write(
    const Ptr< FileStorage > & fs,
    const String & name = String() )

void

write(FileStorage & fs)

Stores algorithm parameters in a file storage.

void

write(
    FileStorage & fs,
    const String & name )

Static Public Member Functions#

Static Public Member Functions inherited from cv::Algorithm

Return

Name

Description

static Ptr< _Tp >

load(
    const String & filename,
    const String & objname = String() )

Loads algorithm from the file.

static Ptr< _Tp >

loadFromString(
    const String & strModel,
    const String & objname = String() )

Loads algorithm from a String.

static Ptr< _Tp >

read(const FileNode & fn)

Reads algorithm from the file node.

Additional Inherited Members#

Protected Member Functions inherited from cv::Algorithm

Return

Name

Description

void

writeFormat(FileStorage & fs)

Detailed Description#

Gaussian Mixture-based Background/Foreground Segmentation Algorithm.

The class discriminates between foreground and background pixels by building and maintaining a model of the background. Any pixel which does not fit this model is then deemed to be foreground. The class implements algorithm described in Zivkovic2004 .

Member Function Documentation#

apply()#

void cv::cuda::BackgroundSubtractorMOG2::apply(
InputArray image,
InputArray knownForegroundMask,
OutputArray fgmask,
double learningRate,
Stream & stream )

apply()#

void cv::cuda::BackgroundSubtractorMOG2::apply(
InputArray image,
OutputArray fgmask,
double learningRate,
Stream & stream )

getBackgroundImage()#

void cv::cuda::BackgroundSubtractorMOG2::getBackgroundImage(
GpuMat & backgroundImage,
Stream & stream )

getBackgroundImage()#

void cv::cuda::BackgroundSubtractorMOG2::getBackgroundImage(
OutputArray backgroundImage,
Stream & stream )

Source file#

The documentation for this class was generated from the following file: