예제 #1
0
        private void button7_Click(object sender, EventArgs e)
        {
            Bitmap noiseBmp;

            ProcessFunctions.AddPepperSalt(bitmap, 0.2, 0.2, out noiseBmp);
            pictureBox1.Image = ToolFunctions.GetThumbnail((Bitmap)noiseBmp.Clone(), pictureBox1.Height, pictureBox1.Width) as Image;
            //Bitmap cleanBmp;
            //ProcessFunctions.MedianFilter(noiseBmp, out cleanBmp);
            //pictureBox2.Image = ToolFunctions.GetThumbnail((Bitmap)cleanBmp.Clone(), pictureBox2.Height, pictureBox2.Width) as Image;
        }
예제 #2
0
        private void Button_Add_Pepper_Click(object sender, System.EventArgs e)
        {
            label_state.Text      = "Processing";
            label_state.BackColor = Color.Yellow;
            Button b = (Button)sender;

            b.Enabled = false;
            Bitmap newBmp;

            ProcessFunctions.AddPepperSalt(noise_oldBmp, ((float)trackBar_Pa.Value) / 10, ((float)trackBar_Pb.Value) / 10, out newBmp);
            this.pictureBox_WorkPlace.Image = ToolFunctions.GetThumbnail((Bitmap)newBmp.Clone(), pictureBox_WorkPlace.Height, pictureBox_WorkPlace.Width) as Image;
            noise_oldBmp          = newBmp;
            b.Enabled             = true;
            label_state.Text      = "Finish";
            label_state.BackColor = Color.Green;
        }