Package org.opencv.bgsegm
Class BackgroundSubtractorGMG
- java.lang.Object
- 
- org.opencv.core.Algorithm
- 
- org.opencv.video.BackgroundSubtractor
- 
- org.opencv.bgsegm.BackgroundSubtractorGMG
 
 
 
- 
 public class BackgroundSubtractorGMG extends 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.
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedBackgroundSubtractorGMG(long addr)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BackgroundSubtractorGMG__fromPtr__(long addr)protected voidfinalize()doublegetBackgroundPrior()Returns the prior probability that each individual pixel is a background pixel.doublegetDecisionThreshold()Returns the value of decision threshold.doublegetDefaultLearningRate()Returns the learning rate of the algorithm.intgetMaxFeatures()Returns total number of distinct colors to maintain in histogram.doublegetMaxVal()Returns the maximum value taken on by pixels in image sequence.doublegetMinVal()Returns the minimum value taken on by pixels in image sequence.intgetNumFrames()Returns the number of frames used to initialize background model.intgetQuantizationLevels()Returns the parameter used for quantization of color-space.intgetSmoothingRadius()Returns the kernel radius used for morphological operationsbooleangetUpdateBackgroundModel()Returns the status of background model updatevoidsetBackgroundPrior(double bgprior)Sets the prior probability that each individual pixel is a background pixel.voidsetDecisionThreshold(double thresh)Sets the value of decision threshold.voidsetDefaultLearningRate(double lr)Sets the learning rate of the algorithm.voidsetMaxFeatures(int maxFeatures)Sets total number of distinct colors to maintain in histogram.voidsetMaxVal(double val)Sets the maximum value taken on by pixels in image sequence.voidsetMinVal(double val)Sets the minimum value taken on by pixels in image sequence.voidsetNumFrames(int nframes)Sets the number of frames used to initialize background model.voidsetQuantizationLevels(int nlevels)Sets the parameter used for quantization of color-spacevoidsetSmoothingRadius(int radius)Sets the kernel radius used for morphological operationsvoidsetUpdateBackgroundModel(boolean update)Sets the status of background model update- 
Methods inherited from class org.opencv.video.BackgroundSubtractorapply, apply, getBackgroundImage
 - 
Methods inherited from class org.opencv.core.Algorithmclear, empty, getDefaultName, getNativeObjAddr, save
 
- 
 
- 
- 
- 
Method Detail- 
__fromPtr__public static BackgroundSubtractorGMG __fromPtr__(long addr) 
 - 
getMaxFeaturespublic int getMaxFeatures() Returns total number of distinct colors to maintain in histogram.- Returns:
- automatically generated
 
 - 
setMaxFeaturespublic void setMaxFeatures(int maxFeatures) Sets total number of distinct colors to maintain in histogram.- Parameters:
- maxFeatures- automatically generated
 
 - 
getDefaultLearningRatepublic double getDefaultLearningRate() Returns the learning rate of the algorithm. It lies between 0.0 and 1.0. It determines how quickly features are "forgotten" from histograms.- Returns:
- automatically generated
 
 - 
setDefaultLearningRatepublic void setDefaultLearningRate(double lr) Sets the learning rate of the algorithm.- Parameters:
- lr- automatically generated
 
 - 
getNumFramespublic int getNumFrames() Returns the number of frames used to initialize background model.- Returns:
- automatically generated
 
 - 
setNumFramespublic void setNumFrames(int nframes) Sets the number of frames used to initialize background model.- Parameters:
- nframes- automatically generated
 
 - 
getQuantizationLevelspublic int getQuantizationLevels() Returns the parameter used for quantization of color-space. It is the number of discrete levels in each channel to be used in histograms.- Returns:
- automatically generated
 
 - 
setQuantizationLevelspublic void setQuantizationLevels(int nlevels) Sets the parameter used for quantization of color-space- Parameters:
- nlevels- automatically generated
 
 - 
getBackgroundPriorpublic double getBackgroundPrior() Returns the prior probability that each individual pixel is a background pixel.- Returns:
- automatically generated
 
 - 
setBackgroundPriorpublic void setBackgroundPrior(double bgprior) Sets the prior probability that each individual pixel is a background pixel.- Parameters:
- bgprior- automatically generated
 
 - 
getSmoothingRadiuspublic int getSmoothingRadius() Returns the kernel radius used for morphological operations- Returns:
- automatically generated
 
 - 
setSmoothingRadiuspublic void setSmoothingRadius(int radius) Sets the kernel radius used for morphological operations- Parameters:
- radius- automatically generated
 
 - 
getDecisionThresholdpublic double getDecisionThreshold() Returns the value of decision threshold. Decision value is the value above which pixel is determined to be FG.- Returns:
- automatically generated
 
 - 
setDecisionThresholdpublic void setDecisionThreshold(double thresh) Sets the value of decision threshold.- Parameters:
- thresh- automatically generated
 
 - 
getUpdateBackgroundModelpublic boolean getUpdateBackgroundModel() Returns the status of background model update- Returns:
- automatically generated
 
 - 
setUpdateBackgroundModelpublic void setUpdateBackgroundModel(boolean update) Sets the status of background model update- Parameters:
- update- automatically generated
 
 - 
getMinValpublic double getMinVal() Returns the minimum value taken on by pixels in image sequence. Usually 0.- Returns:
- automatically generated
 
 - 
setMinValpublic void setMinVal(double val) Sets the minimum value taken on by pixels in image sequence.- Parameters:
- val- automatically generated
 
 - 
getMaxValpublic double getMaxVal() Returns the maximum value taken on by pixels in image sequence. e.g. 1.0 or 255.- Returns:
- automatically generated
 
 - 
setMaxValpublic void setMaxVal(double val) Sets the maximum value taken on by pixels in image sequence.- Parameters:
- val- automatically generated
 
 - 
finalizeprotected void finalize() throws java.lang.Throwable- Overrides:
- finalizein class- BackgroundSubtractor
- Throws:
- java.lang.Throwable
 
 
- 
 
-