org.jscience.computing.ai.vision
Class InvertFilter

java.lang.Object
  extended by org.jscience.computing.ai.vision.Filter
      extended by org.jscience.computing.ai.vision.InvertFilter

public class InvertFilter
extends Filter

This filter inverts an image. The filter is simply implemented using Java's LookupOp, defining the lookup table as: lut[i] = (byte)(255-i);


Constructor Summary
InvertFilter()
          Creates a new instance of InvertFilter
 
Method Summary
 java.awt.image.BufferedImage filter(java.awt.image.BufferedImage image, java.awt.image.BufferedImage output)
          Invert the input image.
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.computing.ai.vision.Filter
filter, verifyOutput, verifyOutput, verifyOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvertFilter

public InvertFilter()
Creates a new instance of InvertFilter

Method Detail

filter

public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage image,
                                           java.awt.image.BufferedImage output)
Invert the input image.

Specified by:
filter in class Filter
Parameters:
image - the input image.
output - the output image (optional).
Returns:
the inverted image.
See Also:
Filter.verifyOutput(BufferedImage,BufferedImage)

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!