Interface BackgroundAlgorithmGmm

All Known Implementing Classes:
BackgroundMovingGmm, BackgroundMovingGmm_MB, BackgroundMovingGmm_MB_MT, BackgroundMovingGmm_SB, BackgroundMovingGmm_SB_MT, BackgroundStationaryGmm, BackgroundStationaryGmm_MB, BackgroundStationaryGmm_MB_MT, BackgroundStationaryGmm_SB, BackgroundStationaryGmm_SB_MT

public interface BackgroundAlgorithmGmm

Background model in which each pixel is modeled as a Gaussian mixture model. The number of Gaussians in the mixture is determined dynamically. If a pixel value is encountered which doesn't match any mixture then a new Gaussian is added. Gaussians are removed when their weight becomes negative. See [1] for details.

Tuning Parameters:

  • learningPeriod: Specifies how fast a Gaussian changes. Larger values is slower learning. Try 100
  • decayCoef: Adjusts how quickly a Gaussian's weight is reduced. Try 0.001
  • maxGaussian: Maximum number of Gaussian models. Try 10
  • initial variance The initial variance assigned to pixels when they are first observed. By default this is Float.MIN_VALUE.

[1] Zivkovic, Zoran. "Improved adaptive Gaussian mixture model for background subtraction." In Pattern Recognition, 2004. ICPR 2004. Proceedings of the 17th International Conference on, vol. 2, pp. 28-31. IEEE, 2004.

  • Method Summary

    Modifier and Type Method Description
    float getInitialVariance()
    Returns the initial variance assigned to a pixel
    float getLearningPeriod()
    Returns the learning period.
    void setInitialVariance​(float initialVariance)
    Sets the initial variance assigned to a pixel
    void setLearningPeriod​(float period)
    Specifies the learning rate
    void setSignificantWeight​(float value)
    Minimum value of a Gaussian's weight to be considered part of the background
  • Method Details

    • getInitialVariance

      float getInitialVariance()
      Returns the initial variance assigned to a pixel
      Returns:
      initial variance
    • setInitialVariance

      void setInitialVariance​(float initialVariance)
      Sets the initial variance assigned to a pixel
      Parameters:
      initialVariance - initial variance
    • getLearningPeriod

      float getLearningPeriod()
      Returns the learning period.
    • setLearningPeriod

      void setLearningPeriod​(float period)
      Specifies the learning rate
      Parameters:
      period - Must be more than 0.
    • setSignificantWeight

      void setSignificantWeight​(float value)
      Minimum value of a Gaussian's weight to be considered part of the background