예제 #1
0
파일: Form1.cs 프로젝트: BoytsovVA/CG_lab1
        private void тиснениеToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Filters filter   = new GrayScaleFilter();
            Bitmap  newImage = (filter.processImage(image));

            image = newImage;

            filter   = new EmbossingFilter(newImage);
            newImage = (filter.processImage(image));
            image    = newImage;


            backgroundWorker1.RunWorkerAsync(filter);
        }
예제 #2
0
        private void bWГистограммаToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Filters filter   = new GrayScaleFilter();
            Bitmap  palImage = filter.processImage(image);

            int[] histogram = new int[256];
            for (int x = 0; x < image.Width; x++)
            {
                for (int y = 0; y < image.Height; y++)
                {
                    histogram[palImage.GetPixel(x, y).R]++;
                }
            }
            HistogramWindowcs histogramView = new HistogramWindowcs();

            histogramView.ShowIntensityHistogram(histogram);
        }