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;
}
}
}
댓글
댓글 쓰기