Class KeyFilter

All Implemented Interfaces:
BufferedImageOp, 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 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

      public void setDestination(BufferedImage destination)
      Set the destination image.
      Parameters:
      destination - the destination image
      See Also:
    • getDestination

      public BufferedImage getDestination()
      Get the destination image.
      Returns:
      the destination image
      See Also:
    • setCleanImage

      public void setCleanImage(BufferedImage cleanImage)
      Get the clean image.
      Parameters:
      cleanImage - the clean image
      See Also:
    • getCleanImage

      public BufferedImage getCleanImage()
      Get the clean image.
      Returns:
      the clean image
      See Also:
    • filter

      public BufferedImage filter(BufferedImage src, BufferedImage dst)
    • toString

      public String toString()
      Overrides:
      toString in class Object