public interface BackgroundAlgorithmBasic
Performs basic background subtraction on an image.
One of the most basic ways and easiest to perform background detection. 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.
| 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