OpenCV for Unity  2.6.0
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.9.0/index.html ) for the details of the argument of the method.
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG Class Reference

Background Subtractor module based on the algorithm given in [Gold2012] . More...

Inheritance diagram for OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG:
OpenCVForUnity.VideoModule.BackgroundSubtractor OpenCVForUnity.CoreModule.Algorithm OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableObject

Public Member Functions

int getMaxFeatures ()
 Returns total number of distinct colors to maintain in histogram. More...
 
void setMaxFeatures (int maxFeatures)
 Sets total number of distinct colors to maintain in histogram. More...
 
double getDefaultLearningRate ()
 Returns the learning rate of the algorithm. More...
 
void setDefaultLearningRate (double lr)
 Sets the learning rate of the algorithm. More...
 
int getNumFrames ()
 Returns the number of frames used to initialize background model. More...
 
void setNumFrames (int nframes)
 Sets the number of frames used to initialize background model. More...
 
int getQuantizationLevels ()
 Returns the parameter used for quantization of color-space. More...
 
void setQuantizationLevels (int nlevels)
 Sets the parameter used for quantization of color-space. More...
 
double getBackgroundPrior ()
 Returns the prior probability that each individual pixel is a background pixel. More...
 
void setBackgroundPrior (double bgprior)
 Sets the prior probability that each individual pixel is a background pixel. More...
 
int getSmoothingRadius ()
 Returns the kernel radius used for morphological operations. More...
 
void setSmoothingRadius (int radius)
 Sets the kernel radius used for morphological operations. More...
 
double getDecisionThreshold ()
 Returns the value of decision threshold. More...
 
void setDecisionThreshold (double thresh)
 Sets the value of decision threshold. More...
 
bool getUpdateBackgroundModel ()
 Returns the status of background model update. More...
 
void setUpdateBackgroundModel (bool update)
 Sets the status of background model update. More...
 
double getMinVal ()
 Returns the minimum value taken on by pixels in image sequence. Usually 0. More...
 
void setMinVal (double val)
 Sets the minimum value taken on by pixels in image sequence. More...
 
double getMaxVal ()
 Returns the maximum value taken on by pixels in image sequence. e.g. 1.0 or 255. More...
 
void setMaxVal (double val)
 Sets the maximum value taken on by pixels in image sequence. More...
 
- Public Member Functions inherited from OpenCVForUnity.VideoModule.BackgroundSubtractor
virtual void apply (Mat image, Mat fgmask, double learningRate)
 Computes a foreground mask. More...
 
virtual void apply (Mat image, Mat fgmask)
 Computes a foreground mask. More...
 
virtual void getBackgroundImage (Mat backgroundImage)
 Computes a background image. More...
 
- Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
IntPtr getNativeObjAddr ()
 
virtual void clear ()
 Clears the algorithm state. More...
 
virtual bool empty ()
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More...
 
void save (string filename)
 
virtual string getDefaultName ()
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static new BackgroundSubtractorGMG __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.VideoModule.BackgroundSubtractor
static new BackgroundSubtractor __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
static Algorithm __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

Background Subtractor module based on the algorithm given in [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 Function Documentation

◆ __fromPtr__()

static new BackgroundSubtractorGMG OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.__fromPtr__ ( IntPtr  addr)
static

◆ Dispose()

override void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.Dispose ( bool  disposing)
protectedvirtual

◆ getBackgroundPrior()

double OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getBackgroundPrior ( )

Returns the prior probability that each individual pixel is a background pixel.

◆ getDecisionThreshold()

double OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getDecisionThreshold ( )

Returns the value of decision threshold.

Decision value is the value above which pixel is determined to be FG.

◆ getDefaultLearningRate()

double OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.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.

◆ getMaxFeatures()

int OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getMaxFeatures ( )

Returns total number of distinct colors to maintain in histogram.

◆ getMaxVal()

double OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getMaxVal ( )

Returns the maximum value taken on by pixels in image sequence. e.g. 1.0 or 255.

◆ getMinVal()

double OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getMinVal ( )

Returns the minimum value taken on by pixels in image sequence. Usually 0.

◆ getNumFrames()

int OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getNumFrames ( )

Returns the number of frames used to initialize background model.

◆ getQuantizationLevels()

int OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.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.

◆ getSmoothingRadius()

int OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getSmoothingRadius ( )

Returns the kernel radius used for morphological operations.

◆ getUpdateBackgroundModel()

bool OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getUpdateBackgroundModel ( )

Returns the status of background model update.

◆ setBackgroundPrior()

void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setBackgroundPrior ( double  bgprior)

Sets the prior probability that each individual pixel is a background pixel.

◆ setDecisionThreshold()

void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setDecisionThreshold ( double  thresh)

Sets the value of decision threshold.

◆ setDefaultLearningRate()

void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setDefaultLearningRate ( double  lr)

Sets the learning rate of the algorithm.

◆ setMaxFeatures()

void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setMaxFeatures ( int  maxFeatures)

Sets total number of distinct colors to maintain in histogram.

◆ setMaxVal()

void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setMaxVal ( double  val)

Sets the maximum value taken on by pixels in image sequence.

◆ setMinVal()

void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setMinVal ( double  val)

Sets the minimum value taken on by pixels in image sequence.

◆ setNumFrames()

void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setNumFrames ( int  nframes)

Sets the number of frames used to initialize background model.

◆ setQuantizationLevels()

void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setQuantizationLevels ( int  nlevels)

Sets the parameter used for quantization of color-space.

◆ setSmoothingRadius()

void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setSmoothingRadius ( int  radius)

Sets the kernel radius used for morphological operations.

◆ setUpdateBackgroundModel()

void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setUpdateBackgroundModel ( bool  update)

Sets the status of background model update.


The documentation for this class was generated from the following file: