/// <summary> /// /// </summary> /// <param name="history"></param> /// <param name="nMixtures"></param> /// <param name="backgroundRatio"></param> /// <param name="noiseSigma"></param> /// <returns></returns> public static BackgroundSubtractorMOG Create( int history = 200, int nMixtures = 5, double backgroundRatio = 0.7, double noiseSigma = 0) { IntPtr ptr = NativeMethods.bgsegm_createBackgroundSubtractorMOG( history, nMixtures, backgroundRatio, noiseSigma); return(new BackgroundSubtractorMOG(ptr)); }
/// <summary> /// Creates mixture-of-gaussian background subtractor /// </summary> /// <param name="history">Length of the history.</param> /// <param name="nMixtures">Number of Gaussian mixtures.</param> /// <param name="backgroundRatio">Background ratio.</param> /// <param name="noiseSigma">Noise strength (standard deviation of the brightness or each color channel). 0 means some automatic value.</param> /// <returns></returns> public static BackgroundSubtractorMOG Create( int history = 200, int nMixtures = 5, double backgroundRatio = 0.7, double noiseSigma = 0) { NativeMethods.HandleException( NativeMethods.bgsegm_createBackgroundSubtractorMOG( history, nMixtures, backgroundRatio, noiseSigma, out var ptr)); return(new BackgroundSubtractorMOG(ptr)); }