Ejemplo n.º 1
0
        private void average5x5ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int[,] kernel = { { 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1 } };
            Bitmap b = new Bitmap((Bitmap)this.pbInput.Image);

            pbOutput.Image = OlahCitra.filter(kernel, b, 25, progressBar1, 2);
        }
Ejemplo n.º 2
0
        private void unsharpMasking5x5ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int[,] kernel = { { 1, 4, 6, 4, 1 }, { 4, 16, 24, 16, 4 }, { 6, 24, -476, 24, 6 }, { 4, 16, 24, 16, 4 }, { 1, 4, 6, 4, 1 } };
            Bitmap b                   = new Bitmap((Bitmap)this.pbInput.Image);
            int    divider             = -256;
            int    startFromCoordinate = 2;

            pbOutput.Image = OlahCitra.filter(kernel, b, divider, progressBar1, startFromCoordinate);
        }
Ejemplo n.º 3
0
        private void gaussianBlurToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int[,] kernel = { { 1, 2, 1 }, { 2, 4, 2 }, { 1, 2, 1 } };
            Bitmap b                   = new Bitmap((Bitmap)this.pbInput.Image);
            int    divider             = 16;
            int    startFromCoordinate = 1;

            pbOutput.Image = OlahCitra.filter(kernel, b, divider, progressBar1, startFromCoordinate);
        }
Ejemplo n.º 4
0
        private void sharpenToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int[,] kernel = { { 0, -1, 0 }, { -1, 5, -1 }, { 0, -1, 0 } };
            Bitmap b                   = new Bitmap((Bitmap)this.pbInput.Image);
            int    divider             = 1;
            int    startFromCoordinate = 1;

            pbOutput.Image = OlahCitra.filter(kernel, b, divider, progressBar1, startFromCoordinate);
        }