Ejemplo n.º 1
0
        private void kirsch算子ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (pictureBox1.Image == null)
            {
                return;
            }

            Bitmap bit     = new Bitmap(pictureBox1.Image);
            Bitmap graybit = GraphicClass.convertRGB2Gray(bit);

            PassValueForm form = new PassValueForm();

            form.Owner       = this;
            form.Description = "输入阙值";
            DialogResult result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                pictureBox2.Refresh();
                double value1 = Convert.ToDouble(form.Value);

                pictureBox2.Image = GraphicClass.kirsch(graybit, value1);
            }
        }