weight, weight, weight, weight,
weight, weight, weight, weight,
weight, weight, weight, weight,
weight, weight, weight, weight,
};
op = new ConvolveOp(new Kernel(4, 4, blurKernel), ConvolveOp.EDGE_NO_OP, null);
}
else {
final float weight = 1.0f/18.0f;
final float[] blurKernel = {
1*weight, 2*weight, 1*weight,
2*weight, 6*weight, 2*weight,
1*weight, 2*weight, 1*weight
};
op = new ConvolveOp(new Kernel(3, 3, blurKernel), ConvolveOp.EDGE_NO_OP, null);
}
BufferedImage blured = op.createCompatibleDestImage(bi, bi.getColorModel());
op.filter(bi, blured);