com.jhlabs.image
Class LensBlurFilter

java.lang.Object
  extended by com.jhlabs.image.AbstractBufferedImageOp
      extended by com.jhlabs.image.LensBlurFilter
All Implemented Interfaces:
java.awt.image.BufferedImageOp, java.lang.Cloneable

public class LensBlurFilter
extends AbstractBufferedImageOp

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


Constructor Summary
LensBlurFilter()
           
 
Method Summary
 java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.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.
 java.lang.String toString()
           
 
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LensBlurFilter

public LensBlurFilter()
Method Detail

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.
See Also:
getRadius()

getRadius

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

Returns:
the radius
See Also:
setRadius(float)

setSides

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

Parameters:
sides - the number of sides
See Also:
getSides()

getSides

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

Returns:
the number of sides
See Also:
setSides(int)

setBloom

public void setBloom(float bloom)
Set the bloom factor.

Parameters:
bloom - the bloom factor
See Also:
getBloom()

getBloom

public float getBloom()
Get the bloom factor.

Returns:
the bloom factor
See Also:
setBloom(float)

setBloomThreshold

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

Parameters:
bloomThreshold - the bloom threshold
See Also:
getBloomThreshold()

getBloomThreshold

public float getBloomThreshold()
Get the bloom threshold.

Returns:
the bloom threshold
See Also:
setBloomThreshold(float)

filter

public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src,
                                           java.awt.image.BufferedImage dst)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object