|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectutil.wavelet.WaveletTransform
public class WaveletTransform
Discrete wavelet transform of a signal using the 1D A-Trous method with a b3-spline smoothing function. The noise for each position in the signal is also required. The WaveletTransform class computes the wavelet coefficients, the 1-sigma threshold for wavelet coefficients, the multiresolution support and it associated fields, structures and object trees for feature extraction and finally a set of signals corresponding to each individual object detected. Converted from the Feb 2004 distribution of the ESO/MIDAS wavelet code originally written by Jean-Luc Starck in 25-Feb-2003. In particular version 19_1 of functions wave_1d_trou() and wave_1d_algo_trou_rec() located in the file contrib/wavelet/libsrc/wave1d.c available by FTP inside the gzip file ftp://ftphost.hq.eso.org/pub/midaspub/04FEB/04FEBpl1.1.tar.gz. For those interested in extending this class to support 2D DWT look into pave_2d_tfo() and pave_2d_build() located in the file contrib/wavelet/libsrc/pave.c Reference: Starck,J.-L., Murtagh, F., Bijaoui,A.: 1998, Image Processing and Data Analysis, ISBN 0521599148 Cambridge Univ. Press.
| Field Summary | |
|---|---|
int[][] |
fieldLabel
Field labels for contiguous sets of above threshold wavelet coefficients. |
List<Structure> |
structures
A list of Structures in this wavelet transform |
float[][] |
threshold
The 1-sigma threshold for wavelet coefficients |
float[][] |
w
Wavelet coefficients |
| Constructor Summary | |
|---|---|
WaveletTransform(float[] signal,
float[] noise,
int scales,
BoundaryCondition boundaryCondition)
Construct a wavelet transform from a signal with non-uniform noise using the 1D A-Trous method with a b3-spline smoothing function. |
|
| Method Summary | |
|---|---|
static float[] |
getContinuum(float[] signal)
Get the continuum of a signal. |
protected void |
getFields(float nsigma,
boolean positive)
Computes the field labels for contiguous sets of above threshold wavelet coefficients. |
static float |
getGaussianDeviate()
Get a normally distributed gaussian deviate with zero mean and unit variance. |
static float[][] |
getGaussianWaveletTransform(int n)
Get the a wavelet transform of a signal comprised of a normally distributed gaussian deviate |
static int[] |
getMultiResolutionSupportVisualization(float[][] support,
boolean positive)
Get the multiresolution support visualization for this wavelet transform as a 1D GIF image. |
static float[] |
getStandardDeviation(int size)
Get the standard deviation (sigma) at each scale in the wavelet transform of a random noise signal comprised of a normally distributed gaussian deviates. |
protected float[][] |
getSupport(float nsigma,
boolean positive)
Get the multiresolution support for this wavelet transform by setting an array of integers set to 1 for significant wavelet coefficients (those which exceed the noise) 0 otherwise. |
static void |
main(String[] args)
|
static void |
outputSignalAndWaveletTransform(PrintStream out,
float[] signal,
float[][] wavelet)
|
static void |
outputWaveletTransform(PrintStream out,
float[][] wavelet)
|
float[] |
reconstruct(float nsigma,
boolean positive)
Reconstruct a signal from a wavelet transform. |
static float[][] |
transform(float[] signal,
int scales,
BoundaryCondition boundaryCondition)
Discrete wavelet transform using the 1D A-Trous method with a b3-spline smoothing function. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public float[][] w
public float[][] threshold
public int[][] fieldLabel
public List<Structure> structures
| Constructor Detail |
|---|
public WaveletTransform(float[] signal,
float[] noise,
int scales,
BoundaryCondition boundaryCondition)
signal - array of float values representing a discrete signalnoise - the standard deviation of the signalscales - number of wavelet scales (if scales==0 then the following equation is solved 2^(scales+1) = 3/4 signal array length)boundaryCondition - treatment of boundary conditions| Method Detail |
|---|
public float[] reconstruct(float nsigma,
boolean positive)
nsigma - the threshold in units of standard deviation (e.g. 3 is typical, 0 is equivalent to keeping all data)positive - if true extract objects that have wavelets coefficients exceeding the threshold, otherwise extract negative features only
protected void getFields(float nsigma,
boolean positive)
nsigma - the significance level in number of sigma unitspositive - restriction to positive significant wavelet coefficients otherwise negative only
protected float[][] getSupport(float nsigma,
boolean positive)
positive - restriction to positive significant wavelet coefficients otherwise negative only
public static int[] getMultiResolutionSupportVisualization(float[][] support,
boolean positive)
positive - only check for positive significant wavelet coefficients
public static float[][] transform(float[] signal,
int scales,
BoundaryCondition boundaryCondition)
signal - array of float values representing a discrete signalscales - number of wavelet scales (if scales==0 then the following equation is solved 2^(scales+1) = 3/4 signal array length)boundaryCondition - treatment of boundary conditions
public static float[] getContinuum(float[] signal)
signal - array of float values representing a discrete signal
public static void main(String[] args)
public static float getGaussianDeviate()
public static float[][] getGaussianWaveletTransform(int n)
n - the size of the random signalpublic static float[] getStandardDeviation(int size)
size - the size of the random signal
public static void outputSignalAndWaveletTransform(PrintStream out,
float[] signal,
float[][] wavelet)
public static void outputWaveletTransform(PrintStream out,
float[][] wavelet)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||