Class ErodeFilter

All Implemented Interfaces:
BufferedImageOp, Serializable, Cloneable

public class ErodeFilter extends BinaryFilter
Given a binary image, this filter performs binary erosion, setting all removed pixels to the given 'new' color.
See Also:
  • Field Details

    • threshold

      protected int threshold
  • Constructor Details

    • ErodeFilter

      public ErodeFilter()
  • Method Details

    • setThreshold

      public void setThreshold(int threshold)
      Set the threshold - the number of neighbouring pixels for dilation to occur.
      Parameters:
      threshold - the new threshold
    • getThreshold

      public int getThreshold()
      Return the threshold - the number of neighbouring pixels for dilation to occur.
      Returns:
      the current threshold
    • filterPixels

      protected int[] filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace)
      Specified by:
      filterPixels in class WholeImageFilter
    • toString

      public String toString()
      Overrides:
      toString in class Object