$darkmode
![]() |
OpenCV 4.11.0
Open Source Computer Vision
|
Structure for the Background Subtractor operation's initialization parameters. More...
#include <opencv2/gapi/video.hpp>
Public Member Functions | |
BackgroundSubtractorParams () | |
default constructor More... | |
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. More... | |
int | history = 500 |
Length of the history. More... | |
double | learningRate = -1 |
BackgroundSubtractorType | operation = TYPE_BS_MOG2 |
Type of the Background Subtractor operation. More... | |
double | threshold = 16 |
Structure for the Background Subtractor operation's initialization parameters.
|
inline |
default constructor
|
inline |
Full constructor
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. |
bool cv::gapi::video::BackgroundSubtractorParams::detectShadows = true |
If true, the algorithm will detect shadows and mark them.
int cv::gapi::video::BackgroundSubtractorParams::history = 500 |
Length of the history.
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.
BackgroundSubtractorType cv::gapi::video::BackgroundSubtractorParams::operation = TYPE_BS_MOG2 |
Type of the Background Subtractor operation.
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.