Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="initializationFrames"></param>
        /// <param name="decisionThreshold"></param>
        /// <returns></returns>
        public static BackgroundSubtractorGMG Create(
            int initializationFrames = 120, double decisionThreshold = 0.8)
        {
            IntPtr ptr = NativeMethods.bgsegm_createBackgroundSubtractorGMG(
                initializationFrames, decisionThreshold);

            return(new BackgroundSubtractorGMG(ptr));
        }
 /// <summary>
 /// Creates a GMG Background Subtractor
 /// </summary>
 /// <param name="initializationFrames">number of frames used to initialize the background models.</param>
 /// <param name="decisionThreshold">Threshold value, above which it is marked foreground, else background.</param>
 /// <returns></returns>
 public static BackgroundSubtractorGMG Create(
     int initializationFrames = 120, double decisionThreshold = 0.8)
 {
     NativeMethods.HandleException(
         NativeMethods.bgsegm_createBackgroundSubtractorGMG(
             initializationFrames, decisionThreshold, out var ptr));
     return(new BackgroundSubtractorGMG(ptr));
 }