示例#1
0
        /// <summary>
        /// Create a MOG foreground detector
        /// </summary>
        /// <param name="parameter">The MOG foreground detector parameters</param>
        public FGDetector(MCvGaussBGStatModelParams parameter)
        {
            IntPtr p = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(MCvGaussBGStatModelParams)));

            Marshal.StructureToPtr(parameter, p, false);
            _ptr = FGDetectorInvoke.CvCreateFGDetectorBase(CvEnum.ForgroundDetectorType.Mog, p);
            Marshal.FreeHGlobal(p);
        }
示例#2
0
        /// <summary>
        /// Create a MOG foreground detector
        /// </summary>
        /// <param name="parameter">The MOG foreground detector parameters</param>
        public FGDetector(MCvGaussBGStatModelParams parameter)
        {
            IntPtr p = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(MCvGaussBGStatModelParams)));

            Marshal.StructureToPtr(parameter, p, false);
            _ptr = FGDetectorInvoke.CvCreateFGDetectorBase(CvEnum.FORGROUND_DETECTOR_TYPE.MOG, p);
            Marshal.FreeHGlobal(p);
        }
示例#3
0
 /// <summary>
 /// Create a Gaussian Background statistic model using the given parameters
 /// </summary>
 /// <param name="image">The image used for initiating the statistic model</param>
 /// <param name="parameters">GaussStatModel</param>
 public BGStatModel(Image <TColor, Byte> image, ref MCvGaussBGStatModelParams parameters)
 {
     _ptr = CvInvoke.cvCreateGaussianBGModel(image, ref parameters);
 }
示例#4
0
 public extern static IntPtr cvCreateGaussianBGModel(IntPtr image, ref MCvGaussBGStatModelParams parameters);