OpenCvSharp.Cv2.TextureFlattening C# (CSharp) Method

TextureFlattening() public static method

By retaining only the gradients at edge locations, before integrating with the Poisson solver, one washes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge Detector is used.
public static TextureFlattening ( InputArray src, InputArray mask, OutputArray dst, float lowThreshold = 30, float highThreshold = 45, int kernelSize = 3 ) : void
src InputArray Input 8-bit 3-channel image.
mask InputArray Input 8-bit 1 or 3-channel image.
dst OutputArray Output image with the same size and type as src.
lowThreshold float Range from 0 to 100.
highThreshold float Value > 100.
kernelSize int The size of the Sobel kernel to be used.
return void
        public static void TextureFlattening(
            InputArray src, InputArray mask, OutputArray dst,
            float lowThreshold = 30, float highThreshold = 45,
            int kernelSize = 3)
        {
            if (src == null)
                throw new ArgumentNullException(nameof(src));
            if (dst == null) 
                throw new ArgumentNullException(nameof(dst));

            src.ThrowIfDisposed();
            dst.ThrowIfNotReady();
            if (mask != null)
                mask.ThrowIfDisposed();

            NativeMethods.photo_textureFlattening(
                src.CvPtr, ToPtr(mask), dst.CvPtr, lowThreshold, highThreshold, kernelSize);

            GC.KeepAlive(src);
            GC.KeepAlive(mask);
            dst.Fix();
        }
Cv2