DUAL TREE COMPLEX WAVELETS Part 1 Signal Processing Group, Dept. of Engineering University of Cambridge, Cambridge CB2 1PZ, UK. ngk@eng.cam.ac.uk www.eng.cam.ac.uk/~ngk February 2005 UNIVERSITY OF CAMBRIDGE
Dual Tree Complex Wavelets 1 Dual Tree Complex Wavelets Part 1: Basic form of the DT CWT How it achieves shift invariance DT CWT in 2-D and 3-D directional selectivity Application to image denoising Part 2: Q-shift filter design How good is the shift invariant approximation Further applications regularisation, registration, object recognition, watermarking.
Dual Tree Complex Wavelets 2 Features of the (Real) Discrete Wavelet Transform (DWT) Good compression of signal energy. Perfect reconstruction with short support filters. No redundancy. Very low computation order-n only. But Severe shift dependence. Poor directional selectivity in 2-D, 3-D etc. The DWT is normally implemented with a tree of highpass and lowpass filters, separated by 2 : 1 decimators.
Dual Tree Complex Wavelets 3 Real Discrete Wavelet Transform (DWT) in 1-D 1-D Input Signal x x 000 x 0000 H 0 (z) 2 x 00 (a) H 0 (z) 2 Level 4 x 0 H 0 (z) 2 Level 3 H 1 (z) 2 H 0 (z) 2 Level 2 H 1 (z) 2 x 001 Level 1 H 1 (z) 2 x 01 H 1 (z) 2 1 x 1 X 0 (z) 2 {X 0(z)+X 0 ( z)} X(z) (b) H 0 (z) 2 2 G 0 (z) 2-band reconstruction block H 1 (z) 2 2 X 1 (z) G 1 (z) 1 2 {X 1(z)+X 1 ( z)} x 0001 + Y (z) Figure 1: (a) Tree of real filters for the DWT. (b) Reconstruction filter block for 2 bands at a time, used in the inverse transform.
Dual Tree Complex Wavelets 4 Visualising Shift Invariance Apply a standard input (e.g. unit step) to the transform for a range of shift positions. Select the transform coefficients from just one wavelet level at a time. Inverse transform each set of selected coefficients. Plot the component of the reconstructed output for each shift position at each wavelet level. Check for shift invariance (similarity of waveforms). See Matlab demonstration.
Dual Tree Complex Wavelets 5 Features of the Dual Tree Complex Wavelet Transform (DT CWT) Good shift invariance. Good directional selectivity in 2-D, 3-D etc. Perfect reconstruction with short support filters. Limited redundancy 2:1 in 1-D, 4:1 in 2-D etc. Low computation much less than the undecimated (à trous) DWT. Each tree contains purely real filters, but the two trees produce the real and imaginary parts respectively of each complex wavelet coefficient.
Dual Tree Complex Wavelets 6 Q-shift Dual Tree Complex Wavelet Transform in 1-D H (3q) 0a 2 even (1) odd H (q) 01a 2 H (q) x 01a x 1a 2 (0) x 1a x 00b x 0b H (q) 00b 2 H (q) 0b 2 even (0) odd H 01b 2 (3q) x 01b 1-D Input Signal Tree a Level 1 H 1b (1) 2 x 0a Level 2 H 00a x 1b 2 x 00a Level 3 H 00a (3q) even H 01a H 00b even H 01b (3q) 2 2 x 000a Level 4 x 001a 2 2 H 00a (3q) even H 01a (q) x 000b H 00b x 001b Tree b 2 2 x 0000a x 0001a (q) even H 01b (3q) 2 2 x 0000b x 0001b Figure 2: Dual tree of real filters for the Q-shift CWT, giving real and imaginary parts of complex coefficients from tree a and tree b respectively. Figures in brackets indicate the approximate delay for each filter, where q = 1 4 sample period.
Dual Tree Complex Wavelets 7 Features of the Q-shift Filters Below level 1: Half-sample delay difference is obtained with filter delays of 1 4 and 3 4 period (instead of 0 and 1 2 a sample for our original DT CWT). of a sample This is achieved with an asymmetric even-length filter H(z) and its time reverse H(z 1 ). Due to the asymmetry (like Daubechies filters), these may be designed to give an orthonormal perfect reconstruction wavelet transform. Tree b filters are the reverse of tree a filters, and reconstruction filters are the reverse of analysis filters, so all filters are from the same orthonormal set. Both trees have the same frequency responses. Symmetric sub-sampling see below.
Dual Tree Complex Wavelets 8 Q-shift DT CWT Basis Functions Levels 1 to 3 1 0 1 D complex wavelets & scaling functions at levels 1 to 3. Level 1: scaling fn. Tree a Tree b 1 2 wavelet Level 2: scaling fn. a + jb 3 4 wavelet Level 3: scaling fn. 5 wavelet 20 15 10 5 0 5 10 15 20 sample number Figure 3: Basis functions for adjacent sampling points are shown dotted.
Dual Tree Complex Wavelets 9 Sampling Symmetries In a regular multi-resolution pyramid structure each parent coefficient must lie symmetrically below the mean position of its 2 children (4 children in 2-D). Each filter should also be symmetric about its mid point. For the Q-shift filters, fig 3 shows that parents are symmetrically below their children, and that Hi and Lo filters at each level are aligned correctly. Since one Q-shift tree is the time-reverse of the other, the combined complex impulse responses are conjugate symmetric about their mid points, even though the separate responses are asymmetric (see fig 3, right). Hence symmetric extension is still an effective technique at image edges.
Dual Tree Complex Wavelets 10 The DT CWT in 2-D When the DT CWT is applied to 2-D signals (images), it has the following features: It is performed separably, with 2 trees used for the rows of the image and 2 trees for the columns yielding a Quad-Tree structure (4:1 redundancy). The 4 quad-tree components of each coefficient are combined by simple sum and difference operations to yield a pair of complex coefficients. These are part of two separate subbands in adjacent quadrants of the 2-D spectrum. This produces 6 directionally selective subbands at each level of the 2-D DT CWT. Fig 4 shows the basis functions of these subbands at level 4, and compares them with the 3 subbands of a 2-D DWT. The DT CWT is directionally selective (see fig 7) because the complex filters can separate positive and negative frequency components in 1-D, and hence separate adjacent quadrants of the 2-D spectrum. Real separable filters cannot do this!
Dual Tree Complex Wavelets 11 2-D Basis Functions at level 4 0.6 0.4 0.2 0 Time Domain: n = 10, nzpi = 1 H L2 (z) H 0 (z 2 ) G 0 (z 2 ) DT CWT real part 0.2 15 10 5 0 5 10 15 0.1 Level 4 Sc. funcs. 0.05 d 0 15 45 75 75 45 15(deg) 60 40 20 0 20 40 60 0.1 Level 4 Wavelets 0.05 Magnitude 0 DT CWT imaginary part 0.05 Real Imaginary Real DWT 60 40 20 0 20 40 60 Time (samples) e jω 1x e jω 2y = e j(ω 1x+ω 2 y) 90 45(?) 0 Figure 4: Basis functions of 2-D Q-shift complex wavelets (top), and of 2-D real wavelet filters (bottom), all illustrated at level 4 of the transforms. The complex wavelets provide 6 directionally selective filters, while real wavelets provide 3 filters, only two of which have a dominant direction. The 1-D bases, from which the 2-D complex bases are derived, are shown to the right.
Dual Tree Complex Wavelets 12 2 levels of DT CWT in 2-D Figure 5: x Level 1 Row Filters Lo 1 Hi 1 r j 1 r j 1 Level 1 Column Filters Lo 1 r j 2 Lo 1 j 1 j 1 j 2 Hi 1 r j 2 j 1 Σ/ Hi 1 j 1 j 2 r r Lo 1 Lo 1 Hi 1 Hi 1 j 2 j 1 Σ/ j 1 j 2 r j 2 j 1 Σ/ j 1 j 2 Level 2 Row Filters r Lo q Lo q Hi q Hi q r j x1a r j x1b x2a x2b x3a x3b j 1 j 2 j 1 j 2 r j 1 j 2 j 1 j 2 Lo q Lo q Hi q Hi q Lo q Lo q Hi q Hi q r j 2 j 1 x 00 j 1 j 2 r Level 2 Column Filters j 2 j 1 Σ/ j 1 j 2 r j 2 j 1 j 1 j 2 r j 2 j 1 Directions of maximum sensitivity to edges Lo-Lo band to more levels Σ/ Σ/ j 1 j 2 x01a x01b x02a x02b x03a x03b
Dual Tree Complex Wavelets 13 Test Image and Colour Palette for Complex Coefficients 1 Colour palette for complex coefs. 0.8 0.6 0.4 Imaginary part 0.2 0 0.2 0.4 0.6 0.8 1 1 0.5 0 0.5 1 Real part
Dual Tree Complex Wavelets 14 2-D DT-CWT Decomposition into Subbands Figure 6: Four-level DT-CWT decomposition of Lenna into 6 subbands per level (only the central 128 128 portion of the image is shown for clarity). A colour-wheel palette is used to display the complex wavelet coefficients.
Dual Tree Complex Wavelets 15 2-D DT-CWT Reconstruction Components from Each Subband Figure 7: Components from each subband of the reconstructed output image for a 4-level DT-CWT decomposition of Lenna (central 128 128 portion only).
Dual Tree Complex Wavelets 16 2-D Shift Invariance of DT CWT vs DWT Components of reconstructed disc images Input (256 x 256) DT CWT DWT wavelets: level 1 level 2 level 3 level 4 level 4 scaling fn. Figure 8: Wavelet and scaling function components at levels 1 to 4 of an image of a light circular disc on a dark background, using the 2-D DT CWT (upper row) and 2-D DWT (lower row). Only half of each wavelet image is shown in order to save space.
Dual Tree Complex Wavelets 17 The DT CWT in 3-D When the DT CWT is applied to 3-D signals (eg medical MRI or CT datasets), it has the following features: It is performed separably, with 2 trees used for the rows, 2 trees for the columns and 2 trees for the slices of the 3-D dataset yielding an Octal-Tree structure (8:1 redundancy). The 8 octal-tree components of each coefficient are combined by simple sum and difference operations to yield a quad of complex coefficients. These are part of 4 separate subbands in adjacent octants of the 3-D spectrum. This produces 28 directionally selective subbands (4 8 4) at each level of the 3-D DT CWT. The subband basis functions are now planar waves of the form e j(ω 1x+ω 2 y+ω 3 z), modulated by a 3-D Gaussian envelope. Each subband responds to approximately flat surfaces of a particular orientation. There are 7 orientations on each quadrant of a hemisphere.
Dual Tree Complex Wavelets 18 3D subband orientations on one quadrant of a hemisphere Z LLH HLH LHH 3D frequency domain: HHH 3D Gabor-like basis functions: X HLL HHL LHL Y h k1,k2,k3 (x, y, z) e (x2 + y 2 + z 2 )/2σ 2 e j(ω k1 x + ω k2 y + ω k3 z) These are 28 planar waves (7 per quadrant of a hemisphere) whose orientation depends on ω k1 {ω L, ω H } and ω k2, ω k3 {±ω L, ±ω H }, where ω H 3ω L.
Dual Tree Complex Wavelets 19 Applications The Q-shift DT CWT provides a valuable analysis and reconstruction tool for a variety of application areas: Motion estimation [Magarey 98] and compensation Registration [Kingsbury 02] Denoising [Choi 00] and deconvolution [Jalobeanu 00, De Rivaz 01] Texture analysis [Hatipoglu 99] and synthesis [De Rivaz 00] Segmentation [De Rivaz 00, Shaffrey 02] Classification [Romberg 00] and image retrieval [Kam & Ng 00, Shaffrey 03] Watermarking of images [Loo 00] and video [Earl 03] Compression / Coding [Reeves 03] Seismic analysis [van Spaendonck & Fernandes 02] Diffusion Tensor MRI visualisation [Zymnis 04]
Dual Tree Complex Wavelets 20 De-Noising Method: Transform the noisy input image to compress the image energy into as few coefs as possible, leaving the noise well distributed. Suppress lower energy coefs (mainly noise). Inverse transform to recover de-noised image. What is the Optimum Transform? DWT is better than DCT or DFT for compressing image energy. But DWT is shift dependent Is a coef small because there is no signal energy at that scale and location, or because it is sampled near a zero-crossing in the wavelet response? The undecimated DWT can solve this problem but at significant cost redundancy (and computation) is increased by 3M : 1, where M is no. of DWT levels. The DT CWT has only 4 : 1 redundancy, is directionally selective, and works well.
Dual Tree Complex Wavelets 21 4 Denoising gain and output functions 3.5 3 2.5 2 Soft Threshold 1.5 Output, y = g. x 1 Gain, g 0.5 0 0 0.5 1 1.5 2 2.5 3 3.5 4 Input coefficient magnitude, x
Dual Tree Complex Wavelets 22 1 0.9 0.8 0.7 0.6 0.5 Real Wavelet Coefs: Gaussian pdfs 0.4 small var. 0.3 0.2 0.1 large var. 0 10 8 6 4 2 0 2 4 6 8 10 Figure 9: Probability density functions (pdfs) of small and large variance Gaussian distributions, typical for modelling real and imaginary parts of complex wavelet coefficients.
Dual Tree Complex Wavelets 23 2 1.8 1.6 1.4 1.2 1 Complex Wavelet Coef Magnitudes: Rayleigh pdfs 0.8 0.6 small var. 0.4 0.2 large var. 0 0 1 2 3 4 5 6 7 8 9 10 Figure 10: Probability density functions (pdfs) of small and large variance Rayleigh distributions, typical for modelling magnitudes of complex wavelet coefficients.
Dual Tree Complex Wavelets 24 Image Denoising with different Wavelet Transforms - Lenna AWGN SNR = 3.0 db Real DWT SNR = 11.67 db Undec. WT SNR = 12.82 db DT CWT SNR = 12.99 db
Dual Tree Complex Wavelets 25 Image Denoising with different Wavelet Transforms - Peppers AWGN SNR = 3.0 db Real DWT SNR = 12.24 db Undec. WT SNR = 13.45 db DT CWT SNR = 13.51 db
Dual Tree Complex Wavelets 26 Heirarchical Denoising with Gaussian Scale Mixtures (GSMs) Non-heir. DT CWT SNR = 12.99 db Heirarchical DT CWT SNR = 13.51 db Non-heir. DT CWT SNR = 13.51 db Heirarchical DT CWT SNR = 13.85 db
Dual Tree Complex Wavelets 27 Denoising a 3-D dataset e.g. Medical 3-D MRI or helical CT scans. Method: Perform 3-D DT CWT on the dataset. Attenuate smaller coefficients, based on their magnitudes, as for 2-D denoising. (Heirarchical methods are also quite feasible.) Perform inverse 3-D DT CWT to recover the denoised dataset. A Matlab example shows denoising of an ellipsoidal surface, buried in Gaussian white noise.
Dual Tree Complex Wavelets 28 Conclusions Part 1 The Dual-Tree Complex Wavelet Transform provides: Approximate shift invariance Directionally selective filtering in 2 or more dimensions Low redundancy only 2 m : 1 for m-d signals Perfect reconstruction Orthonormal filters below level 1, but still giving linear phase (conjugate symmetric) complex wavelets Low computation order-n; less than 2 m times that of the fully decimated DWT ( 3.3 times in 2-D, 5.1 times in 3-D)
Dual Tree Complex Wavelets 29 Conclusions (cont.) A general purpose multi-resolution front-end for many image analysis and reconstruction tasks: Enhancement (deconvolution) Denoising Motion / displacement estimation and compensation Texture analysis / synthesis Segmentation and classification Watermarking 3D data enhancement and visualisation Coding (?) Papers on complex wavelets are available at: http://www.eng.cam.ac.uk/ ngk/ A Matlab DTCWT toolbox is available on request from: ngk@eng.cam.ac.uk