Esempio n. 1
0
        private void scaleToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Images image = new Images(ProcessImage.Scaling(pictureBox1.Image, 200, 200));

            image.MdiParent = this.MdiParent;
            image.Show();
        }
Esempio n. 2
0
        private void invertImageToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Images image = new Images(ProcessImage.Inversion(this.pictureBox1.Image));

            image.Text      = this.Text + " - Inversion";
            image.MdiParent = this.MdiParent;
            image.Show();
        }
Esempio n. 3
0
        private void grayscaleToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Images image = new Images(ProcessImage.grayscalePercentage(this.pictureBox1.Image));

            image.Text      = this.Text + " - Grayscale";
            image.MdiParent = this.MdiParent;
            image.Show();
        }
Esempio n. 4
0
        private void copyImageToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Images image = new Images(ProcessImage.copy(this.pictureBox1.Image));

            image.Text      = this.Text + " - Copy";
            image.MdiParent = this.MdiParent;
            image.Show();
        }
Esempio n. 5
0
        private void otsoThresholdingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int    Thresh = OtsuThresholding.computeOriginalOtsuThresholding(ProcessImage.HistoGray(pictureBox1.Image));
            Images image  = new Images(ProcessImage.Thresholding(this.pictureBox1.Image, Thresh));

            image.Text      = this.Text + " - Threshold " + "Value: " + Thresh;
            image.MdiParent = this.MdiParent;
            image.Show();
        }
Esempio n. 6
0
        private void erode3x3ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            double[,] kernel = new double[3, 3] {
                { 1, 1, 1 },
                { 1, 1, 1 },
                { 1, 1, 1 }
            };
            Images image = new Images(ProcessImage.MorphologyErosion(this.pictureBox1.Image, kernel));

            image.Text      = this.Text + " - Erosion 3x3";
            image.MdiParent = this.MdiParent;
            image.Show();
        }
Esempio n. 7
0
 private void proceedToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         Images image = new Images(ProcessImage.medianfiltering(this.pictureBox1.Image, toolStripComboBox1.SelectedIndex));
         image.MdiParent = this.MdiParent;
         image.Show();
     }
     catch (StackOverflowException)
     {
         MessageBox.Show("Blob Size Is Too Big!");
     }
 }
 private void countToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         int Thresh = OtsuThresholding.computeOriginalOtsuThresholding(ProcessImage.HistoGray(ProcessImage.grayscalePercentage(orig)));
         int Hold   = OtsuThresholding.computeOriginalOtsuThresholding(ProcessImage.HistoGray(ProcessImage.grayscalePercentage(temp)));
         MessageBox.Show("Number of Blobs: " + ProcessImage.BlobCountingUsingTemplateMatching(orig, temp));
     }
     catch
     {
         MessageBox.Show("Input is lacking");
     }
 }
Esempio n. 9
0
        private void dilate7x7ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            double[,] kernel = new double[7, 7] {
                { 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, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1 }
            };
            Images image = new Images(ProcessImage.MorphologyDilation7x7(this.pictureBox1.Image, kernel));

            image.Text      = this.Text + " - Dilation 7x7";
            image.MdiParent = this.MdiParent;
            image.Show();
        }
Esempio n. 10
0
 private void toolStripTextBox1_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)Keys.Enter)
     {
         try
         {
             if (Convert.ToInt32(toolStripTextBox1.Text) >= 0 || Convert.ToInt32(toolStripTextBox1.Text) <= 255)
             {
                 Images image = new Images(ProcessImage.Thresholding(this.pictureBox1.Image, Convert.ToInt32(toolStripTextBox1.Text)));
                 image.Text      = this.Text + " - Threshold";
                 image.MdiParent = this.MdiParent;
                 image.Show();
             }
             else
             {
                 MessageBox.Show("Input Must Be From 0 - 255 only!");
             }
         }
         catch (Exception)
         {
             MessageBox.Show("Invalid Input!");
         }
     }
 }
Esempio n. 11
0
 private void horizontalLayeredCountingToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MessageBox.Show("Number of Blobs: " + ProcessImage.HorizaontalLayeredScanning(pictureBox1.Image));
 }
Esempio n. 12
0
 private void countToolStripMenuItem_Click(object sender, EventArgs e)
 {
     this.pictureBox1.Image = ProcessImage.findBlobCount(this.pictureBox1.Image);
 }