Class GaussianBlurFilter

  • All Implemented Interfaces:
    java.awt.image.BufferedImageOp

    public class GaussianBlurFilter
    extends AbstractConvolver
    A filter that applies a Gaussian blur to the source image.

    In-place filtering: Unless otherwise noted, filters based on this class support in-place filtering (the source and destination images can be the same).

    Since:
    3.0
    Author:
    Chris Jennings
    • Constructor Detail

      • GaussianBlurFilter

        public GaussianBlurFilter()
        Creates a filter with a 1-pixel blur radius.
      • GaussianBlurFilter

        public GaussianBlurFilter​(float radius)
        Creates a filter with the specified blur radius.
        Parameters:
        radius - the blur radius, in pixels
    • Method Detail

      • setRadius

        public void setRadius​(float radius)
        Sets the radius of the blur effect.
        Parameters:
        radius - the blur radius
      • getRadius

        public float getRadius()
        Returns the current blur radius.
        Returns:
        the radius of the blur effect
      • getKernels

        protected java.awt.image.Kernel[] getKernels()
        Description copied from class: AbstractConvolver
        Returns the convolution kernel(s) that should be applied to execute this filter. Typically, array is either length one (non-separable) or length two (separable).
        Specified by:
        getKernels in class AbstractConvolver
        Returns:
        an array of non-null convolution kernels