This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GussianBlur { | |
private static final GussianBlur INSTANCE = new GussianBlur(); | |
private int sigma = 15; //通过调节该参数设置高斯模糊的模糊程度,越大越模糊 | |
private int radius = 3 * sigma; | |
private double[] kernel = new double[radius + 1]; //kernel[i]表示离中心点距离为i的权重 | |
private GussianBlur() {} | |
/** | |
* 初始化卷积核 |