private void размыканиеToolStripMenuItem_Click(object sender, EventArgs e) { Filter filter1 = new ErosionMask(); Filter filter2 = new DilationMask(); //Bitmap resultImage = filter1.processImage(image); //backgroundWorker1.RunWorkerAsync(filter2); oldMap.Push(image); Bitmap result = filter1.processImage(image); result = filter2.processImage(result); pictureBox1.Image = result; pictureBox1.Refresh(); }
//mat morfology private void стандартныйЭлементToolStripMenuItem_Click(object sender, EventArgs e) { Filter filter = new ErosionMask(); backgroundWorker1.RunWorkerAsync(filter); }