The class discriminates between foreground and background pixels by building and maintaining a model of the background.
More...
#include "cudalegacy.hpp"
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 [46] .
- See also
- BackgroundSubtractor
virtual void cv::BackgroundSubtractor::apply |
( |
InputArray |
image, |
|
|
OutputArray |
fgmask, |
|
|
double |
learningRate = -1 |
|
) |
| |
|
pure virtualinherited |
Computes a foreground mask.
- Parameters
-
image | Next video frame. |
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. |
Implemented in cv::BackgroundSubtractorMOG2.
virtual void cv::Algorithm::clear |
( |
| ) |
|
|
inlinevirtualinherited |
virtual bool cv::Algorithm::empty |
( |
| ) |
const |
|
inlinevirtualinherited |
virtual void cv::BackgroundSubtractor::getBackgroundImage |
( |
OutputArray |
backgroundImage | ) |
const |
|
pure virtualinherited |
Computes a background image.
- Parameters
-
backgroundImage | The output background image. |
- Note
- Sometimes the background image can be very blurry, as it contain the average background statistics.
virtual String cv::Algorithm::getDefaultName |
( |
| ) |
const |
|
virtualinherited |
Returns the algorithm string identifier.
This string is used as top level xml/yml node tag when the object is saved to a file or string.
virtual void cv::cuda::BackgroundSubtractorFGD::getForegroundRegions |
( |
OutputArrayOfArrays |
foreground_regions | ) |
|
|
pure virtual |
Returns the output foreground regions calculated by findContours.
- Parameters
-
foreground_regions | Output array (CPU memory). |
template<typename _Tp >
static Ptr<_Tp> cv::Algorithm::loadFromString |
( |
const String & |
strModel, |
|
|
const String & |
objname = String() |
|
) |
| |
|
inlinestaticinherited |
virtual void cv::Algorithm::read |
( |
const FileNode & |
fn | ) |
|
|
inlinevirtualinherited |
template<typename _Tp >
static Ptr<_Tp> cv::Algorithm::read |
( |
const FileNode & |
fn | ) |
|
|
inlinestaticinherited |
Reads algorithm from the file node.
This is static template method of Algorithm. It's usage is following (in the case of SVM):
Ptr<SVM> svm = Algorithm::read<SVM>(fsRead.root());
In order to make this method work, the derived class must overwrite Algorithm::read(const FileNode& fn) and also have static create() method without parameters (or with all the optional parameters)
References cv::Ptr< T >::empty().
virtual void cv::Algorithm::save |
( |
const String & |
filename | ) |
const |
|
virtualinherited |
Saves the algorithm to a file.
In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).
virtual void cv::Algorithm::write |
( |
FileStorage & |
fs | ) |
const |
|
inlinevirtualinherited |
void cv::Algorithm::writeFormat |
( |
FileStorage & |
fs | ) |
const |
|
protectedinherited |
The documentation for this class was generated from the following file:
- cudalegacy/include/opencv2/cudalegacy.hpp