public static Bitmap UnsharpMean5x5( this Bitmap sourceBitmap, float factor = 1.0f) { Bitmap blurBitmap = ExtBitmap.ConvolutionFilter( sourceBitmap, Matrix.Mean5x5, 1.0 / 25.0); Bitmap resultBitmap = sourceBitmap.SubtractAddFactorImage( blurBitmap, factor); return(resultBitmap); }
public static Bitmap UnsharpGaussian3x3( this Bitmap sourceBitmap, float factor = 1.0f) { Bitmap blurBitmap = ExtBitmap.ConvolutionFilter( sourceBitmap, Matrix.Gaussian3x3, 1.0 / 16.0); Bitmap resultBitmap = sourceBitmap.SubtractAddFactorImage( blurBitmap, factor); return(resultBitmap); }