/// <summary>
 /// Creates instance from raw T*
 /// </summary>
 /// <param name="ptr"></param>
 internal static new BackgroundSubtractorMOG2 FromRawPtr(IntPtr ptr)
 {
     if (ptr == IntPtr.Zero)
         throw new OpenCvSharpException("Invalid BackgroundSubtractorMOG2 pointer");
     var obj = new BackgroundSubtractorMOG2(null, ptr);
     return obj;
 }
        /// <summary>
        /// Creates instance from raw T*
        /// </summary>
        /// <param name="ptr"></param>
        internal static new BackgroundSubtractorMOG2 FromRawPtr(IntPtr ptr)
        {
            if (ptr == IntPtr.Zero)
            {
                throw new OpenCvSharpException("Invalid BackgroundSubtractorMOG2 pointer");
            }
            var obj = new BackgroundSubtractorMOG2(null, ptr);

            return(obj);
        }