OpenCvSharp.Cv2.Filter2D C# (CSharp) Method

Filter2D() public static method

Convolves an image with the kernel
public static Filter2D ( InputArray src, OutputArray dst, MatType ddepth, InputArray kernel, System.Point anchor = null, double delta, BorderTypes borderType = BorderTypes.Default ) : void
src InputArray The source image
dst OutputArray The destination image. It will have the same size and the same number of channels as src
ddepth MatType The desired depth of the destination image. If it is negative, it will be the same as src.depth()
kernel InputArray Convolution kernel (or rather a correlation kernel), /// a single-channel floating point matrix. If you want to apply different kernels to /// different channels, split the image into separate color planes using split() and process them individually
anchor System.Point The anchor of the kernel that indicates the relative position of /// a filtered point within the kernel. The anchor should lie within the kernel. /// The special default value (-1,-1) means that the anchor is at the kernel center
delta double The optional value added to the filtered pixels before storing them in dst
borderType BorderTypes The pixel extrapolation method
return void
        public static void Filter2D(
            InputArray src, OutputArray dst, MatType ddepth,
	        InputArray kernel, Point? anchor = null, double delta = 0, 
            BorderTypes borderType = BorderTypes.Default)
        {
            if (src == null)
                throw new ArgumentNullException(nameof(src));
            if (dst == null)
                throw new ArgumentNullException(nameof(dst));
            if (kernel == null)
                throw new ArgumentNullException(nameof(kernel));
            src.ThrowIfDisposed();
            dst.ThrowIfNotReady();
            kernel.ThrowIfDisposed();
            Point anchor0 = anchor.GetValueOrDefault(new Point(-1, -1));
            NativeMethods.imgproc_filter2D(src.CvPtr, dst.CvPtr, ddepth, kernel.CvPtr, 
                anchor0, delta, (int)borderType);
            GC.KeepAlive(src);
            dst.Fix();
        }
        #endregion
Cv2