Last active
March 6, 2016 23:03
-
-
Save Grungeby52/1e64bb6e412abf166fc0 to your computer and use it in GitHub Desktop.
Make a Filters With Aforge Library in .NET(c#)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Controls; | |
using AForge.Genetic; | |
using AForge.Imaging.ColorReduction; | |
using AForge.Imaging.ComplexFilters; | |
using AForge.Imaging.Filters; | |
using AForge.Imaging.Textures; | |
using AForge.Math.Geometry; | |
using AForge.Math.Metrics; | |
using AForge.Math.Random; | |
using AForge.Neuro.Learning; | |
using AForge.Neuro; | |
using AForge.Video.DirectShow; | |
using AForge.Video; | |
using AForge.Vision.Motion; | |
using AForge.Vision; | |
namespace FiltersWithAforge | |
{ | |
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
} | |
private void Form1_Load(object sender, EventArgs e) | |
{ | |
pictureBox1.ImageLocation = "sample1.jpg"; | |
} | |
private void button1_Click(object sender, EventArgs e) | |
{ | |
LevelsLinear filter = new LevelsLinear(); | |
filter.InRed = new IntRange(30, 320); | |
filter.InGreen = new IntRange(50,240); | |
filter.InBlue = new IntRange(10,210); | |
Bitmap image = new Bitmap("sample1.jpg"); | |
filter.ApplyInPlace(image); | |
pictureBox2.Image = image; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment