public byte[,] Close()
        {
            Console.WriteLine("[Morphology]      Initiating Closing...");
            // Dilation without a mask
            MorphologicalFilter f1 = new Dilation(this.Kernel, 1);
            var image = f1.Morph(this.Input, MorphologicalFilter.UseMask.No);

            // Erosion with a mask
            MorphologicalFilter f2 = new Erosion(this.Kernel, 1);

            image = f2.Morph(image, this._e);

            return(image);
        }
Exemple #2
0
        public byte[,] Open(float grayScaleMaximum = 255)
        {
            if (grayScaleMaximum <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(grayScaleMaximum));
            }
            Console.WriteLine("[Morphology]      Initiating Opening...");

            // Erosion without a mask
            MorphologicalFilter f1 = new Erosion(this.Kernel, 1);
            var image = f1.Morph(this.Input, MorphologicalFilter.UseMask.No);

            // Dilation with a mask
            MorphologicalFilter f2 = new Dilation(this.Kernel, 1);

            image = f2.Morph(image, this._e);

            return(image);
        }