.. ocv:function:: void BackgroundSubtractorMOG2::setShadowThreshold(double threshold)
+BackgroundSubtractorGMG
+------------------------
+Background Subtractor module based on the algorithm given in [Gold2012]_.
+
+.. ocv:class:: BackgroundSubtractorGMG : public BackgroundSubtractor
+
+
+createBackgroundSubtractorGMG
+-----------------------------------
+Creates a GMG Background Subtractor
+
+.. ocv:function:: Ptr<BackgroundSubtractorGMG> createBackgroundSubtractorGMG(int initializationFrames=120, double decisionThreshold=0.8)
+
+.. ocv:pyfunction:: cv2.createBackgroundSubtractorGMG([, initializationFrames[, decisionThreshold]]) -> retval
+
+ :param initializationFrames: number of frames used to initialize the background models.
+
+ :param decisionThreshold: Threshold value, above which it is marked foreground, else background.
+
+
+BackgroundSubtractorGMG::getNumFrames
+---------------------------------------
+Returns the number of frames used to initialize background model.
+
+.. ocv:function:: int BackgroundSubtractorGMG::getNumFrames() const
+
+
+BackgroundSubtractorGMG::setNumFrames
+---------------------------------------
+Sets the number of frames used to initialize background model.
+
+.. ocv:function:: void BackgroundSubtractorGMG::setNumFrames(int nframes)
+
+
+BackgroundSubtractorGMG::getDefaultLearningRate
+--------------------------------------------------
+Returns the learning rate of the algorithm. It lies between 0.0 and 1.0. It determines how quickly features are "forgotten" from histograms.
+
+.. ocv:function:: double BackgroundSubtractorGMG::getDefaultLearningRate() const
+
+
+BackgroundSubtractorGMG::setDefaultLearningRate
+--------------------------------------------------
+Sets the learning rate of the algorithm.
+
+.. ocv:function:: void BackgroundSubtractorGMG::setDefaultLearningRate(double lr)
+
+
+BackgroundSubtractorGMG::getDecisionThreshold
+--------------------------------------------------
+Returns the value of decision threshold. Decision value is the value above which pixel is determined to be FG.
+
+.. ocv:function:: double BackgroundSubtractorGMG::getDecisionThreshold() const
+
+
+BackgroundSubtractorGMG::setDecisionThreshold
+--------------------------------------------------
+Sets the value of decision threshold.
+
+.. ocv:function:: void BackgroundSubtractorGMG::setDecisionThreshold(double thresh)
+
+
+BackgroundSubtractorGMG::getMaxFeatures
+--------------------------------------------------
+Returns total number of distinct colors to maintain in histogram.
+
+.. ocv:function:: int BackgroundSubtractorGMG::getMaxFeatures() const
+
+
+BackgroundSubtractorGMG::setMaxFeatures
+--------------------------------------------------
+Sets total number of distinct colors to maintain in histogram.
+
+.. ocv:function:: void BackgroundSubtractorGMG::setMaxFeatures(int maxFeatures)
+
+
+BackgroundSubtractorGMG::getQuantizationLevels
+--------------------------------------------------
+Returns the parameter used for quantization of color-space. It is the number of discrete levels in each channel to be used in histograms.
+
+.. ocv:function:: int BackgroundSubtractorGMG::getQuantizationLevels() const
+
+
+BackgroundSubtractorGMG::setQuantizationLevels
+--------------------------------------------------
+Sets the parameter used for quantization of color-space
+
+.. ocv:function:: void BackgroundSubtractorGMG::setQuantizationLevels(int nlevels)
+
+
+BackgroundSubtractorGMG::getSmoothingRadius
+--------------------------------------------------
+Returns the kernel radius used for morphological operations
+
+.. ocv:function:: int BackgroundSubtractorGMG::getSmoothingRadius() const
+
+
+BackgroundSubtractorGMG::setSmoothingRadius
+--------------------------------------------------
+Sets the kernel radius used for morphological operations
+
+.. ocv:function:: void BackgroundSubtractorGMG::setSmoothingRadius(int radius)
+
+
+BackgroundSubtractorGMG::getUpdateBackgroundModel
+--------------------------------------------------
+Returns the status of background model update
+
+.. ocv:function:: bool BackgroundSubtractorGMG::getUpdateBackgroundModel() const
+
+
+BackgroundSubtractorGMG::setUpdateBackgroundModel
+--------------------------------------------------
+Sets the status of background model update
+
+.. ocv:function:: void BackgroundSubtractorGMG::setUpdateBackgroundModel(bool update)
+
+
+BackgroundSubtractorGMG::getMinVal
+--------------------------------------------------
+Returns the minimum value taken on by pixels in image sequence. Usually 0.
+
+.. ocv:function:: double BackgroundSubtractorGMG::getMinVal() const
+
+
+BackgroundSubtractorGMG::setMinVal
+--------------------------------------------------
+Sets the minimum value taken on by pixels in image sequence.
+
+.. ocv:function:: void BackgroundSubtractorGMG::setMinVal(double val)
+
+
+BackgroundSubtractorGMG::getMaxVal
+--------------------------------------------------
+Returns the maximum value taken on by pixels in image sequence. e.g. 1.0 or 255.
+
+.. ocv:function:: double BackgroundSubtractorGMG::getMaxVal() const
+
+
+BackgroundSubtractorGMG::setMaxVal
+--------------------------------------------------
+Sets the maximum value taken on by pixels in image sequence.
+
+.. ocv:function:: void BackgroundSubtractorGMG::setMaxVal(double val)
+
+
+BackgroundSubtractorGMG::getBackgroundPrior
+--------------------------------------------------
+Returns the prior probability that each individual pixel is a background pixel.
+
+.. ocv:function:: double BackgroundSubtractorGMG::getBackgroundPrior() const
+
+
+BackgroundSubtractorGMG::setBackgroundPrior
+--------------------------------------------------
+Sets the prior probability that each individual pixel is a background pixel.
+
+.. ocv:function:: void BackgroundSubtractorGMG::setBackgroundPrior(double bgprior)
+
+
calcOpticalFlowSF
-----------------
Calculate an optical flow using "SimpleFlow" algorithm.
:param next: Second 8-bit 3-channel image of the same size as ``prev``
- :param flow: computed flow image that has the same size as ``prev`` and type ``CV_32FC2``
+ :param flow: computed flow image that has the same size as ``prev`` and type ``CV_32FC2``
:param layers: Number of layers
.. [Zach2007] C. Zach, T. Pock and H. Bischof. "A Duality Based Approach for Realtime TV-L1 Optical Flow", In Proceedings of Pattern Recognition (DAGM), Heidelberg, Germany, pp. 214-223, 2007
-.. [Zivkovic2004] Z. Zivkovic. Improved adaptive Gausian mixture model for background subtraction*, International Conference Pattern Recognition, UK, August, 2004, http://www.zoranz.net/Publications/zivkovic2004ICPR.pdf. The code is very fast and performs also shadow detection. Number of Gausssian components is adapted per pixel.
+.. [Zivkovic2004] Z. Zivkovic. "Improved adaptive Gausian mixture model for background subtraction", International Conference Pattern Recognition, UK, August, 2004, http://www.zoranz.net/Publications/zivkovic2004ICPR.pdf. The code is very fast and performs also shadow detection. Number of Gausssian components is adapted per pixel.
.. [Zivkovic2006] Z.Zivkovic, F. van der Heijden. "Efficient Adaptive Density Estimation per Image Pixel for the Task of Background Subtraction", Pattern Recognition Letters, vol. 27, no. 7, pages 773-780, 2006.
+
+.. [Gold2012] Andrew B. Godbehere, Akihiro Matsukawa, Ken Goldberg, "Visual Tracking of Human Visitors under Variable-Lighting Conditions for a Responsive Audio Art Installation", American Control Conference, Montreal, June 2012.