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; using AForge.Imaging.Filters; using AForge.Math; namespace winForm1 { public partial class Form1 : Form { Bitmap image; // Global Bitmap private bool _drawRect = false; private bool _drawCircle = false; public Form1() { InitializeComponent(); pictureBox1.Paint += new PaintEventHandler(this.pictur...
https://rdmilligan.wordpress.com/2015/05/31/getting-started-with-aforge-net/
답글삭제using System;
답글삭제using System.Drawing;
using System.Windows.Forms;
using AForge;
using AForge.Imaging.Filters;
namespace tt
{
class MainClass
{
public static void Main(string[] args)
{
// load image
var image = (Bitmap)Image.FromFile(@"/Users/kerb/lena.jpg");
// apply filter
var structuringElement = new short[5, 5] { { 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1 } };
Opening filter = new Opening(structuringElement);
var filteredImage = filter.Apply(image);
// save image
filteredImage.Save(@"/Users/kerb/filtered_space.jpg");
Console.Write("Good~!");
}
}
}