private void ReplicateRadioButton_CheckedChanged(object sender, EventArgs e) { borderType = Emgu.CV.CvEnum.BorderType.Replicate; }
private static extern void cveFilter2D(IntPtr src, IntPtr dst, IntPtr kernel, ref Point anchor, double delta, Emgu.CV.CvEnum.BorderType borderType);
private void IsolatedRadioButton_CheckedChanged(object sender, EventArgs e) { borderType = Emgu.CV.CvEnum.BorderType.Isolated; }
/// <summary> /// Applies arbitrary linear filter to the image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values from the nearest pixels that is inside the image /// </summary> /// <param name="src">The source image</param> /// <param name="dst">The destination image</param> /// <param name="kernel">Convolution kernel, single-channel floating point matrix. If you want to apply different kernels to different channels, split the image using cvSplit into separate color planes and process them individually</param> /// <param name="anchor">The anchor of the kernel that indicates the relative position of a filtered point within the kernel. The anchor shoud lie within the kernel. The special default value (-1,-1) means that it is at the kernel center</param> /// <param name="delta">The optional value added to the filtered pixels before storing them in dst</param> /// <param name="borderType">The pixel extrapolation method.</param> public static void Filter2D(IInputArray src, IOutputArray dst, IInputArray kernel, Point anchor, double delta = 0, Emgu.CV.CvEnum.BorderType borderType = CvEnum.BorderType.Default) { using (InputArray iaSrc = src.GetInputArray()) using (OutputArray oaDst = dst.GetOutputArray()) using (InputArray iaKernel = kernel.GetInputArray()) cveFilter2D(iaSrc, oaDst, iaKernel, ref anchor, delta, borderType); }