Package com.jhlabs.image
Class KeyFilter
java.lang.Object
com.jhlabs.image.AbstractBufferedImageOp
com.jhlabs.image.KeyFilter
- All Implemented Interfaces:
BufferedImageOp
,Cloneable
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 -
Method Summary
Modifier and TypeMethodDescriptionfilter
(BufferedImage src, BufferedImage dst) float
Get the brightness tolerance.Get the clean image.Get the destination image.float
Get the hue tolerance.float
Get the saturation tolerance.void
setBTolerance
(float bTolerance) Set the brightness tolerance of the image in the range 0..1.void
setCleanImage
(BufferedImage cleanImage) Get the clean image.void
setDestination
(BufferedImage destination) Set the destination image.void
setHTolerance
(float hTolerance) Set the hue tolerance of the image in the range 0..1.void
setSTolerance
(float sTolerance) Set the saturation tolerance of the image in the range 0..1.toString()
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
Constructor Details
-
KeyFilter
public KeyFilter()Construct a KeyFilter.
-
-
Method Details
-
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
public float getHTolerance()Get the hue tolerance.- Returns:
- the tolerance
- See Also:
-
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
public float getSTolerance()Get the saturation tolerance.- Returns:
- the tolerance
- See Also:
-
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
public float getBTolerance()Get the brightness tolerance.- Returns:
- the tolerance
- See Also:
-
setDestination
Set the destination image.- Parameters:
destination
- the destination image- See Also:
-
getDestination
Get the destination image.- Returns:
- the destination image
- See Also:
-
setCleanImage
Get the clean image.- Parameters:
cleanImage
- the clean image- See Also:
-
getCleanImage
Get the clean image.- Returns:
- the clean image
- See Also:
-
filter
-
toString
-