Documentation of 'Catalano.Math.Functions.Gaussian' Java class
Gaussian
Catalano.Math.Functions

Class Gaussian



  • public class Gaussian
    extends java.lang.Object
    Gaussian function.
    The class is used to calculate 1D and 2D Gaussian functions for specified Sigma (s) value:

    1-D: f(x) = exp( x * x / ( -2 * s * s ) ) / ( s * sqrt( 2 * PI ) )

    2-D: f(x, y) = exp( x * x + y * y / ( -2 * s * s ) ) / ( s * s * 2 * PI )
    • Constructor Summary

      Constructors 
      Constructor and Description
      Gaussian(double sigma)
      Initializes a new instance of the Gaussian class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double Function1D(double x)
      1-D Gaussian function.
      double Function2D(double x, double y)
      2-D Gaussian function.
      double getSigma()
      Sigma value.
      double[] Kernel1D(int size)
      1-D Gaussian kernel.
      double[][] Kernel2D(int size)
      2-D Gaussian kernel.
      void setSigma(double sigma)
      Sigma value.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Gaussian

        public Gaussian(double sigma)
        Initializes a new instance of the Gaussian class.
        Parameters:
        sigma - Sigma value.
    • Method Detail

      • getSigma

        public double getSigma()
        Sigma value.
        Returns:
        Sigma value.
      • setSigma

        public void setSigma(double sigma)
        Sigma value.
        Default value is set to 1. Minimum allowed value is 0.00000001.
        Parameters:
        sigma - Sigma value.
      • Function1D

        public double Function1D(double x)
        1-D Gaussian function.
        Parameters:
        x - value.
        Returns:
        Function's value at point x.
      • Function2D

        public double Function2D(double x,
                                 double y)
        2-D Gaussian function.
        Parameters:
        x - value.
        y - value.
        Returns:
        Function's value at point (x,y).
      • Kernel1D

        public double[] Kernel1D(int size)
        1-D Gaussian kernel.
        Parameters:
        size - Kernel size (should be odd), [3, 101].
        Returns:
        Returns 1-D Gaussian kernel of the specified size.
      • Kernel2D

        public double[][] Kernel2D(int size)
        2-D Gaussian kernel.
        Parameters:
        size - Kernel size (should be odd), [3, 101].
        Returns:
        Returns 2-D Gaussian kernel of specified size.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.