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 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 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)); }