private void 逆谐波均值滤波器ToolStripMenuItem_Click(object sender, EventArgs e) { checkPictureBox1(); if (!valid) { return; } PassValueForm form = new PassValueForm(); form.setTextBox2_unvisible(); form.Owner = this; form.Description = "输入逆谐波参数Q"; DialogResult result = form.ShowDialog(); if (result == DialogResult.OK) { int parameter = Convert.ToInt32(form.Value); Bitmap bit = new Bitmap(pictureBox1.Image); pictureBox2.Refresh(); pictureBox2.Image = GraphicClass.AvgFilter(bit, 3, parameter); pictureBox3.Image = GraphicClass.drawHistogram(new Bitmap(pictureBox1.Image)); pictureBox4.Image = GraphicClass.drawHistogram(new Bitmap(pictureBox2.Image)); } }
private void 谐波均值滤波器ToolStripMenuItem_Click(object sender, EventArgs e) { checkPictureBox1(); if (!valid) { return; } Bitmap bit = new Bitmap(pictureBox1.Image); pictureBox2.Refresh(); pictureBox2.Image = GraphicClass.AvgFilter(bit, 2); pictureBox3.Image = GraphicClass.drawHistogram(new Bitmap(pictureBox1.Image)); pictureBox4.Image = GraphicClass.drawHistogram(new Bitmap(pictureBox2.Image)); }
private void 算术均值滤波器ToolStripMenuItem_Click(object sender, EventArgs e) { checkPictureBox1(); if (!valid) { return; } float temp = (float)(1.0 / 9.0); float[] a = { temp, temp, temp, temp, temp, temp, temp, temp, temp }; Bitmap bit = new Bitmap(pictureBox1.Image); pictureBox2.Refresh(); pictureBox2.Image = GraphicClass.AvgFilter(bit, 0); pictureBox3.Image = GraphicClass.drawHistogram(new Bitmap(pictureBox1.Image)); pictureBox4.Image = GraphicClass.drawHistogram(new Bitmap(pictureBox2.Image)); }