Exemplo n.º 1
0
        private void Button_Mean_Filter_Click(object sender, System.EventArgs e)
        {
            Bitmap newBmp;

            ProcessFunctions.MeanFilter(noise_oldBmp, out newBmp);
            this.pictureBox_WorkPlace.Image = ToolFunctions.GetThumbnail((Bitmap)newBmp.Clone(), pictureBox_WorkPlace.Height, pictureBox_WorkPlace.Width) as Image;
            noise_oldBmp = newBmp;
        }
Exemplo n.º 2
0
        private void button8_Click(object sender, EventArgs e)
        {
            //for (int i = 0; i < 1000; i++)
            //{
            //    double x = ProcessFunctions.GaussNoise(0,1);
            //    if(Math.Abs(x)>=1)
            //        Console.WriteLine(x);
            //}
            Bitmap noiseBmp;

            ProcessFunctions.AddGaussSalt(bitmap, out noiseBmp, new GaussParam(0, 1, 32));
            pictureBox1.Image = ToolFunctions.GetThumbnail((Bitmap)noiseBmp.Clone(), pictureBox1.Height, pictureBox1.Width) as Image;
            Bitmap cleanBmp;

            ProcessFunctions.MeanFilter(noiseBmp, out cleanBmp);
            pictureBox2.Image = ToolFunctions.GetThumbnail((Bitmap)cleanBmp.Clone(), pictureBox2.Height, pictureBox2.Width) as Image;
        }