com.jhlabs.image

Class UnsharpFilter

Implemented Interfaces:
BufferedImageOp, Cloneable

public class UnsharpFilter
extends GaussianFilter

A filter which subtracts Gaussian blur from an image, sharpening it.

Field Summary

Fields inherited from class com.jhlabs.image.GaussianFilter

kernel, radius

Fields inherited from class com.jhlabs.image.ConvolveFilter

CLAMP_EDGES, WRAP_EDGES, ZERO_EDGES, alpha, kernel, premultiplyAlpha

Constructor Summary

UnsharpFilter()
Construct a Gaussian filter.

Method Summary

BufferedImage
filter(BufferedImage src, BufferedImage dst)
float
getAmount()
Get the amount of sharpening.
int
getThreshold()
Get the threshold value.
void
setAmount(float amount)
Set the amount of sharpening.
void
setThreshold(int threshold)
Set the threshold value.
String
toString()

Methods inherited from class com.jhlabs.image.GaussianFilter

convolveAndTranspose, filter, getRadius, makeKernel, setRadius, toString

Methods inherited from class com.jhlabs.image.ConvolveFilter

convolve, convolve, convolveH, convolveHV, convolveV, createCompatibleDestImage, filter, getBounds2D, getEdgeAction, getKernel, getPoint2D, getPremultiplyAlpha, getRenderingHints, getUseAlpha, setEdgeAction, setKernel, setPremultiplyAlpha, setUseAlpha, toString

Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp

clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRGB, getRenderingHints, setRGB

Constructor Details

UnsharpFilter

public UnsharpFilter()
Construct a Gaussian filter.

Method Details

filter

public BufferedImage filter(BufferedImage src,
                            BufferedImage dst)
Overrides:
filter in interface GaussianFilter

getAmount

public float getAmount()
Get the amount of sharpening.
Returns:
the amount

getThreshold

public int getThreshold()
Get the threshold value.
Returns:
the threshold value

setAmount

public void setAmount(float amount)
Set the amount of sharpening.
Parameters:
amount - the amount

setThreshold

public void setThreshold(int threshold)
Set the threshold value.
Parameters:
threshold - the threshold value

toString

public String toString()
Overrides:
toString in interface GaussianFilter