Пример #1
0
        private void closingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            bool[,] mask = new bool[3, 3];
            mask[0, 0]   = true;
            mask[0, 1]   = true;
            mask[0, 2]   = true;
            mask[1, 0]   = true;
            mask[1, 1]   = true;
            mask[1, 2]   = true;
            mask[2, 0]   = true;
            mask[2, 1]   = true;
            mask[2, 2]   = true;
            MathMorf close = new Closing();
            //backgroundWorker2.RunWorkerAsync(close);
            Bitmap resultImage = close.procImg(image, mask, 3, 3 /*backgroundWorker2*/);

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