Beispiel #1
0
        private void 蓝_CheckedChanged(object sender, EventArgs e)
        {
            checkPictureBox1();
            if (!valid || pictureBox2.Image == null)
            {
                return;
            }
            Bitmap bit = new Bitmap(pictureBox1.Image);

            pictureBox3.Image = GraphicClass.drawColorHistogram(bit, Color.Blue);
            pictureBox4.Image = GraphicClass.drawColorHistogram((Bitmap)pictureBox2.Image, Color.Blue);
        }
Beispiel #2
0
        private void rGB平均均衡化ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            checkPictureBox1();
            if (!valid)
            {
                return;
            }

            Bitmap bit = new Bitmap(pictureBox1.Image);

            pictureBox2.Refresh();
            // 使用平均直方图进行均衡化
            pictureBox2.Image = GraphicClass.ColorEqualization(bit, 1);

            red_radio.Visible   = false;
            green_radio.Visible = false;
            blue_radio.Visible  = false;
            pictureBox3.Image   = GraphicClass.drawColorHistogram(bit, Color.Red, true);
            pictureBox4.Image   = GraphicClass.drawColorHistogram((Bitmap)pictureBox2.Image, Color.Red, true);
        }
Beispiel #3
0
        private void rGB分别均衡化ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            checkPictureBox1();
            if (!valid)
            {
                return;
            }

            Bitmap bit = new Bitmap(pictureBox1.Image);

            pictureBox2.Refresh();
            // 根据RGB的三个分量分别均衡化
            pictureBox2.Image = GraphicClass.ColorEqualization(bit, 0);

            // 画出三个分量均衡化前后的直方图
            red_radio.Visible   = true;
            green_radio.Visible = true;
            blue_radio.Visible  = true;
            red_radio.Checked   = true;
            pictureBox3.Image   = GraphicClass.drawColorHistogram(bit, Color.Red);
            pictureBox4.Image   = GraphicClass.drawColorHistogram((Bitmap)pictureBox2.Image, Color.Red);
        }