private void menuItem2_Click(object sender, EventArgs e) { pictureBox2.Image = BitmapFilter.Laplacian3x3Filter(m_Bitmap, false); pictureBox2.Refresh(); pictureBox2.Invalidate(); SetHistogram(2); }
private void menuItem2_Click_1(object sender, EventArgs e) { pictureBox2.Image = BitmapFilter.equalizing(m_Bitmap); pictureBox2.Refresh(); pictureBox2.Invalidate(); SetHistogram(2); }
private void menuItem11_Click(object sender, EventArgs e) { pictureBox2.Image = BitmapFilter.Errosion((Bitmap)pictureBox1.Image, 3); pictureBox2.Refresh(); pictureBox2.Invalidate(); SetHistogram(2); }
private void Filter_GrayScale(object sender, System.EventArgs e) { pictureBox2.Image = BitmapFilter.GrayScale(m_Bitmap); pictureBox2.Refresh(); pictureBox2.Invalidate(); SetHistogram(2); }
private void swirlAntiAlias_Click(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.Swirl(m_Bitmap, .04, true)) { this.Invalidate(); } }
private void OnEmbossLaplacian(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.EmbossLaplacian(m_Bitmap)) { this.Invalidate(); } }
private void OnEdgeDetectQuick(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.EdgeDetectQuick(m_Bitmap)) { this.Invalidate(); } }
private void randomJitter_Click(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.RandomJitter(m_Bitmap, 5)) { this.Invalidate(); } }
private void Filter_GrayScale(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.GrayScale(m_Bitmap)) { this.Invalidate(); } }
private void sphereAntialias_Click(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.Sphere(m_Bitmap, true)) { this.Invalidate(); } }
private void waterAntialias_Click(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.Water(m_Bitmap, 15, false)) { this.Invalidate(); } }
private void PixelateGrid_Click(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.Pixelate(m_Bitmap, 15, true)) { this.Invalidate(); } }
private void timeWarpAntiAlias_Click(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.TimeWarp(m_Bitmap, 15, true)) { this.Invalidate(); } }
private void Moire_Click(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.Moire(m_Bitmap, 3)) { this.Invalidate(); } }
private void menuItem11_Click_1(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.Sphere(m_Bitmap, false)) { this.Invalidate(); } }
private void OnMeanRemoval(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.MeanRemoval(m_Bitmap, 9)) { this.Invalidate(); } }
private void OnGaussianBlur(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.GaussianBlur(m_Bitmap, 4)) { this.Invalidate(); } }
private void OnSharpen(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.Sharpen(m_Bitmap, 11)) { this.Invalidate(); } }
private void flipBoth_Click(object sender, System.EventArgs e) { m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.Flip(m_Bitmap, true, true)) { this.Invalidate(); } }
public static bool MeanRemoval(Bitmap b, int nWeight /* default to 9*/) { ConvMatrix m = new ConvMatrix(); m.SetAll(-1); m.Pixel = nWeight; m.Factor = nWeight - 8; return(BitmapFilter.Conv3x3(b, m)); }
public static bool Smooth(Bitmap b, int nWeight /* default to 1 */) { ConvMatrix m = new ConvMatrix(); m.SetAll(1); m.Pixel = nWeight; m.Factor = nWeight + 8; return(BitmapFilter.Conv3x3(b, m)); }
public static bool Sharpen(Bitmap b, int nWeight /* default to 11*/) { ConvMatrix m = new ConvMatrix(); m.SetAll(0); m.Pixel = nWeight; m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = -2; m.Factor = nWeight - 8; return(BitmapFilter.Conv3x3(b, m)); }
public static bool GaussianBlur(Bitmap b, int nWeight /* default to 4*/) { ConvMatrix m = new ConvMatrix(); m.SetAll(1); m.Pixel = nWeight; m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = 2; m.Factor = nWeight + 12; return(BitmapFilter.Conv3x3(b, m)); }
private void menuItem2_Click_2(object sender, EventArgs e) { TresholdInput dlg = new TresholdInput(this); if (DialogResult.OK == dlg.ShowDialog()) { pictureBox2.Image = BitmapFilter.TresholdFilter(m_Bitmap, dlg.treshold); pictureBox2.Refresh(); pictureBox2.Invalidate(); } }
public static bool EmbossLaplacian(Bitmap b) { ConvMatrix m = new ConvMatrix(); m.SetAll(-1); m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = 0; m.Pixel = 4; m.Offset = 127; return(BitmapFilter.Conv3x3(b, m)); }
public static bool EdgeDetectQuick(Bitmap b) { ConvMatrix m = new ConvMatrix(); m.TopLeft = m.TopMid = m.TopRight = -1; m.MidLeft = m.Pixel = m.MidRight = 0; m.BottomLeft = m.BottomMid = m.BottomRight = 1; m.Offset = 127; return(BitmapFilter.Conv3x3(b, m)); }
private void menuItem3_Click(object sender, EventArgs e) { RobertsInput dlg = new RobertsInput(); if (DialogResult.OK == dlg.ShowDialog()) { pictureBox2.Image = BitmapFilter.RobertsPic(m_Bitmap, dlg.gams); pictureBox2.Refresh(); pictureBox2.Invalidate(); SetHistogram(2); } }
private void Filter_Invert(object sender, System.EventArgs e) { //m_Undo = m_Bitmap.Clone() as Bitmap; //if (m_Undo == null) // return; m_Undo = (Bitmap)m_Bitmap.Clone(); if (BitmapFilter.Invert(m_Bitmap)) { this.Invalidate(); } }
private void Filter_Gamma(object sender, System.EventArgs e) { GammaInput dlg = new GammaInput(); if (DialogResult.OK == dlg.ShowDialog()) { pictureBox2.Image = BitmapFilter.Gamma(m_Bitmap, dlg.gams); pictureBox2.Refresh(); pictureBox2.Invalidate(); SetHistogram(2); } }
private void menuItem10_Click(object sender, EventArgs e) { MedianInput dlg = new MedianInput(); if (DialogResult.OK == dlg.ShowDialog()) { pictureBox2.Image = BitmapFilter.MedianFilter((Bitmap)pictureBox1.Image, dlg.gams); pictureBox2.Refresh(); pictureBox2.Invalidate(); SetHistogram(2); } }