public class BackgroundSubtractorCNT extends BackgroundSubtractor
| Modifier | Constructor and Description |
|---|---|
protected |
BackgroundSubtractorCNT(long addr) |
| Modifier and Type | Method and Description |
|---|---|
static BackgroundSubtractorCNT |
__fromPtr__(long addr) |
void |
apply(Mat image,
Mat fgmask)
Computes a foreground mask.
|
void |
apply(Mat image,
Mat fgmask,
double learningRate)
Computes a foreground mask.
|
protected void |
finalize() |
void |
getBackgroundImage(Mat backgroundImage)
Computes a background image.
|
boolean |
getIsParallel()
Returns if we're parallelizing the algorithm.
|
int |
getMaxPixelStability()
Returns maximum allowed credit for a pixel in history.
|
int |
getMinPixelStability()
Returns number of frames with same pixel color to consider stable.
|
boolean |
getUseHistory()
Returns if we're giving a pixel credit for being stable for a long time.
|
void |
setIsParallel(boolean value)
Sets if we're parallelizing the algorithm.
|
void |
setMaxPixelStability(int value)
Sets the maximum allowed credit for a pixel in history.
|
void |
setMinPixelStability(int value)
Sets the number of frames with same pixel color to consider stable.
|
void |
setUseHistory(boolean value)
Sets if we're giving a pixel credit for being stable for a long time.
|
clear, empty, getDefaultName, getNativeObjAddr, savepublic static BackgroundSubtractorCNT __fromPtr__(long addr)
public boolean getIsParallel()
public boolean getUseHistory()
public int getMaxPixelStability()
public int getMinPixelStability()
public void apply(Mat image, Mat fgmask, double learningRate)
BackgroundSubtractorapply in class BackgroundSubtractorimage - 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.public void apply(Mat image, Mat fgmask)
BackgroundSubtractorapply in class BackgroundSubtractorimage - Next video frame.fgmask - The output foreground mask as an 8-bit binary image.
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.public void getBackgroundImage(Mat backgroundImage)
BackgroundSubtractorgetBackgroundImage in class BackgroundSubtractorbackgroundImage - The output background image.
Note: Sometimes the background image can be very blurry, as it contain the average background
statistics.public void setIsParallel(boolean value)
value - automatically generatedpublic void setMaxPixelStability(int value)
value - automatically generatedpublic void setMinPixelStability(int value)
value - automatically generatedpublic void setUseHistory(boolean value)
value - automatically generatedprotected void finalize()
throws Throwable
finalize in class BackgroundSubtractorThrowableCopyright © 2020. All rights reserved.