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(); }
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"); } }