com.pearsoneduc.ip.op
Class GaussianKernel

java.lang.Object
  |
  +--java.awt.image.Kernel
        |
        +--com.pearsoneduc.ip.op.StandardKernel
              |
              +--com.pearsoneduc.ip.op.GaussianKernel

public class GaussianKernel
extends StandardKernel

A Kernel for Gaussian blurring.

Version:
1.1 [1999/07/29]
Author:
Nick Efford

Constructor Summary
GaussianKernel()
          Creates a Gaussian kernel with a default standard deviation of 1.0.
GaussianKernel(float sigma)
          Creates a Gaussian kernel with the specified standard deviation.
 
Method Summary
static float[] createKernelData(float sigma)
          Creates an array of samples from a 2D Gaussian function with the given standard deviation.
static int getSize(float sigma)
          Computes kernel size for a given standard deviation.
static void main(java.lang.String[] argv)
          Creates a GaussianKernel and writes its coefficients to standard output.
 
Methods inherited from class com.pearsoneduc.ip.op.StandardKernel
createKernel, createKernel, getFractionDigits, setFractionDigits, toString, write
 
Methods inherited from class java.awt.image.Kernel
clone, getHeight, getKernelData, getWidth, getXOrigin, getYOrigin
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GaussianKernel

public GaussianKernel()
Creates a Gaussian kernel with a default standard deviation of 1.0.

GaussianKernel

public GaussianKernel(float sigma)
Creates a Gaussian kernel with the specified standard deviation.
Parameters:
sigma - standard deviation
Method Detail

getSize

public static int getSize(float sigma)
Computes kernel size for a given standard deviation.
Parameters:
sigma - standard deviation
Returns:
kernel size, in pixels.

createKernelData

public static float[] createKernelData(float sigma)
Creates an array of samples from a 2D Gaussian function with the given standard deviation.
Parameters:
sigma - standard deviation
Returns:
array of samples.

main

public static void main(java.lang.String[] argv)
Creates a GaussianKernel and writes its coefficients to standard output.