public override Bitmap processImage(Bitmap sourceImage, BackgroundWorker worker) { Bitmap resultImage = new Bitmap(sourceImage.Width, sourceImage.Height); Filters filter1 = new MedianFilter(); resultImage = filter1.processImage(sourceImage, worker); Filters filter2 = new BoundFilter(); resultImage = filter2.processImage(resultImage, worker); Filters filter3 = new MaxFilter(); resultImage = filter3.processImage(resultImage, worker); return(resultImage); }
private void medianToolStripMenuItem_Click(object sender, EventArgs e) { Filters filter = new MedianFilter(); backgroundWorker1.RunWorkerAsync(filter); }