Package com.jhlabs.image
Class UnsharpFilter
- java.lang.Object
-
- com.jhlabs.image.AbstractBufferedImageOp
-
- com.jhlabs.image.ConvolveFilter
-
- com.jhlabs.image.GaussianFilter
-
- com.jhlabs.image.UnsharpFilter
-
- All Implemented Interfaces:
java.awt.image.BufferedImageOp
,java.lang.Cloneable
public class UnsharpFilter extends GaussianFilter
A filter which subtracts Gaussian blur from an image, sharpening it.- Author:
- Jerry Huxtable
-
-
Field Summary
-
Fields inherited from class com.jhlabs.image.GaussianFilter
kernel, radius
-
Fields inherited from class com.jhlabs.image.ConvolveFilter
alpha, CLAMP_EDGES, premultiplyAlpha, WRAP_EDGES, ZERO_EDGES
-
-
Constructor Summary
Constructors Constructor Description UnsharpFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImage
filter(java.awt.image.BufferedImage src, java.awt.image.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.java.lang.String
toString()
-
Methods inherited from class com.jhlabs.image.GaussianFilter
convolveAndTranspose, getRadius, makeKernel, setRadius
-
Methods inherited from class com.jhlabs.image.ConvolveFilter
convolve, convolve, convolveH, convolveHV, convolveV, createCompatibleDestImage, getBounds2D, getEdgeAction, getKernel, getPoint2D, getPremultiplyAlpha, getRenderingHints, getUseAlpha, setEdgeAction, setKernel, setPremultiplyAlpha, setUseAlpha
-
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, getRGB, setRGB, stringToColor
-
-
-
-
Method Detail
-
setThreshold
public void setThreshold(int threshold)
Set the threshold value.- Parameters:
threshold
- the threshold value- See Also:
getThreshold()
-
getThreshold
public int getThreshold()
Get the threshold value.- Returns:
- the threshold value
- See Also:
setThreshold(int)
-
setAmount
public void setAmount(float amount)
Set the amount of sharpening.- Parameters:
amount
- the amount. Minimum value: 0, maximum value: 1- See Also:
getAmount()
-
getAmount
public float getAmount()
Get the amount of sharpening.- Returns:
- the amount
- See Also:
setAmount(float)
-
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
- Specified by:
filter
in interfacejava.awt.image.BufferedImageOp
- Overrides:
filter
in classGaussianFilter
-
toString
public java.lang.String toString()
- Overrides:
toString
in classGaussianFilter
-
-