WaveletCoefficients - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


DiscreteTransforms

  

WaveletCoefficients

  

compute common orthogonal and biorthogonal wavelet masks

 

Calling Sequence

Parameters

Options

Description

Examples

Calling Sequence

WaveletCoefficients(Wavelet, WaveletParams, options)

Parameters

Wavelet

-

string or name; the name of a supported orthogonal wavelet family

WaveletParams

-

parameters to the wavelet family Wavelet

options

-

(optional) equation of the form guarddigits = integer

Options

• 

guarddigits can be any positive integer. Setting guarddigits=d means that all computations done to generate the wavelet will be done with Digits+d digits of precision. Answers are returned to Digits digits of precision.

• 

The default value for guarddigits is 20 for all wavelets except Battle-Lemarie wavelets. See Wavelets for details.

Description

• 

If Wavelet is an orthogonal family, then WaveletCoefficients(Wavelet, WaveletParams) returns two Vectors, the high pass and low pass filters of the wavelet in the Wavelet family with parameters WaveletParams.

• 

In this case, WaveletParams is usually a single positive integer, and often represents the size of the wavelet or the number of vanishing moments of the wavelet.

• 

If Wavelet is a biorthogonal family, WaveletCoefficients(Wavelet, WaveletParams) returns four Vectors. The first two Vectors are the high pass and low pass analysis filters of the wavelet in the Wavelet family with parameters WaveletParams. The second two Vectors are the synthesis filters.

• 

In this case, WaveletParams is usually a sequence of two numbers, which often represent the size of the wavelet or the number of vanishing moments of the wavelet.

• 

The low pass filter is also known as the refinement or scaling coefficients, and the high pass filter is also known as the wavelet coefficients.

• 

If Digits < evalhf(Digits), then all Vectors returned are of datatype=float[8]. Otherwise, results are returned with Digits digits.

• 

WaveletCoefficients references a database of stored wavelet coefficients and intermediate computations whenever possible. However, wavelets can be computed to arbitrary precision, by changing either Digits or guarddigits.

• 

The supported orthogonal families are Daubechies, Symlet, Coiflet, and BattleLemarie.

• 

The supported biorthogonal families are BiorthogonalSpline and CDF. CDF is a single wavelet, not a family.

– 

See the Wavelets page for details on wavelet families and parameters.

• 

All orthogonal wavelets are normalized to have (L2) norm 1. If w1 and w2 are the high and low pass filter of an orthogonal wavelet, then

add(w1[i]*w1[i+k], i=max(0,-k)..min(rtable_num_elems(w1),rtable_num_elems(w1)-k));

  

and

add(w2[i]*w2[i+k], i=max(0,-k)..min(rtable_num_elems(w2),rtable_num_elems(w2)-k));

  

are 1 if k=0 (because w1 and w2 have norm 1) and 0 if k is even but not 0. Also,

add(w1[i]*w2[i+k], i=max(0,-k)..min(rtable_num_elems(w2),rtable_num_elems(w2)-k));

  

is 0 for all even k. w1 and w2 are always of the same size.

• 

w1 can be obtained by reversing w2 and negating every second element.

• 

If w1a, w2a, w1s, and w2s are the high and low pass analysis and synthesis filters, then

add(w1a[i]*w1s[i+k], i=max(0,-k)..min(rtable_num_elems(w1),rtable_num_elems(w1)-k));

  

and

add(w2a[i]*w2s[i+k], i=max(0,-k)..min(rtable_num_elems(w2),rtable_num_elems(w2)-k));

  

are 1 if k=0 and 0 if k is even but not 0. Also,

add(w1a[i]*w2s[i+k], i=max(0,-k)..min(rtable_num_elems(w1),rtable_num_elems(w1)-k));

  

and

add(w2a[i]*w1s[i+k], i=max(0,-k)..min(rtable_num_elems(w2),rtable_num_elems(w2)-k));

  

are 0 for all even k.

• 

If necessary, w1a, w2a, w1s, and w2s are padded with 0s to ensure they are all of the same length.

• 

w1s can be obtained by reversing w2a and negating every second coefficient; likewise for w2s and w1a.

Examples

withDiscreteTransforms&comma;WaveletCoefficients

WaveletCoefficients

(1)

WaveletCoefficientsDaubechies&comma;2

0.707106781186548−0.707106781186548&comma;0.7071067811865480.707106781186548

(2)

Note that the output is different from the commonly cited values [1,-1] and [1,1] because it has been normalized to have norm 1.

w1,w2WaveletCoefficientsSymlet&comma;4

w1,w2−0.129409522551260−0.2241438680420130.836516303737808−0.482962913144534,0.4829629131445340.8365163037378080.224143868042013−0.129409522551260

(3)

seqaddw1iw1i+2k&comma;i=max1&comma;12k..minrtable_num_elemsw1&comma;rtable_num_elemsw12k&comma;k=2..2

0&comma;1.38777878078145×10−17&comma;1.&comma;1.38777878078145×10−17&comma;0

(4)

seqaddw2iw2i+2k&comma;i=max1&comma;12k..minrtable_num_elemsw2&comma;rtable_num_elemsw22k&comma;k=2..2

0&comma;1.38777878078145×10−17&comma;1.&comma;1.38777878078145×10−17&comma;0

(5)

seqaddw1iw2i+2k&comma;i=max1&comma;12k..minrtable_num_elemsw2&comma;rtable_num_elemsw22k&comma;k=2..2

0&comma;0.&comma;2.08166817117217×10−17&comma;0.&comma;0

(6)

w1a,w2a,w1s,w2sWaveletCoefficientsBiorthogonalSpline&comma;3&comma;5&colon;

seqaddw1aiw1si+2k&comma;i=max1&comma;12k..minrtable_num_elemsw1a&comma;rtable_num_elemsw1a2k&comma;k=6..6

0&comma;0.&comma;0.&comma;8.67361737988404×10−19&comma;−3.90312782094782×10−18&comma;2.77555756156289×10−17&comma;1.&comma;2.77555756156289×10−17&comma;0.&comma;8.67361737988404×10−19&comma;0.&comma;0.&comma;0

(7)

seqaddw2aiw2si+2k&comma;i=max1&comma;12k..minrtable_num_elemsw2a&comma;rtable_num_elemsw2a2k&comma;k=6..6

0&comma;0.&comma;0.&comma;8.67361737988404×10−19&comma;0.&comma;2.77555756156289×10−17&comma;1.&comma;2.77555756156289×10−17&comma;−3.90312782094782×10−18&comma;8.67361737988404×10−19&comma;0.&comma;0.&comma;0

(8)

seqaddw1siw2ai+2k&comma;i=max1&comma;12k..minrtable_num_elemsw2a&comma;rtable_num_elemsw2a2k&comma;k=6..6

0&comma;0.&comma;0.&comma;0.&comma;0.&comma;0.&comma;−6.93889390390723×10−18&comma;0.&comma;0.&comma;0.&comma;0.&comma;0.&comma;0

(9)

seqaddw2siw1ai+2k&comma;i=max1&comma;12k..minrtable_num_elemsw2a&comma;rtable_num_elemsw2a2k&comma;k=6..6

0&comma;0.&comma;0.&comma;1.73472347597681×10−18&comma;0.&comma;0.&comma;1.11212037842701×10−16&comma;0.&comma;0.&comma;1.73472347597681×10−18&comma;0.&comma;0.&comma;0

(10)

See Also

DiscreteWaveletTransform

InverseDiscreteWaveletTransform

Wavelet Examples and Applications

WaveletPlot

Wavelets