Structure for the Background Subtractor operation's initialization parameters. More...
#include <opencv2/gapi/video.hpp>
Public Member Functions | |
BackgroundSubtractorParams () | |
default constructor | |
BackgroundSubtractorParams (BackgroundSubtractorType op, int histLength, double thrshld, bool detect, double lRate) | |
Public Attributes | |
bool | detectShadows = true |
If true, the algorithm will detect shadows and mark them. | |
int | history = 500 |
Length of the history. | |
double | learningRate = -1 |
BackgroundSubtractorType | operation = TYPE_BS_MOG2 |
Type of the Background Subtractor operation. | |
double | threshold = 16 |
Detailed Description
Structure for the Background Subtractor operation's initialization parameters.
Constructor & Destructor Documentation
◆ BackgroundSubtractorParams() [1/2]
|
inline |
default constructor
◆ BackgroundSubtractorParams() [2/2]
|
inline |
Full constructor
- Parameters
-
op MOG2/KNN Background Subtractor type. histLength Length of the history. thrshld For MOG2: Threshold on the squared Mahalanobis distance between the pixel and the model to decide whether a pixel is well described by the background model. For KNN: Threshold on the squared distance between the pixel and the sample to decide whether a pixel is close to that sample. detect If true, the algorithm will detect shadows and mark them. It decreases the speed a bit, so if you do not need this feature, set the parameter to false. lRate 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.
Member Data Documentation
◆ detectShadows
bool cv::gapi::video::BackgroundSubtractorParams::detectShadows = true |
If true, the algorithm will detect shadows and mark them.
◆ history
int cv::gapi::video::BackgroundSubtractorParams::history = 500 |
Length of the history.
◆ learningRate
double cv::gapi::video::BackgroundSubtractorParams::learningRate = -1 |
The value between 0 and 1 that indicates how fast the background model is learnt. Negative parameter value makes the algorithm use some automatically chosen learning rate.
◆ operation
BackgroundSubtractorType cv::gapi::video::BackgroundSubtractorParams::operation = TYPE_BS_MOG2 |
Type of the Background Subtractor operation.
◆ threshold
double cv::gapi::video::BackgroundSubtractorParams::threshold = 16 |
For MOG2: Threshold on the squared Mahalanobis distance between the pixel and the model to decide whether a pixel is well described by the background model. For KNN: Threshold on the squared distance between the pixel and the sample to decide whether a pixel is close to that sample.
The documentation for this struct was generated from the following file:
- opencv2/gapi/video.hpp