Exemple #1
0
 public Form1()
 {
     InitializeComponent();
     ConvFilter = new ConvolutionBasedFilter();
     imageThreshold = new Thresholding();
     morphImage = new Morphology();
 }
Exemple #2
0
        private void adaptiveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WindowSizeDialog windowDialog = new WindowSizeDialog(this);
            if (windowDialog.ShowDialog() == DialogResult.OK)
            {
                imageThreshold = new Thresholding(windowHeight,windowWidth);
                Stopwatch stopWatch = new Stopwatch();
                stopWatch.Start();

                picBox_NewBtmp.Image = imageThreshold.applyAdaptiveThresholding(BasicFilters.ToGrayScale(oldImage));

                stopWatch.Stop();
                // Get the elapsed time as a TimeSpan value.
                TimeSpan ts = stopWatch.Elapsed;
                ProcessingTimeLabel.Text = "Processing Time : " + String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
                               ts.Hours, ts.Minutes, ts.Seconds,
                               ts.Milliseconds / 10);
                ProcessingTimeLabel.Visible = true;
            }
        }