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();
}