9 Mayıs 2016 Pazartesi

ConvolveOp Sınıfı

Constructor - EDGE_NO_OP
Açıklaması şöyle
Pixels at the edge of the source image are copied to the corresponding pixels in the destination without modification.
Kenarlar hariç geri kalan alanı bulanıklaştırmak için şöyle yaparız.
int size = ...;
float[] data = new float[size * size];
//Fill data

Kernel kernel = new Kernel(size, size, data);
ConvolveOp op = new ConvolveOp(kernel, ConvolveOp.EDGE_NO_OP, null);
Constructor - EDGE_ZERO_FILL
Bulanıklaştırılan kısımın etrafındaki kenarları siyaha boyar.

filter metodu
Şöyle yaparız.
//tbi is BufferedImage
BufferedImage i = op.filter(tbi, null);

Hiç yorum yok:

Yorum Gönder