Ejemplo n.º 1
0
        private void  асширениеToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Laboratory_work_1.Form2 form = new Laboratory_work_1.Form2();
            form.ShowDialog();
            Dilation filter = new Dilation();

            filter.kernelSize = form.kernelSize;
            Bitmap resultImage = filter.processImage(image);

            pictureBox1.Image = resultImage;
            pictureBox1.Refresh();
        }
Ejemplo n.º 2
0
        private void ЗакрытиеToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Laboratory_work_1.Form2 form = new Laboratory_work_1.Form2();
            form.ShowDialog();
            Dilation filter1 = new Dilation();

            filter1.kernelSize = form.kernelSize;
            Bitmap  resultImage1 = filter1.processImage(image);
            Erosion filter2      = new Erosion();

            filter2.kernelSize = form.kernelSize;
            Bitmap resultImage2 = filter2.processImage(resultImage1);

            pictureBox1.Image = resultImage2;
            pictureBox1.Refresh();
        }