org.opencv.video
public class BackgroundSubtractor extends Algorithm
Base class for background/foreground segmentation.
class BackgroundSubtractor : public Algorithm
// C++ code:
public:
virtual ~BackgroundSubtractor();
virtual void operator()(InputArray image, OutputArray fgmask, double learningRate=0);
virtual void getBackgroundImage(OutputArray backgroundImage) const;
};
The class is only used to define the common interface for the whole family of background/foreground segmentation algorithms.
Modifier and Type | Method and Description |
---|---|
void |
apply(Mat image,
Mat fgmask)
Computes a foreground mask.
|
void |
apply(Mat image,
Mat fgmask,
double learningRate)
Computes a foreground mask.
|
public void apply(Mat image, Mat fgmask)
Computes a foreground mask.
image
- Next video frame.fgmask
- The output foreground mask as an 8-bit binary image.public void apply(Mat image, Mat fgmask, double learningRate)
Computes a foreground mask.
image
- Next video frame.fgmask
- The output foreground mask as an 8-bit binary image.learningRate
- a learningRate