BackgroundSubtractorGMG
Objective-C
@interface BackgroundSubtractorGMG : BackgroundSubtractor
Swift
class BackgroundSubtractorGMG : BackgroundSubtractor
Background Subtractor module based on the algorithm given in CITE: Gold2012 .
Takes a series of images and returns a sequence of mask (8UC1) images of the same size, where 255 indicates Foreground and 0 represents Background. This class implements an algorithm described in “Visual Tracking of Human Visitors under Variable-Lighting Conditions for a Responsive Audio Art Installation,” A. Godbehere, A. Matsukawa, K. Goldberg, American Control Conference, Montreal, June 2012.
Member of Bgsegm
-
Returns the status of background model update
Declaration
Objective-C
- (BOOL)getUpdateBackgroundModel;Swift
func getUpdateBackgroundModel() -> Bool -
Returns the prior probability that each individual pixel is a background pixel.
Declaration
Objective-C
- (double)getBackgroundPrior;Swift
func getBackgroundPrior() -> Double -
Returns the value of decision threshold.
Decision value is the value above which pixel is determined to be FG.Declaration
Objective-C
- (double)getDecisionThreshold;Swift
func getDecisionThreshold() -> Double -
Returns the learning rate of the algorithm.
It lies between 0.0 and 1.0. It determines how quickly features are "forgotten" from histograms.Declaration
Objective-C
- (double)getDefaultLearningRate;Swift
func getDefaultLearningRate() -> Double -
Returns the maximum value taken on by pixels in image sequence. e.g. 1.0 or 255.
Declaration
Objective-C
- (double)getMaxVal;Swift
func getMaxVal() -> Double -
Returns the minimum value taken on by pixels in image sequence. Usually 0.
Declaration
Objective-C
- (double)getMinVal;Swift
func getMinVal() -> Double -
Returns total number of distinct colors to maintain in histogram.
Declaration
Objective-C
- (int)getMaxFeatures;Swift
func getMaxFeatures() -> Int32 -
Returns the number of frames used to initialize background model.
Declaration
Objective-C
- (int)getNumFrames;Swift
func getNumFrames() -> Int32 -
Returns the parameter used for quantization of color-space.
It is the number of discrete levels in each channel to be used in histograms.Declaration
Objective-C
- (int)getQuantizationLevels;Swift
func getQuantizationLevels() -> Int32 -
Returns the kernel radius used for morphological operations
Declaration
Objective-C
- (int)getSmoothingRadius;Swift
func getSmoothingRadius() -> Int32 -
Sets the prior probability that each individual pixel is a background pixel.
Declaration
Objective-C
- (void)setBackgroundPrior:(double)bgprior;Swift
func setBackgroundPrior(bgprior: Double) -
Sets the value of decision threshold.
Declaration
Objective-C
- (void)setDecisionThreshold:(double)thresh;Swift
func setDecisionThreshold(thresh: Double) -
Sets the learning rate of the algorithm.
Declaration
Objective-C
- (void)setDefaultLearningRate:(double)lr;Swift
func setDefaultLearningRate(lr: Double) -
Sets total number of distinct colors to maintain in histogram.
Declaration
Objective-C
- (void)setMaxFeatures:(int)maxFeatures;Swift
func setMaxFeatures(maxFeatures: Int32) -
Sets the maximum value taken on by pixels in image sequence.
Declaration
Objective-C
- (void)setMaxVal:(double)val;Swift
func setMaxVal(val: Double) -
Sets the minimum value taken on by pixels in image sequence.
Declaration
Objective-C
- (void)setMinVal:(double)val;Swift
func setMinVal(val: Double) -
Sets the number of frames used to initialize background model.
Declaration
Objective-C
- (void)setNumFrames:(int)nframes;Swift
func setNumFrames(nframes: Int32) -
Sets the parameter used for quantization of color-space
Declaration
Objective-C
- (void)setQuantizationLevels:(int)nlevels;Swift
func setQuantizationLevels(nlevels: Int32) -
Sets the kernel radius used for morphological operations
Declaration
Objective-C
- (void)setSmoothingRadius:(int)radius;Swift
func setSmoothingRadius(radius: Int32) -
Sets the status of background model update
Declaration
Objective-C
- (void)setUpdateBackgroundModel:(BOOL)update;Swift
func setUpdateBackgroundModel(update: Bool)
View on GitHub
BackgroundSubtractorGMG Class Reference