BradleyLocalThresholding filter in AForge


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using AForge;
using AForge.Imaging.Filters;

namespace adaptiveThresholding
{
    public partial class Form1 : Form
    {

        Bitmap image;
        public Form1()
        {
            InitializeComponent();
           
        }

        // AdapThresholding button -------------------------------------------
        private void button1_Click(object sender, EventArgs e)
        {
            // create the filter
            BradleyLocalThresholding filter = new BradleyLocalThresholding();
            // apply the filter
            filter.ApplyInPlace(image);
            pictureBox2.Image = image;

            MessageBox.Show("Good Works ~");

        }

        // -------------------------------------------------------------
        private void Form1_Load(object sender, EventArgs e)
        {
            image = (Bitmap)pictureBox1.Image;
        }
    }
}

댓글

이 블로그의 인기 게시물

Draw Circle on PictureBox when Button Click - Winform

2D FFT of Gray Image by AForge