com.pearsoneduc.ip.op
Class SeparableGaussianKernel
java.lang.Object
|
+--java.awt.image.Kernel
|
+--com.pearsoneduc.ip.op.StandardKernel
|
+--com.pearsoneduc.ip.op.SeparableGaussianKernel
- public class SeparableGaussianKernel
- extends StandardKernel
A Kernel for Gaussian blurring. The kernel is one-dimensional,
suitable for separable convolution with an image.
- Version:
- 1.1 [1999/07/29]
- Author:
- Nick Efford
Constructor Summary |
SeparableGaussianKernel()
Creates a separable Gaussian kernel with a default
standard deviation of 1.0. |
SeparableGaussianKernel(float sigma)
Creates a separable Gaussian kernel with the
specified standard deviation. |
Method Summary |
static float[] |
createKernelData(float sigma)
Creates an array of samples from a 1D 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 SeparableGaussianKernel and writes its coefficients
to standard output. |
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 |
SeparableGaussianKernel
public SeparableGaussianKernel()
- Creates a separable Gaussian kernel with a default
standard deviation of 1.0.
SeparableGaussianKernel
public SeparableGaussianKernel(float sigma)
- Creates a separable Gaussian kernel with the
specified standard deviation.
- Parameters:
sigma
- standard deviation
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 1D 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 SeparableGaussianKernel and writes its coefficients
to standard output.