Updates the background model and computes the foreground mask
fgmask = bs.apply(im)
fgmask = bs.apply(im, 'OptionName', optionValue, ...)
Input
- im Next video frame, uint8 or single. Floating point frame
will be used without scaling and should be in range [0,255].
Output
- fgmask The output foreground mask as an 8-bit binary image
(0 for background, 255 for foregound, and
ShadowValue
for
shadows if DetectShadows
is true).
Options
- 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. default -1