Interface BackgroundAlgorithmGaussian
-
- All Known Implementing Classes:
- BackgroundMovingGaussian, BackgroundMovingGaussian_IL, BackgroundMovingGaussian_PL, BackgroundMovingGaussian_SB, BackgroundStationaryGaussian, BackgroundStationaryGaussian_IL, BackgroundStationaryGaussian_PL, BackgroundStationaryGaussian_SB
public interface BackgroundAlgorithmGaussianBackground 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 [1] 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
GrayF32images. This allows for the mean and variance of each pixel to be interpolated, reducing artifacts along the border of objects.Tuning Parameters:
- 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.
[1] 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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description floatgetInitialVariance()Returns the initial variance assigned to a pixelfloatgetLearnRate()Returns the learning rate.floatgetMinimumDifference()floatgetThreshold()voidsetInitialVariance(float initialVariance)Sets the initial variance assigned to a pixelvoidsetLearnRate(float learnRate)Specifies the learning ratevoidsetMinimumDifference(float minimumDifference)voidsetThreshold(float threshold)
-
-
-
Method Detail
-
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
-
getLearnRate
float getLearnRate()
Returns the learning rate.- Returns:
- 0 (slow) to 1 (fast)
-
setLearnRate
void setLearnRate(float learnRate)
Specifies the learning rate- Parameters:
learnRate- 0 (slow) to 1 (fast)
-
getThreshold
float getThreshold()
-
setThreshold
void setThreshold(float threshold)
-
getMinimumDifference
float getMinimumDifference()
-
setMinimumDifference
void setMinimumDifference(float minimumDifference)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG