예제 #1
0
        private void histogramToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (img == null) // verify if the image is already opened
            {
                return;
            }
            Cursor = Cursors.WaitCursor; // clock cursor

            //copy Undo Image
            imgUndo = img.Copy();

            int[] histogram1 = new int[255];
            histogram1[150] = 2000;
            histogram1[151] = 2000;
            histogram1[152] = 2000;
            int[]     histogram  = ImageClass.Histogram_Gray(img);
            Histogram histoChart = new Histogram("Gray Histogram", histogram, histogram1);

            //histoChart.chart1.Series[0].Points.DataBindY
            //            (histogram);
            //histoChart.chart1.Series[0].Points.DataBindY
            //            (histogram1);
            histoChart.ShowDialog();
            ImageViewer.Image = img.Bitmap;
            ImageViewer.Refresh();    // refresh image on the screen

            Cursor = Cursors.Default; // normal cursor
        }
예제 #2
0
        private void hIstogramToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int[] vec = ImageClass.Histogram_Gray(img);

            Form hist = new Form1(vec);

            hist.ShowDialog();
            ImageViewer.Image = img.Bitmap;
            ImageViewer.Refresh(); // refresh image on the screen
        }
예제 #3
0
        private void intensityToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (img == null) // verify if the image is already opened
            {
                return;
            }

            int[] intensity = ImageClass.Histogram_Gray(img);

            new HistogramForm(intensity).ShowDialog();
        }
예제 #4
0
        private void histogramGrayToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (img == null)
            {
                return;
            }

            Histogram grayHistogram = new Histogram(ImageClass.Histogram_Gray(img));

            grayHistogram.ShowDialog();
        }
예제 #5
0
        private void grayToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (img == null)             // verify if the image is already opened
            {
                return;
            }

            using (GrayHistogramForm form = new GrayHistogramForm(ImageClass.Histogram_Gray(img)))
            {
                form.ShowDialog();
            }
        }
        private void grayToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (img == null) // verify if the image is already opened
            {
                return;
            }
            Cursor = Cursors.WaitCursor; // clock cursor

            int [] histogram = ImageClass.Histogram_Gray(img);

            Histogram form = new Histogram(histogram);

            form.ShowDialog();
            Cursor = Cursors.Default; // normal cursor
        }
예제 #7
0
        private void GreyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (img == null) // verify if the image is already opened
            {
                return;
            }
            Cursor             = Cursors.WaitCursor; // clock cursor
            int[,] histDataRGB = ImageClass.Histogram_RGB(img);

            Form2 hist = new Form2(ImageClass.Histogram_Gray(img), histDataRGB);

            hist.ShowDialog();

            ImageViewer.Image = img.Bitmap;
            ImageViewer.Refresh();    // refresh image on the screen

            Cursor = Cursors.Default; // normal cursor
        }
예제 #8
0
        private void histogramAllToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (img == null) // verify if the image is already opened
            {
                return;
            }
            Cursor = Cursors.WaitCursor; // clock cursor

            //copy Undo Image
            imgUndo = img.Copy();


            HistogramAll form = new HistogramAll(ImageClass.Histogram_Gray(imgUndo), ImageClass.Histogram_RGB(imgUndo));

            form.ShowDialog();


            ImageViewer.Image = img.Bitmap;
            ImageViewer.Refresh();    // refresh image on the screen

            Cursor = Cursors.Default; // normal cursor
        }