Table of Contents

Method Apply

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Apply(InputArray, OutputArray, double)

the update operator that takes the next video frame and returns the current foreground mask as 8-bit binary image.

public virtual void Apply(InputArray image, OutputArray fgmask, double learningRate = -1)

Parameters

image InputArray
fgmask OutputArray
learningRate double

Apply(InputArray, InputArray, OutputArray, double)

Computes a foreground mask with known foreground mask input. This method has a default virtual implementation that throws a "not implemented" error in OpenCV. Foreground masking may not be supported by all background subtractors.

public virtual void Apply(InputArray image, InputArray knownForegroundMask, OutputArray fgmask, double learningRate = -1)

Parameters

image InputArray

Next video frame. Floating point frame will be used without scaling and should be in range [0,255].

knownForegroundMask InputArray

The mask for inputting already known foreground, allows model to ignore pixels.

fgmask OutputArray

The output foreground mask as an 8-bit binary image.

learningRate double