Class GaussianKernel1D

java.lang.Object
imagingbook.common.filter.linear.Kernel1D
imagingbook.common.filter.linear.GaussianKernel1D

public class GaussianKernel1D extends Kernel1D
This class represents a 2D filter kernel.
Version:
2020/12/29
  • Field Details

  • Constructor Details

  • Method Details

    • makeGaussKernel1D

      public static float[] makeGaussKernel1D(double sigma)
      Creates and returns a 1D Gaussian filter kernel large enough to avoid truncation effects. The length of the resulting array is odd. The returned kernel is normalized.
      Parameters:
      sigma - the width (standard deviation) of the Gaussian
      Returns:
      the Gaussian filter kernel
    • makeGaussKernel1D

      public static float[] makeGaussKernel1D(double sigma, boolean normalize)
      Creates and returns a 1D Gaussian filter kernel large enough to avoid truncation effects. The length of the resulting array is odd. The returned kernel is optionally normalized.
      Parameters:
      sigma - the width (standard deviation) of the Gaussian
      normalize - set true to normalize the kernel
      Returns:
      the Gaussian filter kernel