Skip to content

Commit 4e0351b

Browse files
committed
Clarify docs for MOG2::apply
1 parent aa5caf8 commit 4e0351b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

modules/video/include/opencv2/video/background_segm.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,17 @@ class CV_EXPORTS_W BackgroundSubtractorMOG2 : public BackgroundSubtractor
195195
/** @brief Sets the shadow threshold
196196
*/
197197
CV_WRAP virtual void setShadowThreshold(double threshold) = 0;
198+
199+
/** @brief Computes a foreground mask.
200+
201+
@param image Next video frame. Floating point frame will be used without scaling and should be in range \f$[0,255]\f$.
202+
@param fgmask The output foreground mask as an 8-bit binary image.
203+
@param learningRate The value between 0 and 1 that indicates how fast the background model is
204+
learnt. Negative parameter value makes the algorithm to use some automatically chosen learning
205+
rate. 0 means that the background model is not updated at all, 1 means that the background model
206+
is completely reinitialized from the last frame.
207+
*/
208+
CV_WRAP virtual void apply(InputArray image, OutputArray fgmask, double learningRate=-1) = 0;
198209
};
199210

200211
/** @brief Creates MOG2 Background Subtractor

0 commit comments

Comments
 (0)