Ejemplo n.º 1
0
        public Bitmap ToAdditiveNoise(Bitmap Im)
        {
            AForge.Imaging.Filters.AdditiveNoise Img = new AdditiveNoise();
            Bitmap bmImage = AForge.Imaging.Image.Clone(new Bitmap(Im), PixelFormat.Format24bppRgb);

            return(Img.Apply(bmImage));
        }
Ejemplo n.º 2
0
        public static Bitmap AddNoiseToImage(Bitmap input)
        {
            // create random generator
            IRandomNumberGenerator generator = new UniformGenerator(new Range(-50, 50));
            // create filter
            AdditiveNoise filter = new AdditiveNoise(generator);

            // apply the filter
            return(filter.Apply(input));
        }
        //cause gaussian noise spikes
        private static Bitmap Speckle(Bitmap image)
        {
            IRandomNumberGenerator generator = new GaussianGenerator(0f, 5f);

            // create filter
            AdditiveNoise filter = new AdditiveNoise(generator);

            // apply the filter

            return(filter.Apply(image));
        }