Ejemplo n.º 1
0
        private void Log_algorithm_Click(object sender, EventArgs e)
        {
            PictureProcess pictureprocess = new PictureProcess();

            pictureBox2.BackgroundImage = pictureprocess.Log_Filter((Bitmap)pictureBox2.BackgroundImage);

            //把新的圖片狀態放進去stack裡面
            picture_stack.Push((Bitmap)pictureBox2.BackgroundImage);
        }
Ejemplo n.º 2
0
        private void minus_Click(object sender, EventArgs e)
        {
            PictureProcess pictureprocess = new PictureProcess();

            pictureBox2.BackgroundImage = pictureprocess.Negative_Picture((Bitmap)pictureBox2.BackgroundImage);

            //把新的圖片狀態放進去stack裡面
            picture_stack.Push((Bitmap)pictureBox2.BackgroundImage);
        }
Ejemplo n.º 3
0
        private void min_grayscale_Click(object sender, EventArgs e)
        {
            PictureProcess pictureprocess = new PictureProcess();

            pictureBox2.BackgroundImage = pictureprocess.min_GrayScale((Bitmap)pictureBox2.BackgroundImage);

            //把新的圖片狀態放進去stack裡面
            picture_stack.Push((Bitmap)pictureBox2.BackgroundImage);
        }
Ejemplo n.º 4
0
        private void Weight_Gray_Click(object sender, EventArgs e)
        {
            PictureProcess w_gray = new PictureProcess();

            pictureBox2.BackgroundImage = w_gray.weight_GrayScale((Bitmap)pictureBox2.BackgroundImage, 0.299, 0.587, 0.114);

            //更新新的width x height
            label2.Text = "編輯後" + w_gray.get_widthxHeight((Bitmap)pictureBox2.BackgroundImage);

            //把新的圖片狀態放進去stack裡面
            picture_stack.Push((Bitmap)pictureBox2.BackgroundImage);
        }
Ejemplo n.º 5
0
        private void Max_Gray_Click(object sender, EventArgs e)
        {
            //最大值 灰階
            PictureProcess max_gray     = new PictureProcess();
            Bitmap         n_background = max_gray.max_Grayscale((Bitmap)pictureBox2.BackgroundImage);

            pictureBox2.BackgroundImage = n_background;

            //更新新的width x height
            label2.Text = "編輯後" + max_gray.get_widthxHeight((Bitmap)pictureBox2.BackgroundImage);

            //把新的圖片狀態放進去stack裡面
            picture_stack.Push((Bitmap)pictureBox2.BackgroundImage);
        }
Ejemplo n.º 6
0
        private void RGBget_Click(object sender, EventArgs e)
        {
            PictureProcess m_p = new PictureProcess();

            //RGB長條圖
            R_dis.BackgroundImage = m_p.R_trans((Bitmap)pictureBox2.BackgroundImage);
            G_dis.BackgroundImage = m_p.G_trans((Bitmap)pictureBox2.BackgroundImage);
            B_dis.BackgroundImage = m_p.B_trans((Bitmap)pictureBox2.BackgroundImage);

            //分離RGB
            m_p.separate_RGB((Bitmap)pictureBox2.BackgroundImage);
            R_only.BackgroundImage = m_p.get_sep_R();
            G_only.BackgroundImage = m_p.get_sep_G();
            B_only.BackgroundImage = m_p.get_sep_B();
        }
Ejemplo n.º 7
0
        private void button3_Click(object sender, EventArgs e)
        {
            PictureProcess change_size = new PictureProcess();

            //get width and height
            string str_width = m_width.Text.ToString(), str_height = m_height.Text.ToString();
            int    int_width = Int32.Parse(str_width), int_height = Int32.Parse(str_height);

            pictureBox2.BackgroundImage = change_size.Resize((Bitmap)pictureBox2.BackgroundImage, int_width, int_height);

            //更新改變後 label的width x height
            label2.Text = "修改後" + change_size.get_widthxHeight((Bitmap)pictureBox2.BackgroundImage);

            //把新的圖片狀態放進去stack裡面
            picture_stack.Push((Bitmap)pictureBox2.BackgroundImage);
        }