Пример #1
0
        private void medianaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (img == null) // verify if the image is already opened
            {
                return;
            }


            Cursor = Cursors.WaitCursor; // clock cursor

            //copy Undo Image
            imgUndo = img.Copy();


            try
            {
                ImageClass.Median(img, imgUndo);
            }
            catch { }

            ImageViewer.Image = img.Bitmap;
            ImageViewer.Refresh();    // refresh image on the screen

            Cursor = Cursors.Default; // normal cursor
        }
Пример #2
0
        private void medianToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (img == null) // protege de executar a função sem ainda ter aberto a imagem
            {
                return;
            }
            Cursor = Cursors.WaitCursor; // cursor relogio

            //copy Undo Image
            imgUndo = img.Copy();

            ImageClass.Median(img);

            ImageViewer.Refresh();    // atualiza imagem no ecrã

            Cursor = Cursors.Default; // cursor normal
        }
Пример #3
0
        private void MedianToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (img == null) // verify if the image is already opened
            {
                return;
            }

            //copy Undo Image
            imgUndo = img.Copy();

            Image <Bgr, Byte> imgCopy = img.Clone();

            ImageClass.Median(img, imgCopy);

            ImageViewer.Image = img.Bitmap;
            ImageViewer.Refresh();    // refresh image on the screen

            Cursor = Cursors.Default; // normal cursor
        }