BackgroundSubtractorCNT

Objective-C

@interface BackgroundSubtractorCNT : BackgroundSubtractor

Swift

class BackgroundSubtractorCNT : BackgroundSubtractor

Background subtraction based on counting.

About as fast as MOG2 on a high end system. More than twice faster than MOG2 on cheap hardware (benchmarked on Raspberry Pi3).

%Algorithm by Sagi Zeevi ( https://github.com/sagi-z/BackgroundSubtractorCNT )

Member of Bgsegm

Methods

  • Returns if we’re parallelizing the algorithm.

    Declaration

    Objective-C

    - (BOOL)getIsParallel;

    Swift

    func getIsParallel() -> Bool
  • Returns if we’re giving a pixel credit for being stable for a long time.

    Declaration

    Objective-C

    - (BOOL)getUseHistory;

    Swift

    func getUseHistory() -> Bool
  • Returns maximum allowed credit for a pixel in history.

    Declaration

    Objective-C

    - (int)getMaxPixelStability;

    Swift

    func getMaxPixelStability() -> Int32
  • Returns number of frames with same pixel color to consider stable.

    Declaration

    Objective-C

    - (int)getMinPixelStability;

    Swift

    func getMinPixelStability() -> Int32
  • Declaration

    Objective-C

    - (void)apply:(nonnull Mat *)image
              fgmask:(nonnull Mat *)fgmask
        learningRate:(double)learningRate;

    Swift

    func apply(image: Mat, fgmask: Mat, learningRate: Double)
  • Declaration

    Objective-C

    - (void)apply:(nonnull Mat *)image fgmask:(nonnull Mat *)fgmask;

    Swift

    func apply(image: Mat, fgmask: Mat)
  • Declaration

    Objective-C

    - (void)getBackgroundImage:(nonnull Mat *)backgroundImage;

    Swift

    func getBackgroundImage(backgroundImage: Mat)
  • Sets if we’re parallelizing the algorithm.

    Declaration

    Objective-C

    - (void)setIsParallel:(BOOL)value;

    Swift

    func setIsParallel(value: Bool)
  • Sets the maximum allowed credit for a pixel in history.

    Declaration

    Objective-C

    - (void)setMaxPixelStability:(int)value;

    Swift

    func setMaxPixelStability(value: Int32)
  • Sets the number of frames with same pixel color to consider stable.

    Declaration

    Objective-C

    - (void)setMinPixelStability:(int)value;

    Swift

    func setMinPixelStability(value: Int32)
  • Sets if we’re giving a pixel credit for being stable for a long time.

    Declaration

    Objective-C

    - (void)setUseHistory:(BOOL)value;

    Swift

    func setUseHistory(value: Bool)