edu.mit.sketch.util
Class Gaussian

java.lang.Object
  |
  +--edu.mit.sketch.util.Gaussian

public class Gaussian
extends Object

This class computes and stores the necessary convolution filters of different sizes for gaussian convlution.


Field Summary
 double[] g
          Gaussian mask
 double sigma
          sigma
 int size
          Gaussian mask
 
Constructor Summary
Gaussian(int size, double sigma)
          The constructor.
 
Method Summary
 double[] convolve(double[] input)
          Returns the convolved version of the input signal This is non-destructive on the input.
 String toString()
          toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

g

public double[] g
Gaussian mask

sigma

public double sigma
sigma

size

public int size
Gaussian mask
Constructor Detail

Gaussian

public Gaussian(int size,
                double sigma)
The constructor. size should be an odd number This method was written using MATLAB's implementation of fspecial(.,.)
Method Detail

toString

public String toString()
toString
Overrides:
toString in class Object

convolve

public double[] convolve(double[] input)
Returns the convolved version of the input signal This is non-destructive on the input. The input shold be longer than the mask size.