public class LocalLaplacianFilter
extends java.lang.Object
This filter computes y = y+G'DGx where G is an approximation to the gradient operator, G' is its adjoint, and D is a local diffusion tensor that determines for each image sample the direction of the Laplacian filter.
Local Laplacian filters are rarely used alone. While zeroing some features in images, they tend to attenuate many other features as well. Therefore, these filters are typically used in combinations with others.
For example, the filter implied by (I+G'DG)y = G'DGx acts as a notch filter. It attenuates features for which G'DGx is zero while preserving other features. Diffusivities d (inside D) control the width of the notch. Note that application of this filter requires solving a sparse symmetric positive-definite system of equations.
An even simpler example is the filter implied by (I+G'DG)y = x. This filter smooths features in the directions implied by the tensors D. Again, application of this filter requires solving a sparse symmetric positive-definite system of equations.
The accumulation of the filter output in y = y+G'DGx is useful when constructing such combination filters. For y = 0, this filter computes y = G'DGx. For y = x, this filter computes y = (I+G'DG)x.
Constructor and Description |
---|
LocalLaplacianFilter()
Constructs a local Laplacian filter.
|
LocalLaplacianFilter(double scale)
Constructs a local Laplacian filter.
|
public LocalLaplacianFilter()
public LocalLaplacianFilter(double scale)
scale
- scale factor for all diffusion coefficients.public void apply(Tensors2 d, float[][] x, float[][] y)
x
- input array. Must be distinct from the array y.y
- input/output array. Must be distinct from the array x.public void apply(Tensors3 d, float[][][] x, float[][][] y)
x
- input array. Must be distinct from the array y.y
- input/output array. Must be distinct from the array x.