public static void DistanceTransform(InputArray src, OutputArray dst, DistanceTypes distanceType, DistanceMaskSize maskSize) { if (src == null) throw new ArgumentNullException(nameof(src)); if (dst == null) throw new ArgumentNullException(nameof(dst)); src.ThrowIfDisposed(); dst.ThrowIfNotReady(); NativeMethods.imgproc_distanceTransform( src.CvPtr, dst.CvPtr, (int)distanceType, (int)maskSize); GC.KeepAlive(src); dst.Fix(); } #endregion