public static Bitmap GausianBlur(Bitmap b, int size, float weight) { //ConvMatrix m = new ConvMatrix(1); //m.Pixel = nWeight; //m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = 2; //m.Factor = nWeight + 12; //return BitmapFilter.Conv3x3(b, m); GausianKernel kernel = new GausianKernel(size, weight); return(BitmapFilter.AdvConvFilter(b, kernel.Calc(), size, 0)); }
public static Bitmap GausianBlur(Bitmap b, int size, float weight) { //ConvMatrix m = new ConvMatrix(1); //m.Pixel = nWeight; //m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = 2; //m.Factor = nWeight + 12; //return BitmapFilter.Conv3x3(b, m); GausianKernel kernel = new GausianKernel(size, weight); return BitmapFilter.AdvConvFilter(b, kernel.Calc(), size, 0); }