Posted By

whitetiger on 11/09/06


Tagged

image jpg java filter images Converter RGB j2me gray JAI dilate bit planes


Versions (?)

Java - Dilate3


 / Published in: Java
 

  1. public BufferedImage dilate3(BufferedImage bi)
  2. {
  3. BufferedImage buff = new BufferedImage(bi.getWidth(), bi.getHeight(), bi.getType());
  4.  
  5. Kernel kernel = new Kernel(3, 3, new float[] {
  6. 1f, 1f, 1f,
  7. 1f, 1f, 1f,
  8. 1f, 1f, 1f
  9. });
  10.  
  11. ConvolveOp op = new ConvolveOp(kernel);
  12. op.filter(bi, buff);
  13.  
  14. return buff;
  15. }

Report this snippet  

You need to login to post a comment.