public class BackgroundSubtractorKNN extends BackgroundSubtractor
Modifier | Constructor and Description |
---|---|
protected |
BackgroundSubtractorKNN(long addr) |
Modifier and Type | Method and Description |
---|---|
static BackgroundSubtractorKNN |
__fromPtr__(long addr) |
protected void |
finalize() |
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, getBackgroundImage
clear, empty, getDefaultName, getNativeObjAddr, save
public static BackgroundSubtractorKNN __fromPtr__(long addr)
public boolean getDetectShadows()
public double getDist2Threshold()
public double getShadowThreshold()
public int getHistory()
public int getNSamples()
public int getShadowValue()
public int getkNNSamples()
public void setDetectShadows(boolean detectShadows)
detectShadows
- automatically generatedpublic void setDist2Threshold(double _dist2Threshold)
_dist2Threshold
- automatically generatedpublic void setHistory(int history)
history
- automatically generatedpublic void setNSamples(int _nN)
_nN
- automatically generatedpublic void setShadowThreshold(double threshold)
threshold
- automatically generatedpublic void setShadowValue(int value)
value
- automatically generatedpublic void setkNNSamples(int _nkNN)
_nkNN
- automatically generatedprotected void finalize() throws Throwable
finalize
in class BackgroundSubtractor
Throwable
Copyright © 2020. All rights reserved.