({{, (RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot])[dwd] 
plots the basis tree of wavelet image coefficients in the (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]) dwd.}, {, (RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot])[dwd,r]
plots coefficients up to refinement level r.}, {, (RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot])[dwd,r,ifunc]
applies the image function ifunc to coefficients and wavelet indexes before plotting.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot]) assembles a single image using a pyramid of images.

(RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot]) arranges coefficients in the same way as (RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot]).

(RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot])[dwd] is equivalent to (RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot])[dwd,(RefLink[Automatic, paclet:ref/Automatic])], corresponding to the basis of coefficients used in the (RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform]).

The wavelet indices used in the (RefLink[Automatic, paclet:ref/Automatic]) setting are given by dwd["BasisIndex"].

The dwd should be generated from image data and produced by (RefLink[DiscreteWaveletTransform, paclet:ref/DiscreteWaveletTransform]), (RefLink[DiscreteWaveletPacketTransform, paclet:ref/DiscreteWaveletPacketTransform]), or (RefLink[LiftingWaveletTransform, paclet:ref/LiftingWaveletTransform]).

(RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot])[dwd,r] plots basis coefficient images up to refinement level r when dwd comes from (RefLink[DiscreteWaveletTransform, paclet:ref/DiscreteWaveletTransform]) or (RefLink[LiftingWaveletTransform, paclet:ref/LiftingWaveletTransform]).

(RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot])[dwd,r] plots all coefficient images at refinement level r when dwd comes from (RefLink[DiscreteWaveletPacketTransform, paclet:ref/DiscreteWaveletPacketTransform]).

In (RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot])[dwd,r,ifunc], each ifunc[(Subscript[coef, i]),(Subscript[wind, i])] should yield an (RefLink[Image, paclet:ref/Image]) with the same dimensions as (Subscript[coef, i]).

(RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot]) has the same options as (RefLink[Image, paclet:ref/Image]), with the following additions and changes:

Possible settings for (RefLink[PlotLayout, paclet:ref/PlotLayout]) include: "Pyramid" and "Grid".

(RefLink[BaseStyle, paclet:ref/BaseStyle]) is used to specify the color of pixels to use at coefficient boundaries.

With the setting (RefLink[Method, paclet:ref/Method])->"InverseTransform", the inverse transform of each coefficient array will be plotted.

(RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot]) returns an (RefLink[Image, paclet:ref/Image]) object.

OpenersPrimaryExamplesSection(Spacer1)Examples  (26)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Show wavelet image coefficients arranged in a pyramid layout:

dwd=DiscreteWaveletTransform[,Automatic,3];

WaveletImagePlot[dwd]

Plot wavelet image coefficients in a grid layout:

WaveletImagePlot[dwd,PlotLayout->"Grid"]

Plot a full tree of wavelet packet coefficients at different refinement levels:

dwd=DiscreteWaveletPacketTransform[,Automatic,3];

Table[Labeled[WaveletImagePlot[dwd,r],r],{r,3}]

OpenersExampleSection1(Spacer1)Scope  (9)

OpenersExampleSubsection0(Spacer1)Data  (5)

(RefLink[DiscreteWaveletTransform, paclet:ref/DiscreteWaveletTransform]) of image data:

dwd=DiscreteWaveletTransform[,Automatic,3]

Plot image wavelet coefficients in a hierarchical grid:

WaveletImagePlot[dwd]

The plotted coefficients are the (RefLink[Automatic, paclet:ref/Automatic]) coefficients used in the inverse transform:

First/@dwd[Automatic]

Use (RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot])[dwd,r] to plot coefficients only up to refinement level r:

dwd=DiscreteWaveletTransform[];

Table[Labeled[WaveletImagePlot[dwd,r],r],{r,3}]

The hierarchical layout corresponds to the tree structure of the wavelet coefficients:

Table[DiscreteWaveletTransform[,Automatic,r][{"TreeView",Right}],{r,3}]

(RefLink[DiscreteWaveletPacketTransform, paclet:ref/DiscreteWaveletPacketTransform]) of image data:

dwd=DiscreteWaveletPacketTransform[,Automatic,3]

The (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]) object contains a full tree of coefficients at each level:

Table[Labeled[WaveletImagePlot[dwd,r],r],{r,3}]

Default (RefLink[Automatic, paclet:ref/Automatic]) coefficients for packet transform correspond to the highest refinement level:

dwd=DiscreteWaveletPacketTransform[,Automatic,3];

WaveletImagePlot[dwd]

(RefLink[WaveletBestBasis, paclet:ref/WaveletBestBasis]) computes a different (RefLink[Automatic, paclet:ref/Automatic]) tree of coefficients:

WaveletImagePlot[WaveletBestBasis[dwd,"LogEnergy"]]

Specify an image function f to apply to wavelet coefficients before plotting:

dwd=DiscreteWaveletTransform[,Automatic,3];

Table[Labeled[WaveletImagePlot[dwd,Automatic,f[ImageAdjust[#]]&],f],{f,{Identity,Blur,ColorNegate}}]

By default, (RefLink[ImageAdjust, paclet:ref/ImageAdjust])[(RefLink[ImageApply, paclet:ref/ImageApply])[(RefLink[Abs, paclet:ref/Abs]),#]& is applied:

{WaveletImagePlot[dwd],WaveletImagePlot[dwd,Automatic,ImageAdjust[ImageApply[Abs,#]]&]}

OpenersExampleSubsection1(Spacer1)Presentation  (4)

Display with a label:

dwd=DiscreteWaveletTransform[,Automatic,3];

Labeled[WaveletImagePlot[dwd,ImageSize->200],Text["image coefficients"]]

Specify a function to apply to each coefficient image:

dwd=DiscreteWaveletTransform[,Automatic,3];

Sharpen image coefficients:

WaveletImagePlot[dwd,Automatic,Composition[Sharpen,ImageAdjust][#]&,ImageSize->350]

Improve contrast:

WaveletImagePlot[dwd,Automatic,ImageAdjust[ImageAdjust[ImageApply[Abs,#]],{0,1,0.9}]&,ImageSize->350]

Control the displayed size of the generated image:

dwd=DiscreteWaveletTransform[,Automatic,3];

WaveletImagePlot[dwd,ImageSize->200]

Specify a style for grid lines separating wavelet coefficients:

dwd=DiscreteWaveletTransform[,Automatic,3];

WaveletImagePlot[dwd,BaseStyle->Red,ImageSize->200]

OpenersExampleSection2(Spacer1)Options  (4)

OpenersExampleSubsection2(Spacer1)BaseStyle  (1)

Specify a style for lines separating wavelet coefficients:

dwd=DiscreteWaveletTransform[];

WaveletImagePlot[dwd,BaseStyle->Red]

OpenersExampleSubsection3(Spacer1)ImageSize  (1)

Specify the size of the displayed image:

dwd=DiscreteWaveletTransform[];

{WaveletImagePlot[dwd,ImageSize->150],WaveletImagePlot[dwd,ImageSize->Tiny]}

The pixel dimensions of the image are not affected by (RefLink[ImageSize, paclet:ref/ImageSize]):

Map[ImageDimensions,%]

OpenersExampleSubsection4(Spacer1)Method  (2)

Inverse transform each coefficient before plotting:

img = ;

Inverse transform coefficients from stationary wavelet transform:

dwd1=StationaryWaveletTransform[img,Automatic,3];

WaveletImagePlot[dwd1,Method->"InverseTransform",ImageSize->100]

Inverse transform coefficients from lifting wavelet transform:

dwd2=LiftingWaveletTransform[img,Automatic,3];

WaveletImagePlot[dwd2,Method->"InverseTransform",ImageSize->100]

Choose which channel to plot in multichannel (RefLink[Image, paclet:ref/Image]):

dwd = LiftingWaveletTransform[,Automatic,3];

Table[Labeled[WaveletImagePlot[dwd,Method->m,ImageSize->150],m],{m,{"DataChannel"->1,"DataChannel"->2,"DataChannel"->3}}]

OpenersExampleSection3(Spacer1)Properties & Relations  (6)

(RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot]) returns an (RefLink[Image, paclet:ref/Image]) object:

dwd=DiscreteWaveletTransform[,Automatic,3];

{img=WaveletImagePlot[dwd],Head[img]}

Use like any other image:

Dilation[img,1]

Pixel dimensions of generated images depend on padding, wavelet, and refinement level:

dwd=DiscreteWaveletTransform[,CDFWavelet[],2,Padding->0];

WaveletImagePlot[dwd]

The generated image is generally larger than the original data:

{ImageDimensions[%],ImageDimensions[]}

(RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot]) plots image wavelet coefficients in a hierarchical grid layout:

dwd=DiscreteWaveletTransform[,Automatic,3];

WaveletImagePlot[dwd]

dwd[…,"Image"] gives each coefficient as a separate image:

dwd[Automatic,"Image"]

(RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot]) plots the (RefLink[Automatic, paclet:ref/Automatic]) coefficients used in the inverse transform:

dwd=DiscreteWaveletPacketTransform[,Automatic,3];

WaveletImagePlot[dwd]

(RefLink[WaveletBestBasis, paclet:ref/WaveletBestBasis]) selects a different default tree of coefficients:

best=WaveletBestBasis[dwd,"LogEnergy"];

WaveletImagePlot[best]

(RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot]) plots matrix wavelet coefficients in a hierarchical grid:

data=RandomReal[1,{10,10}];

dwd=DiscreteWaveletTransform[data];

WaveletMatrixPlot[dwd]

(RefLink[WaveletScalogram, paclet:ref/WaveletScalogram]) plots vector coefficients with numerical magnitude indicated by color:

data=Table[2-5 t+5 Exp[-500 (t-0.5)^2],{t,0,1,0.02}];

dwd=DiscreteWaveletTransform[data,Automatic,3];

WaveletScalogram[dwd]

(RefLink[WaveletListPlot, paclet:ref/WaveletListPlot]) plots vector coefficients with a common horizontal or vertical axis:

Table[WaveletListPlot[dwd,PlotLayout->p,PlotLabel->PlotLayout->p],{p,{"CommonXAxis","CommonYAxis"}}]

OpenersExampleSection4(Spacer1)Possible Issues  (3)

Generated images may be saturated if a custom image function f is specified:

dwd=DiscreteWaveletTransform[,Automatic,3];

Table[Labeled[WaveletImagePlot[dwd,Automatic,f],f],{f,{Blur[#]&,Sharpen[#]&,Dilation[#,2]&}}]

Compose the custom image function with (RefLink[ImageAdjust, paclet:ref/ImageAdjust]):

Table[Labeled[WaveletImagePlot[dwd,Automatic,Composition[f,ImageAdjust][#]&],f],{f,{Blur,Sharpen,Dilation[#,2]&}}]

Wavelet coefficients from stationary wavelet transform cannot be plotted using pyramid layout:

dwd= StationaryWaveletTransform[]

WaveletMatrixPlot[dwd,PlotLayout->"Pyramid"]

Pyramid layout cannot be constructed for inverse transformed wavelet coefficients:

dwd= DiscreteWaveletTransform[]

WaveletMatrixPlot[dwd,PlotLayout->"Pyramid"]

OpenersExampleSection5(Spacer1)Neat Examples  (2)

JPEG 2000 wavelet transform:

dwd = LiftingWaveletTransform[,CDFWavelet["9/7"],3];

Improve contrast for detail coefficients:

func[x_,{___,1|2|3}]:= ImageAdjust[ImageAdjust[ImageApply[Abs,x]],{0,2}];
func[x_,wind_]:= ImageAdjust[x];

WaveletImagePlot[dwd,Automatic,func]

Plot an image wavelet packet transform:

dwd=WaveletBestBasis[DiscreteWaveletPacketTransform[,Padding->"Extrapolated"]]

imgFunc[img_,{___,1|2|3}]:=Composition[Sharpen[#,0.5]&,ImageAdjust[#,{0,1}]&,ImageAdjust,ImageApply[Abs,#1]&][img]
imgFunc[img_,wind_]:=Composition[ImageAdjust,ImageApply[Abs,#1]&][img]

WaveletImagePlot[dwd,Automatic,imgFunc[#1,#2]&,BaseStyle->Red,ImageSize->500]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Image, paclet:ref/Image])  ▪  (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData])  ▪  (RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot])  ▪  (RefLink[WaveletListPlot, paclet:ref/WaveletListPlot])  ▪  (RefLink[DiscreteWaveletTransform, paclet:ref/DiscreteWaveletTransform])  ▪  (RefLink[LiftingWaveletTransform, paclet:ref/LiftingWaveletTransform])  ▪  (RefLink[DiscreteWaveletPacketTransform, paclet:ref/DiscreteWaveletPacketTransform])}})}})

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