Esempio n. 1
0
 public static Bitmap ToSepia(this Bitmap bitmap)
 {
     // create filter
     AForge.Imaging.Filters.Sepia filter = new AForge.Imaging.Filters.Sepia();
     // apply the filter
     return(filter.Apply(bitmap));
 }
Esempio n. 2
0
 public EffectsBox(System.Windows.Forms.PictureBox openedImage)
 {
     InitializeComponent();
     affectedImage.Image = openedImage.Image;
     System.Drawing.Bitmap        image  = (Bitmap)affectedImage.Image;
     AForge.Imaging.Filters.Sepia filter = new AForge.Imaging.Filters.Sepia();
     affectedImage.Image = filter.Apply(image);
 }
Esempio n. 3
0
 public EffectsBox(System.Windows.Forms.PictureBox openedImage)
 {
     InitializeComponent();
     affectedImage.Image = openedImage.Image;
     System.Drawing.Bitmap image = (Bitmap) affectedImage.Image;
     AForge.Imaging.Filters.Sepia filter = new AForge.Imaging.Filters.Sepia();
     affectedImage.Image = filter.Apply(image);
 }
Esempio n. 4
0
 public static Bitmap ToSepia(this Bitmap bitmap)
 {
     AForge.Imaging.Filters.Sepia filter = new AForge.Imaging.Filters.Sepia();
     return filter.Apply(bitmap);
 }
Esempio n. 5
0
        private void btn_uygula_Click(object sender, EventArgs e)
        {
            if (comboBox1.SelectedIndex == 0) // Gri seçildi.
            {
                Bitmap image = new Bitmap(pictureBox1.Image);
                Bitmap gri   = griYap(image);

                pictureBox2.Image = gri;
            }
            if (comboBox1.SelectedIndex == 1) // Binary seçildi.
            {
                Bitmap image  = new Bitmap(pictureBox1.Image);
                Bitmap binary = binaryYap(image);
                pictureBox2.Image = binary;
            }
            if (comboBox1.SelectedIndex == 2) // Sobel Kenar seçildi.
            {
                Bitmap image = new Bitmap(pictureBox1.Image);
                Bitmap sobel = sobelEdgeDetection(image);

                pictureBox2.Image = sobel;
            }
            if (comboBox1.SelectedIndex == 3) // Sobel Kenar seçildi.
            {
                Bitmap image  = new Bitmap(pictureBox1.Image);
                Bitmap median = medianFilter(image);

                pictureBox2.Image = median;
            }
            if (comboBox1.SelectedIndex == 4) // Sepia Fitreleme seçildi.
            {
                // load an image
                System.Drawing.Bitmap image = new Bitmap(pictureBox1.Image);
                // create filter
                AForge.Imaging.Filters.Sepia filter = new AForge.Imaging.Filters.Sepia();
                // apply filter
                System.Drawing.Bitmap newImage = filter.Apply(image);


                pictureBox2.Image = newImage;
            }
            if (comboBox1.SelectedIndex == 5) // Blur Fitreleme seçildi.
            {
                // load an image
                System.Drawing.Bitmap image = new Bitmap(pictureBox1.Image);
                // create filter
                AForge.Imaging.Filters.Blur filter = new AForge.Imaging.Filters.Blur();
                // apply filter
                System.Drawing.Bitmap newImage = filter.Apply(image);


                pictureBox2.Image = newImage;
            }
            if (comboBox1.SelectedIndex == 6) // Keskinleştirme Fitreleme seçildi.
            {
                // load an image
                System.Drawing.Bitmap image = new Bitmap(pictureBox1.Image);
                // create filter
                AForge.Imaging.Filters.Sharpen filter = new AForge.Imaging.Filters.Sharpen();
                // apply filter
                System.Drawing.Bitmap newImage = filter.Apply(image);

                pictureBox2.Image = newImage;
            }
            if (comboBox1.SelectedIndex == 7) // Hue Modifier Fitreleme seçildi.
            {
                // load an image
                System.Drawing.Bitmap image = new Bitmap(pictureBox1.Image);
                // create filter
                AForge.Imaging.Filters.HueModifier filter = new AForge.Imaging.Filters.HueModifier();
                // apply filter
                System.Drawing.Bitmap newImage = filter.Apply(image);

                pictureBox2.Image = newImage;
            }
        }
Esempio n. 6
0
 public static Bitmap ToSepia(this Bitmap bitmap)
 {
     AForge.Imaging.Filters.Sepia filter = new AForge.Imaging.Filters.Sepia();
     return(filter.Apply(bitmap));
 }