Sharpening an Image

Introduction

The java.awt.image package allows the editing of Images. The example below shows how a sharpening filter can be applied.

Kernel kernel = new Kernel(3, 3,
    new float[] {
        -1, -1, -1,
        -1, 9, -1,
        -1, -1, -1});
BufferedImageOp op = new ConvolveOp(kernel);
bufferedImage = op.filter(bufferedImage, null);

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.