Package com.jhlabs.image
Class KeyFilter
- java.lang.Object
-
- com.jhlabs.image.AbstractBufferedImageOp
-
- com.jhlabs.image.KeyFilter
-
- All Implemented Interfaces:
java.awt.image.BufferedImageOp,java.lang.Cloneable
public class KeyFilter extends AbstractBufferedImageOp
An experimental filter which can be used for keying against a clean shot. Given a source image, a clean image and a destination image, the filter replaces all pixels in the source which nearly equal the equivalent clean pixel by destination pixels.
-
-
Constructor Summary
Constructors Constructor Description KeyFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImagefilter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)floatgetBTolerance()Get the brightness tolerance.java.awt.image.BufferedImagegetCleanImage()Get the clean image.java.awt.image.BufferedImagegetDestination()Get the destination image.floatgetHTolerance()Get the hue tolerance.floatgetSTolerance()Get the saturation tolerance.voidsetBTolerance(float bTolerance)Set the brightness tolerance of the image in the range 0..1.voidsetCleanImage(java.awt.image.BufferedImage cleanImage)Get the clean image.voidsetDestination(java.awt.image.BufferedImage destination)Set the destination image.voidsetHTolerance(float hTolerance)Set the hue tolerance of the image in the range 0..1.voidsetSTolerance(float sTolerance)Set the saturation tolerance of the image in the range 0..1.java.lang.StringtoString()-
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB, stringToColor
-
-
-
-
Method Detail
-
setHTolerance
public void setHTolerance(float hTolerance)
Set the hue tolerance of the image in the range 0..1.- Parameters:
hTolerance- the tolerance- See Also:
getHTolerance()
-
getHTolerance
public float getHTolerance()
Get the hue tolerance.- Returns:
- the tolerance
- See Also:
setHTolerance(float)
-
setSTolerance
public void setSTolerance(float sTolerance)
Set the saturation tolerance of the image in the range 0..1.- Parameters:
sTolerance- the tolerance- See Also:
getSTolerance()
-
getSTolerance
public float getSTolerance()
Get the saturation tolerance.- Returns:
- the tolerance
- See Also:
setSTolerance(float)
-
setBTolerance
public void setBTolerance(float bTolerance)
Set the brightness tolerance of the image in the range 0..1.- Parameters:
bTolerance- the tolerance- See Also:
getBTolerance()
-
getBTolerance
public float getBTolerance()
Get the brightness tolerance.- Returns:
- the tolerance
- See Also:
setBTolerance(float)
-
setDestination
public void setDestination(java.awt.image.BufferedImage destination)
Set the destination image.- Parameters:
destination- the destination image- See Also:
getDestination()
-
getDestination
public java.awt.image.BufferedImage getDestination()
Get the destination image.- Returns:
- the destination image
- See Also:
setDestination(java.awt.image.BufferedImage)
-
setCleanImage
public void setCleanImage(java.awt.image.BufferedImage cleanImage)
Get the clean image.- Parameters:
cleanImage- the clean image- See Also:
getCleanImage()
-
getCleanImage
public java.awt.image.BufferedImage getCleanImage()
Get the clean image.- Returns:
- the clean image
- See Also:
setCleanImage(java.awt.image.BufferedImage)
-
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-