WaveletMapIndexed
WaveletMapIndexed[f,wd]
applies the function f to the arrays of coefficients and indices of a ContinuousWaveletData or DiscreteWaveletData object.
WaveletMapIndexed[f,dwd,wind]
applies f to the DiscreteWaveletData coefficients specified by wind.
WaveletMapIndexed[f,cwd,octvoc]
applies f to the ContinuousWaveletData coefficients specified by octvoc.
Details
- WaveletMapIndexed takes a ContinuousWaveletData or DiscreteWaveletData object and returns an object of the same type.
- For dwd with coefficients {wind1->coef1,…}, WaveletMapIndexed[f,dwd] effectively corresponds to DiscreteWaveletData[{wind1->f[coef1,wind1],…},…].
- For cwd with coefficients {{oct1,voc1}->coef1,…}, WaveletMapIndexed[f,cwd] effectively corresponds to ContinuousWaveletData[{{oct1,voc1}->f[coef1,{oct1,voc1}],…},…].
- Each f[coefi,windi] should return an array or Image of the same dimensions as coefi.
- For Sound and SampledSoundList, each coefi is given as a list of vectors, each corresponding to a channel of sound samples.
- The wavelet index convention is the same as explained in ContinuousWaveletData and DiscreteWaveletData.
Examples
open allclose allBasic Examples (2)
Rescale all coefficients of a discrete wavelet transform by 20:
Normal gives the array of coefficients:
Compare with the unmodified coefficients:
Amplify the {1} coefficient of the stationary wavelet transform of an image:
The inverse wavelet transform gives an image with vertical edges sharpened:
Scope (11)
Basic Uses (3)
Apply an arbitrary function to all coefficients of a discrete wavelet transform:
Apply a symbolic function that also depends on the wavelet index for each coefficient vector:
WaveletMapIndexed operates on ContinuousWaveletData or DiscreteWaveletData:
The result is a wavelet data object of the same type:
The modified data can be used in other wavelet functions such as inverse wavelet transforms:
Coefficient Specification (4)
Transform only specified coefficients in DiscreteWaveletData:
Apply a function to detail coefficients only, using the index pattern {___, 1}:
Apply a function to coarse coefficients only, using the index pattern {___, 0}:
Transform only specified coefficients in a ContinuousWaveletData:
Apply a function to coefficients in the first octave {1,_} only:
Apply a function to all coefficients except those in the second octave, first voice {2,1}:
The function f can depend on the wavelet index as its second argument:
Define a function with an arbitrary dependence on the wavelet index:
Apply the function to continuous wavelet transform coefficients:
Data (4)
For list data, the coefficients supplied as the first argument of f are lists:
Apply a function that transforms lists:
For multidimensional data, the coefficients are arrays of the same depth:
Apply a function that transforms array coefficients of that depth:
For image data, the coefficients are supplied to f as Image objects:
The coefficients have the same number of channels as the original image:
Apply a function that transforms image coefficients:
For sound data, the coefficients are two-dimensional arrays:
Dimensions of one coefficient:
The two dimensions specify the channel number and the wavelet coefficients for that channel:
Apply a function that transforms two-channel data:
Reconstructed Sound data:
Applications (7)
Data Processing (2)
Coefficients with short indices correspond to small-scale structure in the data:
Zero all small-scale coefficients from the stationary wavelet transform of random data:
The inverse wavelet transform varies only on larger scales:
Perform a simple thresholding operation by removing low-amplitude wavelet coefficients:
Image Processing (3)
Sound Processing (1)
Wavelet Thresholding (1)
Perform a wavelet-based shrinkage based on conditional mean:
Compute a discrete wavelet transform up to refinement level 6:
Compute the standard deviation for the finest detail coefficients:
Compute the standard deviation for all wavelet coefficients:
Assuming a Gaussian mixture model, variance can be estimated in the proportion to :
Shrinkage estimates of the signal coefficients are given by:
Use WaveletMapIndexed to map over detail coefficients:
Properties & Relations (3)
MapIndexed[f,expr] applies f to the parts of any expression:
WaveletMapIndexed[f,wd] applies f to the coefficients in the wavelet data object wd:
WaveletMapIndexed[vMap[f,v],wd] applies f to each part of each coefficient:
MapIndexed gives the part specification as the second argument of f:
WaveletMapIndexed gives the wavelet index specification as the second argument of f:
WaveletMapIndexed transforms arrays of coefficients, giving a new DiscreteWaveletData:
Use Map and Normal[dwd] to transform coefficients into normal expressions:
Or use ReplaceAll (/.):
Possible Issues (2)
The function f is always passed the index specification as its second argument:
Use a function that operates on its first argument only:
The function f should return an array or image of the same dimensions:
Listable functions return an array of the same dimensions:
Arithmetic operations such as multiplication are Listable:
Text
Wolfram Research (2010), WaveletMapIndexed, Wolfram Language function, https://reference.wolfram.com/language/ref/WaveletMapIndexed.html.
CMS
Wolfram Language. 2010. "WaveletMapIndexed." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/WaveletMapIndexed.html.
APA
Wolfram Language. (2010). WaveletMapIndexed. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WaveletMapIndexed.html