com.jhlabs.image

Class LensBlurFilter

Implemented Interfaces:
BufferedImageOp, Cloneable

public class LensBlurFilter
extends AbstractBufferedImageOp

A filter which use FFTs to simulate lens blur on an image.

Method Summary

BufferedImage
filter(BufferedImage src, BufferedImage dst)
float
getBloom()
Get the bloom factor.
float
getBloomThreshold()
Get the bloom threshold.
float
getRadius()
Get the radius of the kernel.
int
getSides()
Get the number of sides of the aperture.
void
setBloom(float bloom)
Set the bloom factor.
void
setBloomThreshold(float bloomThreshold)
Set the bloom threshold.
void
setRadius(float radius)
Set the radius of the kernel, and hence the amount of blur.
void
setSides(int sides)
Set the number of sides of the aperture.
String
toString()

Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp

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

Method Details

filter

public BufferedImage filter(BufferedImage src,
                            BufferedImage dst)

getBloom

public float getBloom()
Get the bloom factor.
Returns:
the bloom factor

getBloomThreshold

public float getBloomThreshold()
Get the bloom threshold.
Returns:
the bloom threshold

getRadius

public float getRadius()
Get the radius of the kernel.
Returns:
the radius

getSides

public int getSides()
Get the number of sides of the aperture.
Returns:
the number of sides

setBloom

public void setBloom(float bloom)
Set the bloom factor.
Parameters:
bloom - the bloom factor

setBloomThreshold

public void setBloomThreshold(float bloomThreshold)
Set the bloom threshold.
Parameters:
bloomThreshold - the bloom threshold

setRadius

public void setRadius(float radius)
Set the radius of the kernel, and hence the amount of blur.
Parameters:
radius - the radius of the blur in pixels.

setSides

public void setSides(int sides)
Set the number of sides of the aperture.
Parameters:
sides - the number of sides

toString

public String toString()