Class ConvolveFilter

All Implemented Interfaces:
BufferedImageOp, Cloneable
Direct Known Subclasses:
AverageFilter, BlurFilter, BumpFilter, GaussianFilter, SharpenFilter

public class ConvolveFilter extends AbstractBufferedImageOp
A filter which applies a convolution kernel to an image.
  • Field Details

    • ZERO_EDGES

      public static int ZERO_EDGES
    • CLAMP_EDGES

      public static int CLAMP_EDGES
    • WRAP_EDGES

      public static int WRAP_EDGES
    • kernel

      protected Kernel kernel
    • alpha

      protected boolean alpha
  • Constructor Details

    • ConvolveFilter

      public ConvolveFilter()
      Construct a filter with a null kernel. This is only useful if you're going to change the kernel later on.
    • ConvolveFilter

      public ConvolveFilter(float[] matrix)
      Construct a filter with the given 3x3 kernel.
      Parameters:
      matrix - an array of 9 floats containing the kernel
    • ConvolveFilter

      public ConvolveFilter(int rows, int cols, float[] matrix)
      Construct a filter with the given kernel.
      Parameters:
      rows - the number of rows in the kernel
      cols - the number of columns in the kernel
      matrix - an array of rows*cols floats containing the kernel
    • ConvolveFilter

      public ConvolveFilter(Kernel kernel)
      Construct a filter with the given 3x3 kernel.
      Parameters:
      matrix - an array of 9 floats containing the kernel
  • Method Details