Class 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 Detail

      • KeyFilter

        public KeyFilter()
    • 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()
      • setCleanImage

        public void setCleanImage​(java.awt.image.BufferedImage cleanImage)
        Get the clean image.
        Parameters:
        cleanImage - the clean image
        See Also:
        getCleanImage()
      • 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