({{, (RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform])[dwd] 
gives the inverse wavelet transform of a (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]) object dwd.}, {, (RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform])[dwd,wave]
gives the inverse transform using the wavelet wave.}, {, (RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform])[dwd,wave,wind]
gives the inverse transform from the wavelet coefficients specified by wind.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform]) computes the inverse transform of discrete forward transforms such as (RefLink[DiscreteWaveletTransform, paclet:ref/DiscreteWaveletTransform]) etc.

The possible wavelets wave are the same as for the forward wavelet transforms.

The default wave is (RefLink[Automatic, paclet:ref/Automatic]), which is taken to be dwd["Wavelet"].

The possible specifications for wind are the same as used by (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]).

The default wind is (RefLink[Automatic, paclet:ref/Automatic]), which is taken to be dwd["BasisIndex"].

(RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform])[dwd,wave,wind] computes the inverse transform using only the wavelet coefficients specified by wind; other coefficients are set to be zero.

The inverse transform works recursively by computing coefficients with wavelet index {(Subscript[w, 1]),…,(Subscript[w, n-1])} from coefficients with wavelet index {(Subscript[w, 1]),…,(Subscript[w, n-1]),(Subscript[w, n])}.

An explicit wind specification needs to be consistent. A wind specification is consistent if for each {(Subscript[w, 1]),…,(Subscript[w, n])} that is included no {(Subscript[w, 1]),…,(Subscript[w, k])} for k<n is included.

(RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform])[dwd,wave,r] can be used to inverse transform the r lowest levels of the wavelet tree.

The default level r is given by the number of refinement levels n in dwd. With r<n a new (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]) object is returned with n-r refinement levels.

OpenersPrimaryExamplesSection(Spacer1)Examples  (35)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Perform a discrete wavelet transform:

dwd=DiscreteWaveletTransform[{1,1,3,1,1}]

Inverse transform recovers the original data:

InverseWaveletTransform[dwd]

(RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]) representing modified wavelet image coefficients:

dwd=DiscreteWaveletTransform[,CDFWavelet[]];

WaveletMapIndexed[c|->Sharpen[c],dwd]

Inverse transform gives filtered image:

InverseWaveletTransform[%]

(RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]) representing an audio signal:

a=Audio["ExampleData/rule30.wav"];

dwd=DiscreteWaveletTransform[a,Automatic,5]

Inverse transform using refinement level 5 coefficients only:

InverseWaveletTransform[dwd,Automatic,{{0,0,0,0,0},{0,0,0,0,1}}]

OpenersExampleSection1(Spacer1)Scope  (14)

OpenersExampleSubsection0(Spacer1)Basic Uses  (8)

Inverse wavelet transform (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]) from any discrete forward transform:

transforms={DiscreteWaveletTransform,DiscreteWaveletPacketTransform,StationaryWaveletTransform,StationaryWaveletPacketTransform,LiftingWaveletTransform};

dwds=Table[trans[{2,3,4,1}],{trans,transforms}]

The inverse transform is exact for data directly from the forward transform:

Map[InverseWaveletTransform,dwds]

Inverse wavelet transform modified (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]):

dwd=DiscreteWaveletPacketTransform[{1,1,3,1}];

dwds={WaveletMapIndexed[c|->Rescale[c],dwd],WaveletThreshold[dwd],WaveletBestBasis[dwd]}

The inverse is computed from the modified wavelet coefficients:

Map[InverseWaveletTransform,dwds]

Inverse wavelet transform using specified wavelet coefficients only:

dwd=DiscreteWaveletTransform[data=Cos[Range[100]^2/100]];

ListLinePlot[data]

Inverse transform only the detail coefficient {0,1}:

InverseWaveletTransform[dwd,Automatic,{0,1}]//ListLinePlot

Inverse transform all wavelet coefficients matching {0,_}, setting other coefficients to zero:

InverseWaveletTransform[dwd,Automatic,{0,_}]//ListLinePlot

Inverse transform an explicitly constructed (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]) object:

dwd=DiscreteWaveletData[{{1}->{1,-1,1,-2},{0,0}->{1,1,1,1}}]

InverseWaveletTransform[dwd]

The type of wavelet transform is inferred from the form of the specified coefficients:

dwd["Transform"]

Unspecified coefficients are taken to be zero:

dwd[Except[{1}|{0,0}]]

Specify a different wavelet to use in the inverse transform:

dwd=DiscreteWaveletTransform[Range[6],DaubechiesWavelet[2]];

InverseWaveletTransform[dwd,CDFWavelet[]]

By default, the wavelet used in the forward transform is chosen:

InverseWaveletTransform[dwd]==InverseWaveletTransform[dwd,DaubechiesWavelet[2]]

For array data, the inverse transform is an array with the same dimensions:

dwd=DiscreteWaveletTransform[(({{1, 2, 3, 4}, {2, 4, 6, 8}, {3, 6, 9, 12}, {4, 8, 12, 16}}))];

InverseWaveletTransform[dwd,Automatic,{2}]//MatrixForm

For image data, the inverse transform is given as an (RefLink[Image, paclet:ref/Image]) object:

dwd=DiscreteWaveletTransform[data=];

img=InverseWaveletTransform[dwd,Automatic,{0,0,0,0}]

The image has the same dimensions and number of color channels as the original data:

{ImageDimensions[img],ImageChannels[img]}

{ImageDimensions[data],ImageChannels[data]}

For sound data, the inverse transform is given as a (RefLink[Sound, paclet:ref/Sound]) object:

dwd=DiscreteWaveletTransform[];

The sound has the same duration, sampling rate, and number of channels as the original data:

InverseWaveletTransform[dwd,Automatic,{0,0,1}]

OpenersExampleSubsection1(Spacer1)Reconstruction Basis  (6)

A subset of the available coefficients is used in the inverse transform:

dwd=DiscreteWaveletTransform[{1,1,3,1,1}];

dwd["BasisIndex"] gives the coefficients used by default in the inverse transform:

dwd["BasisIndex"]

Use dwd["TreeView"] to get a tree plot of all coefficients with the default basis highlighted:

dwd["TreeView"]

Compute the inverse transform using the default basis of coefficients:

dwd=DiscreteWaveletPacketTransform[{1,1,3,1,1}];

InverseWaveletTransform[dwd]

Compute the inverse transform using a specific basis:

InverseWaveletTransform[dwd,Automatic,{{0},{1,0},{1,1}}]

Use a specific subset of a basis, with the other coefficients taken to be zero:

InverseWaveletTransform[dwd,Automatic,{{0},{1,0}}]

Compute the inverse transform of a single coefficient:

InverseWaveletTransform[dwd,Automatic,{0,1}]

A standard basis is chosen as the default for all non-packet (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]):

dwt=DiscreteWaveletTransform[Range[8]];

lwt=LiftingWaveletTransform[Range[8]];

swt=StationaryWaveletTransform[Range[8]];

The basis includes the detail coefficients {…,1} and the last coarse coefficient {…,0}:

{dwt["TreeView"],lwt["TreeView"],swt["TreeView"]}

The default basis for packet transform data uses coefficients at the highest refinement level:

dwpt=DiscreteWaveletPacketTransform[{1,1,3,1,1}];

swpt=StationaryWaveletPacketTransform[{1,1,3,1,1}];

{dwpt["TreeView"],swpt["TreeView"]}

For packet transform data, the wavelet basis can be changed using (RefLink[WaveletBestBasis, paclet:ref/WaveletBestBasis]):

dwd=DiscreteWaveletPacketTransform[{1,1,3,1,1}];

Choose the basis that minimizes the information entropy of the coefficients:

best=WaveletBestBasis[dwd,"ShannonEntropy"]

Choose a specific basis:

custom=WaveletBestBasis[dwd,{{0},{1,0},{1,1}}]

Highlight each basis in a tree plot of all coefficients:

{dwd["TreeView"],best["TreeView"],custom["TreeView"]}

For data directly from packet transforms, the inverse transform is independent of the basis:

data={9,3,9,7,6,9,7,10,8,1};

dwd=DiscreteWaveletPacketTransform[data];

Compare the inverse transform for several different full wavelet basis specifications:

InverseWaveletTransform[dwd,Automatic,{{0},{1,0},{1,1}}]==InverseWaveletTransform[dwd,Automatic,{{0},{1}}]==InverseWaveletTransform[dwd,Automatic,{{0,1},{0,0},{1}}]

For modified wavelet data, the inverse transform can depend on the basis chosen:

th=WaveletThreshold[dwd];

InverseWaveletTransform[th,Automatic,{{0},{1,0},{1,1}}]==InverseWaveletTransform[th,Automatic,{{0},{1}}]==InverseWaveletTransform[th,Automatic,{{0,1},{0,0},{1}}]

OpenersExampleSection2(Spacer1)Generalizations & Extensions  (2)

Partial inverse wavelet transform:

dwd=DiscreteWaveletTransform[RandomReal[1,16]]

Obtain a (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]) with 1 less level of refinement:

InverseWaveletTransform[dwd,Automatic,1]

Visualize wavelet coefficients remaining after inverting the r lowest levels of refinement:

Table[Labeled[InverseWaveletTransform[dwd,Automatic,r]["TreeView"],r],{r,1,3}]

(RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform])[dwd] is equivalent to inverting all levels of refinement:

InverseWaveletTransform[dwd,Automatic,4]==InverseWaveletTransform[dwd]

Inverse transform of complex wavelet coefficients:

data=RandomComplex[1+I,10];

dwd=StationaryWaveletTransform[data]

(RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform]) gives the exact inverse transform:

InverseWaveletTransform[dwd]==data

OpenersExampleSection3(Spacer1)Applications  (8)

OpenersExampleSubsection2(Spacer1)Wavelet Synthesis  (2)

Discrete wavelet data consisting of noise in detail coefficient {0,…,1} at refinement level r:

dwd[r_]:=DiscreteWaveletData[{UnitVector[r,r]->RandomReal[{-1,1},(2^(6-r))]},DaubechiesWavelet[],DiscreteWaveletTransform]

Use inverse wavelet transform to synthesize noise on a single specific scale:

Table[ListLinePlot[InverseWaveletTransform[dwd[r]],PlotLabel->r],{r,3}]

Stationary wavelet matrix data consisting of noise in vertical detail coefficient {2,2} only:

dwd=DiscreteWaveletData[{{2,2}->RandomReal[{-1,1},{40,40}]}];

Use inverse wavelet transform to synthesize noisy data:

MatrixPlot[InverseWaveletTransform[dwd]]

Noise in different wavelet coefficients leads to different kinds of synthesized noisy data:

Table[MatrixPlot[InverseWaveletTransform[DiscreteWaveletData[{wind->RandomReal[{-1,1},{20,20}]}]],PlotLabel->wind,FrameTicks->None],{wind,{{0},{0,0},{1,1,1,1},{3,2,2}}}]

OpenersExampleSubsection3(Spacer1)Inverse Discrete Wavelet Transform  (3)

Discrete wavelet transform data with the first coarse coefficient equal to c:

dwd[c_]:=DiscreteWaveletData[{{0}->c},Automatic,DiscreteWaveletTransform]

Visualize the inverse transform for different coarse coefficients:

Table[ListLinePlot[InverseWaveletTransform[dwd[c]],PlotLabel->c,PlotRange->{0,(Sqrt[2])}],{c,{{1,1,1,1},{1,1,2,2},{1,2,1,2}}}]

Discrete wavelet transform data with the first detail coefficient equal to d:

dwd[d_]:=DiscreteWaveletData[{{1}->d,{0}->{1,1,1,1}},Automatic,DiscreteWaveletTransform]

Visualize the inverse transform for different detail coefficients:

Table[ListLinePlot[InverseWaveletTransform[dwd[d]],PlotLabel->d,PlotRange->{0,(Sqrt[2])}],{d,{{0,0,0,0},{1,1,1,1},{0,0,1,1}}}]

Discrete wavelet packet transform data with wavelet coefficients (Subscript[a, [i]]):

dwd[a_]:=DiscreteWaveletData[{{0,0,0}->{(Subscript[a, [[1]]])},{0,0,1}->{(Subscript[a, [[2]]])},{0,1,0}->{(Subscript[a, [[3]]])},{0,1,1}->{(Subscript[a, [[4]]])},{1,0,0}->{(Subscript[a, [[5]]])},{1,0,1}->{(Subscript[a, [[6]]])},{1,1,0}->{(Subscript[a, [[7]]])},{1,1,1}->{(Subscript[a, [[8]]])}}]

Visualize the inverse transform of each coefficient separately:

Table[ListLinePlot[InverseWaveletTransform[dwd[UnitVector[8,i]]]],{i,8}]

The set of inverse transforms forms a basis for the signal space (ℝ^8):

MatrixRank[Table[InverseWaveletTransform[dwd[UnitVector[8,i]]],{i,8}]]

OpenersExampleSubsection4(Spacer1)Inverse Stationary Wavelet Transform  (3)

Stationary wavelet transform data with the first coarse coefficient equal to c:

dwd[c_]:=DiscreteWaveletData[{{0}->c},Automatic,StationaryWaveletTransform]

Visualize the inverse transform for different coarse coefficients:

Table[ListLinePlot[InverseWaveletTransform[dwd[c]],PlotLabel->c,PlotRange->{0,2}],{c,{{1,1,1,1,1,1,1,1},{1,1,1,1,2,2,2,2},{1,2,1,2,1,2,1,2}}}]

Stationary wavelet transform data with the first detail coefficient equal to d:

dwd[d_]:=DiscreteWaveletData[{{1}->d},Automatic,StationaryWaveletTransform]

Visualize the inverse transform for different detail coefficients:

Table[ListLinePlot[InverseWaveletTransform[dwd[d]],PlotLabel->d],{d,{{1,1,1,1,1,1},{-1,-1,-1,1,1,1},{1,-1,1,-1,1,-1}}}]

Stationary wavelet packet transform data with wavelet coefficients (Subscript[a, [i]]):

dwd[a_]:=DiscreteWaveletData[{{0,0}->{(Subscript[a, [[1]]]),(Subscript[a, [[2]]]),(Subscript[a, [[3]]]),(Subscript[a, [[4]]])},{0,1}->{(Subscript[a, [[5]]]),(Subscript[a, [[6]]]),(Subscript[a, [[7]]]),(Subscript[a, [[8]]])},{1,0}->{(Subscript[a, [[9]]]),(Subscript[a, [[10]]]),(Subscript[a, [[11]]]),(Subscript[a, [[12]]])},{1,1}->{(Subscript[a, [[13]]]),(Subscript[a, [[14]]]),(Subscript[a, [[15]]]),(Subscript[a, [[16]]])}}]

Visualize the inverse transform of each component (Subscript[a, [i]]) of each coefficient separately:

Table[ListLinePlot[InverseWaveletTransform[dwd[UnitVector[16,i]]]],{i,16}]

The set of 16 inverse transforms spans the signal space (ℝ^4):

MatrixRank[Table[InverseWaveletTransform[dwd[UnitVector[16,i]]],{i,16}]]

OpenersExampleSection4(Spacer1)Properties & Relations  (7)

(RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform]) is the exact inverse of transforms using an orthogonal wavelet:

data=RandomReal[1,10];

Use the orthogonal (RefLink[HaarWavelet, paclet:ref/HaarWavelet]):

Table[InverseWaveletTransform[t[data,HaarWavelet[]]]==data,{t,{DiscreteWaveletTransform,DiscreteWaveletPacketTransform,StationaryWaveletTransform,StationaryWaveletPacketTransform,LiftingWaveletTransform}}]

The inverse is inexact for nonorthogonal wavelet families such as (RefLink[ShannonWavelet, paclet:ref/ShannonWavelet]):

InverseWaveletTransform[DiscreteWaveletTransform[data,ShannonWavelet[3]]]==data

By default, coefficients in dwd["BasisIndex"] are used in the inverse:

dwd=DiscreteWaveletTransform[{1,1,3,1,1,1}];

dwd["BasisIndex"]

Set all other coefficients to zero:

WaveletMapIndexed[c|->0c,dwd,Except[Alternatives@@dwd["BasisIndex"]]]

The inverse using the default basis is unaffected:

InverseWaveletTransform[%]

(RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform])[…,…,wind] effectively sets other wavelet coefficients to zero:

dwd=DiscreteWaveletTransform[RandomReal[1,10]];

InverseWaveletTransform[dwd,Automatic,{{1},{0,1}}]

Explicitly set other wavelet coefficients to zero:

WaveletMapIndexed[c|->0c,dwd,Except[{1}|{0,1}]]

InverseWaveletTransform[%]

(RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform])[…,…,wind] computes the inverse from the coefficients wind:

dwd=DiscreteWaveletTransform[{1,1,3,1,1}];

InverseWaveletTransform[dwd,Automatic,{{1},{0,1}}]

dwd[wind,"Inverse"] computes the inverse of each coefficient separately:

dwd[{{1},{0,1}},"Inverse"]

The total gives the same result as (RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform]):

Total[Last/@%]

Use (RefLink[ListLinePlot, paclet:ref/ListLinePlot]) to plot inverse transforms of individual vector coefficients:

dwd=DiscreteWaveletTransform[Cos[Range[100]^2/100]];

Table[ListLinePlot[InverseWaveletTransform[dwd,Automatic,wind],PlotLabel->wind],{wind,{{1},{0,1},{0,0,1}}}]

dwd[wind,{"Inverse","ListPlot"}] gives a simple list plot of each inverse transform:

dwd[{{1},{0,1},{0,0,1}},{"Inverse","ListPlot"}]

(RefLink[WaveletListPlot, paclet:ref/WaveletListPlot])[dwd,wind,Method->"Inverse"->(RefLink[True, paclet:ref/True])] plots inverses together:

WaveletListPlot[dwd,{{1},{0,1},{0,0,1}},Method->"Inverse"->True]

Use (RefLink[MatrixPlot, paclet:ref/MatrixPlot]) to plot inverse transforms of individual matrix coefficients:

dwd=DiscreteWaveletTransform[RandomReal[1,{8,8}]];

Table[MatrixPlot[InverseWaveletTransform[dwd,Automatic,wind],PlotLabel->wind],{wind,{{1},{2},{3}}}]

dwd[wind,{"Inverse","MatrixPlot"}] gives a simple matrix plot of each inverse:

dwd[{{1},{2},{3}},{"Inverse","MatrixPlot"}]

Inverse transforms of individual coefficients from image data are given as (RefLink[Image, paclet:ref/Image]) objects:

dwd=DiscreteWaveletTransform[];

Table[Labeled[ImageAdjust@ImageApply[Abs,InverseWaveletTransform[dwd,Automatic,wind]],wind],{wind,{{1},{2},{3}}}]

dwd[{{1},{2},{3}},{"Inverse",{"Image",ImageSize->120}}]

OpenersExampleSection5(Spacer1)Possible Issues  (1)

A wind specification is inconsistent if it includes both {(Subscript[a, 1]),…,(Subscript[a, n])} and {(Subscript[a, 1]),…,(Subscript[a, r])} for r<n:

dwd=DiscreteWaveletPacketTransform[RandomReal[1,4]];

InverseWaveletTransform[dwd,Automatic,{{1},{1,0}}]

The specification is inconsistent because the inverse transform computes {1} from {1,0}:

dwd["TreeView"]

Use a consistent wind specification:

InverseWaveletTransform[dwd,Automatic,{{1}}]

InverseWaveletTransform[dwd,Automatic,{{1,0}}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData])  ▪  (RefLink[DiscreteWaveletTransform, paclet:ref/DiscreteWaveletTransform])  ▪  (RefLink[StationaryWaveletTransform, paclet:ref/StationaryWaveletTransform])  ▪  (RefLink[LiftingWaveletTransform, paclet:ref/LiftingWaveletTransform])  ▪  (RefLink[DiscreteWaveletPacketTransform, paclet:ref/DiscreteWaveletPacketTransform])  ▪  (RefLink[StationaryWaveletPacketTransform, paclet:ref/StationaryWaveletPacketTransform])  ▪  (RefLink[InverseContinuousWaveletTransform, paclet:ref/InverseContinuousWaveletTransform])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Wavelet Analysis, paclet:guide/Wavelets])}, {▪(RefLinkPlain[Signal Processing, paclet:guide/SignalProcessing])}})}})