private void вОттенкахСерогоToolStripMenuItem_Click(object sender, EventArgs e) { Filters filter = new GrayScale(); backgroundWorker1.RunWorkerAsync(filter); images.Push(image); }
private void гистограммаToolStripMenuItem_Click(object sender, EventArgs e) { _ = new GrayScale(); int[][] histogram = new int[3][]; histogram[0] = new int[256]; histogram[1] = new int[256]; histogram[2] = new int[256]; for (int x = 0; x < image.Width; x++) { for (int y = 0; y < image.Height; y++) { Color sourceColor = image.GetPixel(x, y); histogram[0][sourceColor.R]++; histogram[1][sourceColor.G]++; histogram[2][sourceColor.B]++; } } Form2 histogramView = new Form2(); histogramView.ShowRGBHistogram(histogram); }
private void luminanceToolStripMenuItem_Click(object sender, EventArgs e) { myBMP.bitmap = GrayScale.Luminance(myBMP.bitmap); pictureBox1.Image = myBMP.bitmap; }
private void averagingToolStripMenuItem_Click(object sender, EventArgs e) { myBMP.bitmap = GrayScale.Averaging(myBMP.bitmap); pictureBox1.Image = myBMP.bitmap; }
private void чБToolStripMenuItem_Click(object sender, EventArgs e) { Filters filter = new GrayScale(); backgroundWorker1.RunWorkerAsync(filter); }