OpenCV for Unity
2.6.3
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
|
Background Subtractor module based on the algorithm given in [Gold2012] . More...
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] |
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.
|
static |
|
protectedvirtual |
Reimplemented from OpenCVForUnity.VideoModule.BackgroundSubtractor.
double OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getBackgroundPrior | ( | ) |
Returns the prior probability that each individual pixel is a background pixel.
double OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getDecisionThreshold | ( | ) |
Returns the value of decision threshold.
Decision value is the value above which pixel is determined to be FG.
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.
int OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getMaxFeatures | ( | ) |
Returns total number of distinct colors to maintain in histogram.
double OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getMaxVal | ( | ) |
Returns the maximum value taken on by pixels in image sequence. e.g. 1.0 or 255.
double OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getMinVal | ( | ) |
Returns the minimum value taken on by pixels in image sequence. Usually 0.
int OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getNumFrames | ( | ) |
Returns the number of frames used to initialize background model.
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.
int OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getSmoothingRadius | ( | ) |
Returns the kernel radius used for morphological operations.
bool OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.getUpdateBackgroundModel | ( | ) |
Returns the status of background model update.
void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setBackgroundPrior | ( | double | bgprior | ) |
Sets the prior probability that each individual pixel is a background pixel.
void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setDecisionThreshold | ( | double | thresh | ) |
Sets the value of decision threshold.
void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setDefaultLearningRate | ( | double | lr | ) |
Sets the learning rate of the algorithm.
void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setMaxFeatures | ( | int | maxFeatures | ) |
Sets total number of distinct colors to maintain in histogram.
void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setMaxVal | ( | double | val | ) |
Sets the maximum value taken on by pixels in image sequence.
void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setMinVal | ( | double | val | ) |
Sets the minimum value taken on by pixels in image sequence.
void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setNumFrames | ( | int | nframes | ) |
Sets the number of frames used to initialize background model.
void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setQuantizationLevels | ( | int | nlevels | ) |
Sets the parameter used for quantization of color-space.
void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setSmoothingRadius | ( | int | radius | ) |
Sets the kernel radius used for morphological operations.
void OpenCVForUnity.BgsegmModule.BackgroundSubtractorGMG.setUpdateBackgroundModel | ( | bool | update | ) |
Sets the status of background model update.