public static int[,] MeanBlur(this int[,] noise, int range) { int[,] matrix = new int[range, range]; for (int y = 0; y < range; y++) { for (int x = 0; x < range; x++) { matrix[y, x] = 1; } } return(noise.ApplyMatrix(matrix, SelectionMethod.Mean)); }
private void UpdateBlur() { blur = map.ApplyMatrix(matrix, SelectionMethod.Mean); pictureBox2.Image = blur.ToBitmap(); }