- All Known Implementing Classes:
public interface BackgroundAlgorithmGaussian
Background model in which each pixel is modeled as an independent Guassian distribution. For computational efficiency each band is modeled as having a diagonal covariance matrix with off diagonal terms set to zero, i.e. each band is independent. See  for a summary. This is an approximation but according to several papers it doesn't hurt performance much but simplifies computations significantly.
Internally background model is represented by two images; mean and variance, which are stored in
GrayF32 images. This allows for the mean and variance of each pixel to be interpolated,
reducing artifacts along the border of objects.
- learnRate: Specifies how fast it will adapt. 0 to 1, inclusive. 0 = static 1.0 = instant. Try 0.05
- threshold: Pixel's with a Mahalanobis distance ≤ threshold are assumed to be background. Consult a Chi-Squared table for theoretical values. 1-band try 10. 3-bands try 20.
- initial variance The initial variance assigned to pixels when they are first observed. By default this is Float.MIN_VALUE.
 Benezeth, Y., Jodoin, P. M., Emile, B., Laurent, H., & Rosenberger, C. (2010). Comparative study of background subtraction algorithms. Journal of Electronic Imaging, 19(3), 033003-033003.
Modifier and Type Method Description
()Returns the initial variance assigned to a pixel
()Returns the learning rate.
(float initialVariance)Sets the initial variance assigned to a pixel
(float learnRate)Specifies the learning rate
getInitialVariancefloat getInitialVariance()Returns the initial variance assigned to a pixel
- initial variance
setInitialVariancevoid setInitialVariance(float initialVariance)Sets the initial variance assigned to a pixel
initialVariance- initial variance
getLearnRatefloat getLearnRate()Returns the learning rate.
- 0 (slow) to 1 (fast)
setLearnRatevoid setLearnRate(float learnRate)Specifies the learning rate
learnRate- 0 (slow) to 1 (fast)
setThresholdvoid setThreshold(float threshold)
setMinimumDifferencevoid setMinimumDifference(float minimumDifference)