コード例 #1
0
        private void BrightnessContrastForm_Load(object sender, EventArgs e)
        {
            try
            {
                int width, height;
                small_current = new TypicalImage(current_image);
                if (small_current.get_width() > 200 || small_current.get_height() > 200)
                {
                    if (small_current.get_width() > small_current.get_height())
                    {
                        width  = 200;
                        height = (width * small_current.get_height()) / small_current.get_width();
                    }
                    else
                    {
                        height = 200;
                        width  = (height * small_current.get_width()) / small_current.get_height();
                    }

                    small_current.resize(width, height);
                }
                this.Original.Image = this.small_current.get_bitmap();
                this.Adjusted.Image = this.small_current.get_bitmap();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #2
0
        public void brightness_contrast()
        {
            BrightnessContrastForm brightness_contrast_form = new BrightnessContrastForm();

            brightness_contrast_form.current_image = this.opened_image;
            brightness_contrast_form.ShowDialog(this);
            this.opened_image = brightness_contrast_form.current_image;
            set_new_image();
        }
コード例 #3
0
        public void smooth()
        {
            SmoothForm smoothForm = new SmoothForm();

            smoothForm.img = this.opened_image;
            smoothForm.ShowDialog(this);
            this.opened_image = smoothForm.img;
            this.set_new_image();
        }
コード例 #4
0
        public void bitplane()
        {
            BitPlaneForm bitPlaneForm = new BitPlaneForm();

            bitPlaneForm.source = this.opened_image;
            bitPlaneForm.ShowDialog(this);
            this.opened_image = bitPlaneForm.source;
            set_new_image();
        }
コード例 #5
0
        public void gamma_correction()
        {
            GammaForm gamma_correction_form = new GammaForm();

            gamma_correction_form.current_image = this.opened_image;
            gamma_correction_form.ShowDialog(this);
            this.opened_image = gamma_correction_form.current_image;
            set_new_image();
        }
コード例 #6
0
        public void custom_filter()
        {
            CustomFilterForm customFilter = new CustomFilterForm();

            customFilter.img = this.opened_image;
            customFilter.ShowDialog(this);
            this.opened_image = customFilter.img;
            set_new_image();
        }
コード例 #7
0
        public void transformation()
        {
            TransformationsForm trans_form = new TransformationsForm();

            trans_form.working_on = this.opened_image;
            trans_form.ShowDialog(this);
            this.opened_image = trans_form.working_on;
            set_new_image();
        }
コード例 #8
0
ファイル: BitPlaneForm.cs プロジェクト: MohamedHosnie/IP-FCIS
 private void buttonOK_Click(object sender, EventArgs e)
 {
     try
     {
         source = source.bitplane_slicing(Color.FromArgb(R, G, B));
         this.Hide();
     } catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #9
0
 private void buttonOK_Click(object sender, EventArgs e)
 {
     try
     {
         img = edited;
         this.Close();
     } catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #10
0
 private void dropListImage2_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         second            = new TypicalImage(images_array[dropListImage2.SelectedIndex]);
         SecondImage.Image = second.get_bitmap();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #11
0
ファイル: GammaForm.cs プロジェクト: MohamedHosnie/IP-FCIS
 private void buttonOK_Click(object sender, EventArgs e)
 {
     try
     {
         current_image = current_image.change_gamma(Convert.ToDouble(this.numericGamma.Value));
         this.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #12
0
 private void dropListImage1_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         first            = new TypicalImage(images_array[dropListImage1.SelectedIndex]);
         FirstImage.Image = first.get_bitmap();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #13
0
 private void SharpForm_Load(object sender, EventArgs e)
 {
     try
     {
         Original.Image             = img.get_bitmap();
         comboBoxpost.SelectedIndex = 0;
         edited = new TypicalImage(img);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #14
0
 private void buttonOK_Click(object sender, EventArgs e)
 {
     try
     {
         current_image = current_image.change_brightness(Convert.ToInt32(this.numericBrightness.Value));
         current_image = current_image.change_contrast(Convert.ToInt32(this.numericContrast.Value));
         this.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #15
0
ファイル: SmoothForm.cs プロジェクト: MohamedHosnie/IP-FCIS
        private void meanSmooth_Click(object sender, EventArgs e)
        {
            try
            {
                bluredimg = img.meanFilter(
                    int.Parse(meanWidth.Text),
                    int.Parse(meanHeight.Text),
                    int.Parse(meanOrigix.Text),
                    int.Parse(meanOriginy.Text)
                    );

                pictureBoxResult.Image = bluredimg.get_bitmap();
            } catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #16
0
        private void buttonOK_Click(object sender, EventArgs e)
        {
            try
            {
                PictureForm new_picture = new PictureForm();
                result.id = TypicalImage.get_an_id();
                result.set_file_name("Image" + result.id + "." + first.get_extension());
                new_picture.opened_image = result;
                Program.mainForm.open_this_mdi_picture(new_picture);
                new_picture.Activate();

                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #17
0
ファイル: SmoothForm.cs プロジェクト: MohamedHosnie/IP-FCIS
 private void guassianButton_Click(object sender, EventArgs e)
 {
     try
     {
         if (gaussianSize.Text == "")
         {
             bluredimg = img.gaussianFilter2(int.Parse(sigma.Text));
             pictureBoxResult.Image = bluredimg.get_bitmap();
         }
         else
         {
             bluredimg = img.gaussianFilter1(int.Parse(sigma.Text), int.Parse(gaussianSize.Text));
             pictureBoxResult.Image = bluredimg.get_bitmap();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #18
0
ファイル: BitPlaneForm.cs プロジェクト: MohamedHosnie/IP-FCIS
        private void BitPlaneForm_Load(object sender, EventArgs e)
        {
            try
            {
                int width, height;
                image = new TypicalImage(source);
                if (image.get_width() > 250 || image.get_height() > 250)
                {
                    if (image.get_width() > image.get_height())
                    {
                        width  = 250;
                        height = (width * image.get_height()) / image.get_width();
                    }
                    else
                    {
                        height = 250;
                        width  = (height * image.get_width()) / image.get_height();
                    }

                    image.resize(width, height);
                }
                this.Original.Image = this.image.get_bitmap();
                this.Result.Image   = this.image.get_bitmap();

                loadData();
                int counter = 0;
                for (int i = 0; i < colors.Count; i++)
                {
                    for (int j = 0; j < mask.Count; j++)
                    {
                        pictureBox_array[counter].Image = image.bitplane(colors[i], mask[j]).get_bitmap();
                        counter++;
                    }
                }

                actions();
            } catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #19
0
 public void sharp()
 {
     this.opened_image = this.opened_image.laplacianFilter();
     this.set_new_image();
 }
コード例 #20
0
 public void horizontal_edge()
 {
     this.opened_image = this.opened_image.horizontal_sobel_filter();
     this.set_new_image();
 }
コード例 #21
0
 public void vertical_edge()
 {
     this.opened_image = this.opened_image.vertical_sobel_filter();
     this.set_new_image();
 }
コード例 #22
0
 public void magnitude_edge()
 {
     this.opened_image = this.opened_image.edge_magnitude();
     this.set_new_image();
 }