Class cv::bgsegm::BackgroundSubtractorMOG#
Gaussian Mixture-based Background/Foreground Segmentation Algorithm. View details
#include <opencv2/bgsegm.hpp>Collaboration diagram for cv::bgsegm::BackgroundSubtractorMOG:
Public Member Functions#
Public Member Functions inherited from cv::BackgroundSubtractor
Return |
Name |
Description |
|---|---|---|
|
Computes a foreground mask with known foreground mask input. |
|
|
|
Computes a foreground mask. |
|
Computes a background image. |
Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Clears the algorithm state. |
|
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
|
|
|
Stores algorithm parameters in a file storage. |
|
|
Static Public Member Functions#
Static Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
|
Loads algorithm from the file. |
|
|
Loads algorithm from a String. |
|
Reads algorithm from the file node. |
Additional Inherited Members#
Protected Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Detailed Description#
Gaussian Mixture-based Background/Foreground Segmentation Algorithm.
The class implements the algorithm described in KB2001 .
Member Function Documentation#
apply()#
void cv::bgsegm::BackgroundSubtractorMOG::apply(
InputArray image,
InputArray knownForegroundMask,
OutputArray fgmask,
double learningRate = -1 )
Computes a foreground mask and skips known foreground in evaluation.
Parameters
image— Next video frame of type CV_8UC(n),CV_8SC(n),CV_16UC(n),CV_16SC(n),CV_32SC(n),CV_32FC(n),CV_64FC(n), where n is 1,2,3,4.fgmask— The output foreground mask as an 8-bit binary image.knownForegroundMask— The mask for inputting already known foreground, allows model to ignore learning known pixels.learningRate— The value between 0 and 1 that indicates how fast the background model is learnt. Negative parameter value makes the algorithm to use some automatically chosen learning rate. 0 means that the background model is not updated at all, 1 means that the background model is completely reinitialized from the last frame.
apply()#
void cv::bgsegm::BackgroundSubtractorMOG::apply(
InputArray image,
OutputArray fgmask,
double learningRate = -1 )
Computes a foreground mask.
Parameters
image— Next video frame of type CV_8UC(n),CV_8SC(n),CV_16UC(n),CV_16SC(n),CV_32SC(n),CV_32FC(n),CV_64FC(n), where n is 1,2,3,4.fgmask— The output foreground mask as an 8-bit binary image.learningRate— The value between 0 and 1 that indicates how fast the background model is learnt. Negative parameter value makes the algorithm to use some automatically chosen learning rate. 0 means that the background model is not updated at all, 1 means that the background model is completely reinitialized from the last frame.
getBackgroundRatio()#
double cv::bgsegm::BackgroundSubtractorMOG::getBackgroundRatio()
getHistory()#
int cv::bgsegm::BackgroundSubtractorMOG::getHistory()
getNMixtures()#
int cv::bgsegm::BackgroundSubtractorMOG::getNMixtures()
getNoiseSigma()#
double cv::bgsegm::BackgroundSubtractorMOG::getNoiseSigma()
setBackgroundRatio()#
void cv::bgsegm::BackgroundSubtractorMOG::setBackgroundRatio(double backgroundRatio)
setHistory()#
void cv::bgsegm::BackgroundSubtractorMOG::setHistory(int nframes)
setNMixtures()#
void cv::bgsegm::BackgroundSubtractorMOG::setNMixtures(int nmix)
setNoiseSigma()#
void cv::bgsegm::BackgroundSubtractorMOG::setNoiseSigma(double noiseSigma)
Source file#
The documentation for this class was generated from the following file:
opencv2/bgsegm.hpp