示例#1
0
        public Bitmap ToSaltAndPepperNoise(Bitmap Im)
        {
            AForge.Imaging.Filters.SaltAndPepperNoise Img = new SaltAndPepperNoise();
            Bitmap bmImage = AForge.Imaging.Image.Clone(new Bitmap(Im), PixelFormat.Format24bppRgb);

            return(Img.Apply(bmImage));
        }
示例#2
0
        //default noiseAmount=10
        public static Bitmap SaltAndPepper(Bitmap sourceImage, double noiseAmount)
        {
            var filter = new SaltAndPepperNoise(noiseAmount);

            return(filter.Apply(sourceImage));
        }