Interface BackgroundAlgorithmBasic

All Known Implementing Classes:
BackgroundMovingBasic, BackgroundMovingBasic_IL, BackgroundMovingBasic_IL_MT, BackgroundMovingBasic_PL, BackgroundMovingBasic_PL_MT, BackgroundMovingBasic_SB, BackgroundMovingBasic_SB_MT, BackgroundStationaryBasic, BackgroundStationaryBasic_IL, BackgroundStationaryBasic_IL_MT, BackgroundStationaryBasic_PL, BackgroundStationaryBasic_PL_MT, BackgroundStationaryBasic_SB, BackgroundStationaryBasic_SB_MT

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.

  • Method Summary

    Modifier and Type Method 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
  • Method Details

    • 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()
      Returns the threshold for background/moving object.
      Returns:
      background threshold
    • setThreshold

      void setThreshold​(float threshold)
      Sets the threshold for background/moving object
      Parameters:
      threshold - background threshold