public Form1() { InitializeComponent(); ConvFilter = new ConvolutionBasedFilter(); imageThreshold = new Thresholding(); morphImage = new Morphology(); }
private void slowToolStripMenuItem_Click(object sender, EventArgs e) { WindowSizeDialog windowDialog = new WindowSizeDialog(this); if (windowDialog.ShowDialog() == DialogResult.OK) { ConvFilter = new ConvolutionBasedFilter(windowHeight,windowWidth); Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); picBox_NewBtmp.Image = ConvFilter.OriginalSmooting(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; } }