public static bool Blur(Bitmap b, int nWeight) { // Blur the image bu taking the sharp edges of the pixel differences Matrix m = new Matrix(); m.SetAll(1); m.Pixel = nWeight; m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = 2; m.Factor = nWeight + 12; return Filters.Conversion_Matrix(b, m); }
public static bool Smooth(Bitmap b, int nWeight) { //Fuction to smoothify the image with all Surrounding pixels averaged to the center pixel Matrix m = new Matrix(); m.SetAll(1); m.Pixel = nWeight; m.Factor = nWeight + 8; return Filters.Conversion_Matrix(b, m); }
public static bool Sharpen(Bitmap b, int nWeight) { //Fuction which changes the image characteristic by amplyfying the pixel weight difference //between surrounding pixels Matrix m = new Matrix(); m.SetAll(0); m.Pixel = nWeight; m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = -2; m.Factor = nWeight - 8; return Filters.Conversion_Matrix(b, m); }
public static bool MeanRemoval(Bitmap b, int nWeight) { //Opposite fuction to Sharping of Image with removal of mean value from all the pixels Matrix m = new Matrix(); m.SetAll(-1); m.Pixel = nWeight; m.Factor = nWeight - 8; return Filters.Conversion_Matrix(b, m); }