均值处理算法
算法思想:
计算待处理像素的周围元素的均值来代替待处理像素
数学表达式:
image[i][j] = (imgae[i-1][j-1] + image[i][j-1] + image[i+1][j-1] +
image[i-1][j] + image[i+1][j] +
image[i-1][j+1] + image[i][j+1] + image[i+1][j+1])/8代码实现:
1 | private static int meanfilter(int[][] image) { |