public class BackgroundSubtractorGSOC extends BackgroundSubtractor
| Modifier | Constructor and Description |
|---|---|
protected |
BackgroundSubtractorGSOC(long addr) |
| Modifier and Type | Method and Description |
|---|---|
static BackgroundSubtractorGSOC |
__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.
|
clear, empty, getDefaultName, getNativeObjAddr, savepublic static BackgroundSubtractorGSOC __fromPtr__(long addr)
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.protected void finalize()
throws Throwable
finalize in class BackgroundSubtractorThrowableCopyright © 2020. All rights reserved.