Last active
November 24, 2016 07:17
-
-
Save Yuhkiy/5ccd4dd2cb88752ae4ccbf98de6924a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SharpenFilter implements MyFilter { | |
public BufferedImage processImage(BufferedImage image) { | |
float[] sharpenMatrix = { 0.0f, -1.0f, 0.0f, -1.0f, 5.0f, -1.0f, 0.0f, -1.0f, 0.0f }; | |
BufferedImageOp sharpenFilter = new ConvolveOp(new Kernel(3, 3, sharpenMatrix), | |
ConvolveOp.EDGE_NO_OP, null); | |
return sharpenFilter.filter(image, null); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment