vendredi 27 mars 2015

Java blur Image

I am trying to blur the image



int radius = 11;
int size = radius * 2 + 1;
float weight = 1.0f / (size * size);
float[] data = new float[size * size];

for (int i = 0; i < data.length; i++) {
data[i] = weight;
}

Kernel kernel = new Kernel(size, size, data);
ConvolveOp op = new ConvolveOp(kernel, ConvolveOp.EDGE_NO_OP, null);
//tbi is BufferedImage
BufferedImage i = op.filter(tbi, null);


It will blur the image but not all portion of the image.


enter image description here


Where I am missing so that it will blur complete image. Without any path .


Aucun commentaire:

Enregistrer un commentaire