Esempio n. 1
0
        public Bitmap ToWaterWave(Bitmap Im)
        {
            AForge.Imaging.Filters.WaterWave Img = new WaterWave();
            Bitmap bmImage = AForge.Imaging.Image.Clone(new Bitmap(Im), PixelFormat.Format24bppRgb);

            return(Img.Apply(bmImage));
        }
Esempio n. 2
0
        public Bitmap WaterWaveFilter(Bitmap img)
        {
            WaterWave filter = new WaterWave();

            filter.HorizontalWavesCount     = 10;
            filter.HorizontalWavesAmplitude = 5;
            filter.VerticalWavesCount       = 3;
            filter.VerticalWavesAmplitude   = 15;
            return(filter.Apply(img));
        }
Esempio n. 3
0
        private void applyfilter(int a, int b, int c, int d)
        {
            imgcopy = imgcopy1;

            WaterWave filter = new WaterWave();

            filter.HorizontalWavesCount     = a;
            filter.HorizontalWavesAmplitude = b;
            filter.VerticalWavesCount       = c;
            filter.VerticalWavesAmplitude   = d;
            imgcopy = filter.Apply(imgcopy);
            MainForm.getMainForm.pictureBox1ImagePreview.Image = imgcopy;
        }
        //apply 1-3 waves
        private static Bitmap Wave(Bitmap image)
        {
            var h = (int)(r.NextDouble() * 3);
            var v = (int)(r.NextDouble() * 3);

            WaterWave filter = new WaterWave();

            filter.HorizontalWavesCount     = h;
            filter.HorizontalWavesAmplitude = 1;
            filter.VerticalWavesCount       = v;
            filter.VerticalWavesAmplitude   = 1;
            // apply the filter
            return(filter.Apply(image));
        }
Esempio n. 5
0
 private void btn_filter3_Click(object sender, EventArgs e)
 {
     AForge.Imaging.Filters.WaterWave filter = new WaterWave();
     pictureBox1.Image = filter.Apply((Bitmap)pictureBox1.Image);
 }