public interface BackgroundAlgorithmBasic
Performs background subtraction on an image using the very simple per-pixel "basic" model, as described in [1].
A simple image is used to represent the background. Each pixel is updated individually using the formula below:
B(i+1) = (1-α)*B(i) + αI(i)
Where B is the background image, I is the current observed image, and α is the learning rate 0 to 1.
Where 0 is static and 1 is instant.
If a specific pixel has not been observed before it will be set to the value of the equivalent pixel in the input image.
[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.
| Modifier and Type | Method and Description |
|---|---|
float |
getLearnRate()
Returns the learning rate.
|
float |
getThreshold()
Returns the threshold for background/moving object.
|
void |
setLearnRate(float learnRate)
Specifies the learning rate
|
void |
setThreshold(float threshold)
Sets the threshold for background/moving object
|
float getLearnRate()
void setLearnRate(float learnRate)
learnRate - 0 (slow) to 1 (fast)float getThreshold()
void setThreshold(float threshold)
threshold - background threshold