public class RecursiveExponentialFilter
extends java.lang.Object
Like the Gaussian filter, the impulse response of the exponential filter is nowhere zero. The half-width sigma for the exponential filter is here defined so that, for low frequencies, the frequency response of the exponential filter approximates that for a Gaussian filter with the same specified half-width sigma. Specifically, the value, slope and curvature of the frequency responses will be the same for exponential and Gaussian filters if the same half-widths are specified.
This smoothing filter is faster than a recursive Gaussian filter. This filter also provides a variety of boundary conditions that can be used to control the filtering of samples near the edges of arrays. For most (but not all) of these boundary conditions, this filter is symmetric and positive-definite (SPD). This means, for example, that it can be used as a preconditioner in conjugate-gradient solutions of SPD systems of equations.
Multidimensional filters are applied as a cascade of one-dimensional filters applied for each dimension of multidimensional arrays. In contrast to the Gaussian filter, this cascade for the exponential filter does not have isotropic impulse or frequency responses.
All smoothing can be performed in place, so that input and output arrays can be the same array.
Modifier and Type | Class and Description |
---|---|
static class |
RecursiveExponentialFilter.Edges
Boundary condition used at edges of either input or output samples.
|
Constructor and Description |
---|
RecursiveExponentialFilter(double sigma)
Constructs a filter with specified half-width.
|
RecursiveExponentialFilter(double sigma1,
double sigma23)
Constructs a filter with specified half-widths.
|
RecursiveExponentialFilter(double sigma1,
double sigma2,
double sigma3)
Constructs a filter with specified half-widths.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(float[][][] x,
float[][][] y)
Applies this filter along all array dimensions.
|
void |
apply(float[][] x,
float[][] y)
Applies this filter along all array dimensions.
|
void |
apply(float[] x,
float[] y)
Applies this filter.
|
void |
apply1(float[][][] x,
float[][][] y)
Applies this filter along the 1st array dimension.
|
void |
apply1(float[][] x,
float[][] y)
Applies this filter along the 1st array dimension.
|
void |
apply1(float[] x,
float[] y)
Applies this filter along the 1st (only) array dimension.
|
void |
apply2(float[][][] x,
float[][][] y)
Applies this filter along the 2nd array dimension.
|
void |
apply2(float[][] x,
float[][] y)
Applies this filter along the 2nd array dimension.
|
void |
apply3(float[][][] x,
float[][][] y)
Applies this filter along the 3rd array dimension.
|
void |
setEdges(RecursiveExponentialFilter.Edges edges)
Sets the boundary condition used for samples beyond edges.
|
public RecursiveExponentialFilter(double sigma)
sigma
- filter half-width.public RecursiveExponentialFilter(double sigma1, double sigma23)
sigma1
- filter half-width for the 1st dimension.sigma23
- filter half-width for 2nd and 3rd dimensions.public RecursiveExponentialFilter(double sigma1, double sigma2, double sigma3)
sigma1
- filter half-width for the 1st dimension.sigma2
- filter half-width for the 2nd dimension.sigma3
- filter half-width for the 3rd dimension.public void setEdges(RecursiveExponentialFilter.Edges edges)
edges
- the boundary condition.public void apply(float[] x, float[] y)
x
- input array.y
- output array.public void apply(float[][] x, float[][] y)
x
- input array.y
- output array.public void apply(float[][][] x, float[][][] y)
x
- input array.y
- output array.public void apply1(float[] x, float[] y)
x
- input array.y
- output array.public void apply1(float[][] x, float[][] y)
x
- input array.y
- output array.public void apply2(float[][] x, float[][] y)
x
- input array.y
- output array.public void apply1(float[][][] x, float[][][] y)
x
- input array.y
- output array.public void apply2(float[][][] x, float[][][] y)
x
- input array.y
- output array.public void apply3(float[][][] x, float[][][] y)
x
- input array.y
- output array.