View Source Evision.BackgroundSubtractor (Evision v0.1.14)
Link to this section Summary
Types
Type that represents an Evision.BackgroundSubtractor
struct.
Link to this section Types
@type t() :: %Evision.BackgroundSubtractor{ref: reference()}
Type that represents an Evision.BackgroundSubtractor
struct.
ref.
reference()
The underlying erlang resource variable.
Link to this section Functions
@spec apply(t(), Evision.Mat.maybe_mat_in()) :: Evision.Mat.t() | {:error, String.t()}
Computes a foreground mask.
Positional Arguments
image:
Evision.Mat
.Next video frame.
Keyword Arguments
learningRate:
double
.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.
Return
fgmask:
Evision.Mat
.The output foreground mask as an 8-bit binary image.
Python prototype (for reference):
apply(image[, fgmask[, learningRate]]) -> fgmask
@spec apply(t(), Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil) :: Evision.Mat.t() | {:error, String.t()}
Computes a foreground mask.
Positional Arguments
image:
Evision.Mat
.Next video frame.
Keyword Arguments
learningRate:
double
.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.
Return
fgmask:
Evision.Mat
.The output foreground mask as an 8-bit binary image.
Python prototype (for reference):
apply(image[, fgmask[, learningRate]]) -> fgmask
@spec getBackgroundImage(t()) :: Evision.Mat.t() | {:error, String.t()}
Computes a background image.
Return
backgroundImage:
Evision.Mat
.The output background image.
Note: Sometimes the background image can be very blurry, as it contain the average background statistics.
Python prototype (for reference):
getBackgroundImage([, backgroundImage]) -> backgroundImage