IMAGE TECHNOLOGY

2D-DWT: A brief intro

A versatile signal processing tool formulated in the late 1980s by Daubechies (1988), Mallat (1989)

Reshu Singh
4 min readAug 12, 2020

Two Dimensional Discrete Wavelet Transform

Introduction:

The Discrete Wavelet Transform (DWT), formulated in the late 1980s by Daubechies (1988), Mallat (1989), became a very versatile signal processing tool after Mallat proposed the multi‐resolution representation of signals based on wavelet decomposition. Wavelets actually allow both time and frequency analysis of signals simultaneously as the energy of wavelets is concentrated in time and still possesses the wave‐like (periodic) characteristics!

Motivation: Discrete Fourier Transform provides the uniform frequency resolution and useful for analysing the spectral contents.

What is the Fourier Transform?

The Fourier Transform is a tool that breaks a waveform (a function or signal) into an alternate representation, characterized by sine and cosines. The Fourier Transform shows that any waveform can be re-written as the sum of sinusoidal functions. The Fourier Transform is a mathematical technique that transforms a function of time, x(t)- time domain, to a function of frequency, X(ω)- frequency domain

Questions to ponder?

a) Can we identify short bursts of high frequency signals over low frequency signals?

b)Can we approximate a signal by playing around with signal resolution “non uniformly” over the spectrum?

Major Drawback of FT— Doesn’t represent the abrupt changes efficiently!

Let’s visualise the drawback here-

FT Vs WT

Reason — FT not localized in time and space…and so “Wavelets” born!!

BTW, What are Wavelets?

Real-world data/signal is messy! Images have smooth regions interrupted by edges or abrupt changes in contrast. To represent such data, we have “Wavelets”, rapidly decaying wave-like oscillation that has zero mean and that exists for a finite duration.

The general wavelet formula is -

Quite similar to the formula of FOURIER TRANSFORM, assume integral as sigma :)

Where x is the real signal, ψ is an arbitrary mother wavelet, a is the scale and b is the translation (X is the processed signal,of course)

Different Sizes and Shapes of Wavelets -its key strength

Coz, we can choose right wavelet for right use-case

Key Wavelet Concepts:

SCALING — stretch/sink in the time domain

SHIFTING — delaying or advancing of wavelet along the length of the signal

Wavelet Transforms ( On the basis of Scaling and Shifting) Types

Continuous Wavelet Transform(CWT)— Applications: Time-freq analysis, Filtering of time localized frequency component.

Discrete Wavelet Transform(DWT) — Application: Denoising, Compressions of signals/image.

In other words, this transform decomposes the signal into mutually orthogonal set of wavelets, which is the main difference from the continuous wavelet transform (CWT), or its implementation for the discrete time series sometimes called discrete-time continuous wavelet transform (DT-CWT)

We are dealing mostly with Discrete type for image processing here —

Filterbank Structure: Decomposition Level1

We can interpret the decomposition as a breakdown of the signal
into spatially oriented frequency channels.

Theoretically,

HPF (High Pass Filter)- to extract edges

LPF (Low Pass Filter)-for approximation

LL — Passing through two simultaneous LPFs — gives an approximation

LH — Passing through LPH and then HPF — Horizontal features (HPF along rows)

HL — Passing through HPF and then LPF — Vertical features(HPF along col.)

HH — Pasing through two simultaneous HPFs — Diagonal features(HPF distributed equally along both rows and col)

Level 1 Decomposition
Level 2 Decomposition

Visually,

Input image at Level 1
After Level 1 decomposition

Further use case is found in Wavelet Scattering Network, analogous to CNN just that the filter weights in its case is fixed and in former it is learnt.

Wavelet Transform Network — CNN

In the upcoming tutorial, would be exploring the same and some hands-on with pywt(PyWavelets) and scikit library in python for DWT, so stay tuned!

References:

**https://in.mathworks.com/help/wavelet/ug/two-dimensional-discrete-wavelet-analysis.html

** http://www.thefouriertransform.com/

**NPTEL lectures on DWT

Pretty excited for the next post, aren’t you? ;)

--

--