public class BackgroundSubtractorKNN extends BackgroundSubtractor
| Modifier and Type | Method and Description |
|---|---|
static BackgroundSubtractorKNN |
__fromPtr__(long addr) |
boolean |
getDetectShadows()
Returns the shadow detection flag
If true, the algorithm detects shadows and marks them.
|
double |
getDist2Threshold()
Returns the threshold on the squared distance between the pixel and the sample
The threshold on the squared distance between the pixel and the sample to decide whether a pixel is
close to a data sample.
|
int |
getHistory()
Returns the number of last frames that affect the background model
|
int |
getkNNSamples()
Returns the number of neighbours, the k in the kNN.
|
int |
getNSamples()
Returns the number of data samples in the background model
|
double |
getShadowThreshold()
Returns the shadow threshold
A shadow is detected if pixel is a darker version of the background.
|
int |
getShadowValue()
Returns the shadow value
Shadow value is the value used to mark shadows in the foreground mask.
|
void |
setDetectShadows(boolean detectShadows)
Enables or disables shadow detection
|
void |
setDist2Threshold(double _dist2Threshold)
Sets the threshold on the squared distance
|
void |
setHistory(int history)
Sets the number of last frames that affect the background model
|
void |
setkNNSamples(int _nkNN)
Sets the k in the kNN.
|
void |
setNSamples(int _nN)
Sets the number of data samples in the background model.
|
void |
setShadowThreshold(double threshold)
Sets the shadow threshold
|
void |
setShadowValue(int value)
Sets the shadow value
|
apply, apply, getBackgroundImageclear, empty, getDefaultName, getNativeObjAddr, savepublic static BackgroundSubtractorKNN __fromPtr__(long addr)
public boolean getDetectShadows()
public double getDist2Threshold()
public int getHistory()
public int getkNNSamples()
public int getNSamples()
public double getShadowThreshold()
public int getShadowValue()
public void setDetectShadows(boolean detectShadows)
detectShadows - automatically generatedpublic void setDist2Threshold(double _dist2Threshold)
_dist2Threshold - automatically generatedpublic void setHistory(int history)
history - automatically generatedpublic void setkNNSamples(int _nkNN)
_nkNN - automatically generatedpublic void setNSamples(int _nN)
_nN - automatically generatedpublic void setShadowThreshold(double threshold)
threshold - automatically generatedpublic void setShadowValue(int value)
value - automatically generatedGenerated on 2023-06-28 12:47:21 / OpenCV 4.8.0