Gaussian Mixture-based Background/Foreground Segmentation Algorithm.
More...
#include <opencv2/bgsegm.hpp>
Gaussian Mixture-based Background/Foreground Segmentation Algorithm.
The class implements the algorithm described in [141] .
◆ apply() [1/2]
Python: |
---|
| cv.bgsegm.BackgroundSubtractorMOG.apply( | image[, fgmask[, learningRate]] | ) -> | fgmask |
| cv.bgsegm.BackgroundSubtractorMOG.apply( | image, knownForegroundMask[, fgmask[, learningRate]] | ) -> | fgmask |
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. |
Implements cv::BackgroundSubtractor.
◆ apply() [2/2]
virtual void cv::bgsegm::BackgroundSubtractorMOG::apply |
( |
InputArray | image, |
|
|
OutputArray | fgmask, |
|
|
double | learningRate = -1 ) |
|
pure virtual |
Python: |
---|
| cv.bgsegm.BackgroundSubtractorMOG.apply( | image[, fgmask[, learningRate]] | ) -> | fgmask |
| cv.bgsegm.BackgroundSubtractorMOG.apply( | image, knownForegroundMask[, fgmask[, learningRate]] | ) -> | fgmask |
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. |
Implements cv::BackgroundSubtractor.
◆ getBackgroundRatio()
virtual double cv::bgsegm::BackgroundSubtractorMOG::getBackgroundRatio |
( |
| ) |
const |
|
pure virtual |
Python: |
---|
| cv.bgsegm.BackgroundSubtractorMOG.getBackgroundRatio( | | ) -> | retval |
◆ getHistory()
virtual int cv::bgsegm::BackgroundSubtractorMOG::getHistory |
( |
| ) |
const |
|
pure virtual |
Python: |
---|
| cv.bgsegm.BackgroundSubtractorMOG.getHistory( | | ) -> | retval |
◆ getNMixtures()
virtual int cv::bgsegm::BackgroundSubtractorMOG::getNMixtures |
( |
| ) |
const |
|
pure virtual |
Python: |
---|
| cv.bgsegm.BackgroundSubtractorMOG.getNMixtures( | | ) -> | retval |
◆ getNoiseSigma()
virtual double cv::bgsegm::BackgroundSubtractorMOG::getNoiseSigma |
( |
| ) |
const |
|
pure virtual |
Python: |
---|
| cv.bgsegm.BackgroundSubtractorMOG.getNoiseSigma( | | ) -> | retval |
◆ setBackgroundRatio()
virtual void cv::bgsegm::BackgroundSubtractorMOG::setBackgroundRatio |
( |
double | backgroundRatio | ) |
|
|
pure virtual |
Python: |
---|
| cv.bgsegm.BackgroundSubtractorMOG.setBackgroundRatio( | backgroundRatio | ) -> | None |
◆ setHistory()
virtual void cv::bgsegm::BackgroundSubtractorMOG::setHistory |
( |
int | nframes | ) |
|
|
pure virtual |
Python: |
---|
| cv.bgsegm.BackgroundSubtractorMOG.setHistory( | nframes | ) -> | None |
◆ setNMixtures()
virtual void cv::bgsegm::BackgroundSubtractorMOG::setNMixtures |
( |
int | nmix | ) |
|
|
pure virtual |
Python: |
---|
| cv.bgsegm.BackgroundSubtractorMOG.setNMixtures( | nmix | ) -> | None |
◆ setNoiseSigma()
virtual void cv::bgsegm::BackgroundSubtractorMOG::setNoiseSigma |
( |
double | noiseSigma | ) |
|
|
pure virtual |
Python: |
---|
| cv.bgsegm.BackgroundSubtractorMOG.setNoiseSigma( | noiseSigma | ) -> | None |
The documentation for this class was generated from the following file: