Exemplo n.º 1
0
        /// <summary>
        /// <para>(Accord .NET internal call)</para>
        /// The Variance filter replaces each pixel in an image by its
        /// neighborhood variance. The end result can be regarded as an
        /// border enhancement, making the Variance filter suitable to
        /// be used as an edge detection mechanism.
        /// </summary>
        /// <param name="img">Image.</param>
        /// <param name="radius">The radius neighborhood used to compute a pixel's local variance.</param>
        /// <returns>Processed image.</returns>
        public static Bgra <byte>[,] Variance(this Bgra <byte>[,] img, int radius = 2)
        {
            Variance v = new Variance(radius);

            return(img.ApplyFilter(v));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Applies White Patch filter for color normalization (Accord.NET function)
        /// </summary>
        /// <param name="img">image.</param>
        /// <param name="inPlace">Apply in place or not. If it is set to true return value can be omitted.</param>
        /// <returns>Processed image.</returns>
        public static Bgra <byte>[,] WhitePatch(this Bgra <byte>[,] img, bool inPlace = true)
        {
            WhitePatch wp = new WhitePatch();

            return(img.ApplyFilter(wp, inPlace));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Gray World filter for color normalization.
        /// <para>Accord.NET internal call.</para>
        /// </summary>
        /// <param name="img">Image.</param>
        /// <param name="inPlace">Apply in place or not. If it is set to true return value can be omitted.</param>
        /// <returns>Processed image.</returns>
        public static Bgra <byte>[,] GrayWorld(this Bgra <byte>[,] img, bool inPlace = true)
        {
            GrayWorld gw = new GrayWorld();

            return(img.ApplyFilter(gw, inPlace));
        }