/// <summary> /// Compass convolution filter. /// <para>Accord.NET internal call. See <see cref="Accord.Imaging.Filters.CompassConvolution"/> for details.</para> /// </summary> /// <typeparam name="TColor">Color type.</typeparam> /// <param name="img">Image.</param> /// <param name="masks">Convolution masks.</param> /// <returns>Processed image.</returns> public static TColor[,] CompassConvolution <TColor>(this TColor[,] img, int[][,] masks) where TColor : struct, IColor { CompassConvolution cc = new CompassConvolution(masks); return(img.ApplyFilter(cc)); }
/// <summary> /// Compass convolution filter. /// <para>Accord.NET internal call. See <see cref="Accord.Imaging.Filters.CompassConvolution"/> for details.</para> /// </summary> /// <typeparam name="TColor">Color type.</typeparam> /// <typeparam name="TDepth">Channel type.</typeparam> /// <param name="img">Image.</param> /// <param name="masks">Convolution masks.</param> /// <returns>Processed image.</returns> public static Image <TColor, TDepth> CompassConvolution <TColor, TDepth>(this Image <TColor, TDepth> img, int[][,] masks) where TColor : IColor where TDepth : struct { CompassConvolution cc = new CompassConvolution(masks); return(img.ApplyFilter(cc)); }