cddews {LS2W} | R Documentation |
Compute the local wavelet spectrum estimate
Description
This function computes the local wavelet spectrum (LWS) estimate of an image (or non-decimated wavelet transform of a time series). The estimate is computed by taking the non-decimated wavelet transform of the image, squaring the detail coefficients, smoothing using wavelet shrinkage and then correcting the redundancy caused by use of the non-decimated wavelet transform.
Usage
cddews(data, filter.number = 1, family = "DaubExPhase", switch = "direction",
correct = TRUE, verbose = FALSE, smooth = TRUE,
sm.filter.number = 4, sm.family = "DaubExPhase", levels = 3:6, type = "hard",
policy = "LSuniversal", by.level = FALSE, value = 0, dev = var)
Arguments
data |
The image you want to analyse. |
filter.number |
This selects the index of the wavelet used in the analysis of the time series (i.e.\ the wavelet basis functions used to model the time series). For Daubechies compactly supported wavelets the filter number is the number of vanishing moments. |
family |
This selects the wavelet family to use in the analysis of the time series (i.e.\ which wavelet family to use to model the time
series). Only use the Daubechies compactly supported wavelets |
switch |
This allows one to order the corrected spectrum by scale or decomposition direction. Two options are available
|
correct |
Eckley, Nason and Treloar (2009) have demonstrated that, as a consequence of the inherent redundancy of the non-decimated wavelet transform, the raw wavelet spectrum is biased. However, an asymptotically unbiased estimator may be obtained by applying the inverse of the inner product matrix of discrete autocorrelation wavelets. This argument permits the user to decide whether or not to correct for this inherent bias. |
verbose |
Allows certain informative messages to be printed on screen. |
smooth |
This binary argument allows the user to specify whether or not the resulting local wavelet periodogram
should be smoothed to obtain. It is advised that this option be set to |
sm.filter.number |
Selects the index number of the wavelet that smooths each scale of the wavelet periodogram. |
sm.family |
Selects the wavelet family that smooths each scale of the wavelet periodogram. |
levels |
This specifies the levels which are smoothed when performing the wavelet shrinkage. |
type |
The type of shrinkage: either |
policy |
This dictates the threshold selection method used for smoothing. For LWS estimation |
by.level |
If If |
value |
This argument supplies the threshold value used when a manual policy is adopted. |
dev |
The method for estimating the variance of the empirical wavelet coefficients for smoothing purposes. |
Details
This function computes an estimate of the directionally dependent wavelet spectrum of an image according to the work of Eckley, Nason and Treloar (2010). The function works as follows:
1. The non-decimated wavelet transform of the series is computed.
2. The squared modulus of the non-decimated wavelet transform is computed (this is the raw wavelet periodogram, which is returned).
3. The squared modulus is smoothed using wavelet shrinkage.
4. The smoothed coefficients are corrected using the inverse of the inner product matrix of
the autocorrelation wavelets.
To display the LWS use the specplot
function on the S
component (see the examples below).
Value
A list with the following components:
S: |
The directionally dependent wavelet spectral estimate of the input data. This is a large array, the first dimension refers to a specific scale-direction pair (see Eckley et al. (2009) for further details). The next dimension refers to the rows of the spectral image, whilst the third element refers to the columns of the image. |
datadim |
The dimension of the original image. |
filter.number: |
This gives the index of the wavelet used in the analysis of the image (i.e. the wavelet basis functions used in the modelling). For Daubechies compactly supported wavelets the filter number is the number of vanishing moments. |
family: |
This contains the wavelet family used in the analysis of the image (i.e. the wavelet family used in the modelling). |
structure: |
Explains the structure of the inner product matrix and S. It can only take two values, |
nlevels: |
The number of levels in the decomposition. |
correct: |
|
smooth: |
|
date: |
The date when the analysis was perfromed. |
Author(s)
Idris Eckley
References
Eckley, I.A., Nason, G.P. and Treloar, R.L. (2010) Locally stationary wavelet fields with application to the modelling and analysis of image texture. Journal of the Royal Statistical Society (Series C), 59, 595 - 616.
Eckley, I.A. and Nason, G.P. (2011). LS2W: Implementing the Locally Stationary 2D Wavelet Process Approach in R, Journal of Statistical Software, 43(3), 1-23. URL http://www.jstatsoft.org/v43/i03/.
See Also
Examples
# Apply the cddews estimate function to a HaarMontage realisation
#
monty <- HaarMontage(direction="diagonal")
monty.cddews <- cddews(monty, filter.number=1, family="DaubExPhase")
monty.cddews