高斯模糊的Java实现

Posted 尼玛范爷

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了高斯模糊的Java实现相关的知识,希望对你有一定的参考价值。

1、http://jhlabs.com/ip/index.html

public static byte[] blur(byte[] data) throws IOException {
        ByteArrayInputStream bais = new ByteArrayInputStream(data);
        BufferedImage img = ImageIO.read(bais);
        GaussianFilter gaussianFilter = new GaussianFilter();
        gaussianFilter.filter(img, img);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ImageIO.write(img, "jpg", baos);
        return baos.toByteArray();
    } 

Maven地址:http://mvnrepository.com/artifact/com.jhlabs/filters

除了高斯模糊,这人还写了好多图片处理的filter,参见:http://jhlabs.com/ip/filters/index.html

2、

以上是关于高斯模糊的Java实现的主要内容,如果未能解决你的问题,请参考以下文章