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, save
public static BackgroundSubtractorGSOC __fromPtr__(long addr)
public void apply(Mat image, Mat fgmask, double learningRate)
BackgroundSubtractor
apply
in class BackgroundSubtractor
image
- 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)
BackgroundSubtractor
apply
in class BackgroundSubtractor
image
- 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)
BackgroundSubtractor
getBackgroundImage
in class BackgroundSubtractor
backgroundImage
- 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 BackgroundSubtractor
Throwable
Generated on Wed Oct 9 2019 23:24:43 UTC / OpenCV 4.1.2