/// <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); }
/// <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); }
/// <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); }
public extern static IntPtr cvCreateGaussianBGModel(IntPtr image, ref MCvGaussBGStatModelParams parameters);