You are on page 1of 62

A

Dissertation
On

“Wavelet Transform Based


Image Compression CODECS”
By

Sandip D. Lulekar
(2006MEC007)

Supervisors
Dr. S. V. Bonde Dr. T. R. Sontakke
Sant Gajanan Invention & Advanced Research Center
(SGIARC)

Shri Sant Gajanan Maharaj College of Engineering,


SHEGAON (M.S.)
2
Outline
1. Introduction
2. Problem Definition
3. Block Diagram of CODEC
4. Wavelet Transform
5. Algorithms (EZW, SPIHT & SPECK)
6. Design of 2D-DWT core
7. Results
8. Conclusions & Future Work
3
1. Introduction
1.1 Image Compression

• Digital Image – matrix of pixels


• Uncompressed multimedia data – (graphics, audio &
video) requires considerable storage capacity & huge
transmission bandwidth
• Data compression – represents information in a compact
form
• Image compression – creates image file sizes of
manageable & transmittable dimensions
4
1.2 Need for Image Compression

5
1.3 Principles behind Image Compression

• Redundancy reduction – removing duplication from the


signal source (image/video)
• Irrelevancy reduction – omits parts of the signal that
will not be noticed by the signal receiver (HVS)
1. Spatial Redundancy – correlation between neighboring
pixels
2. Spectral redundancy – correlation between different
color planes or spectral bands
3. Temporal redundancy – correlation between adjacent
frames in a sequence of images
6
2. Problem Definition
• Heterogeneous network
• Providing efficient compression is not sufficient
• Main challenge – how a single flexible bit-stream can be
provided to optimally service each user

• Solution – some sort of scalable & embedded


functionalities need to be provided by the CODEC

• Wavelet Transform – based image compression


algorithms:
• EZW, SPIHT & SPECK
7
• Scalability – a potential in the coded bit-stream, which
allows the decoder to usefully decode from only parts of
the bit-stream

• In order to meet certain requirements such as quality,


spatial resolution & temporal resolution

• Embeddedness – a single coded file can be used to


decode the image

1. MATLAB Implementation – EZW, SPIHT & SPECK


2. CADENCE Implementation – 2D DWT core

8
3. Block Diagram of CODEC
1. COder

2. DECoder

Entropy Inverse Inverse


Decoder Decoder Quantizer WT

9
4. Wavelet Transform on Image
4.1 Background

• Signals – in their raw form are time-amplitude


representation
• Transformation – These time-domain signals are often
needed to be transformed into other domains like
frequency domain
• Transform – of a signal is just another form of
representing the signal
• It does not change the information content present in the
signal
10
• Transformation of signals – helps in identifying distinct
information which might otherwise be hidden in the
original signal

• Depending on the application – the transformation


technique is chosen, and each technique has its own
advantages & disadvantages

• Transform Types
1. FT (Fourier Transform) – DFT, STFT & FFT
2. DCT (Discrete Cosine Transform)
3. WT (Wavelet Transform) – CWT, DWT

11
4.2 Why Wavelet Transform?

1. Fourier Transform (FT)


• Frequency content – of the signal is very important
• Most popular transform – used to obtain the frequency
spectrum of a signal
• Suitable for stationary signal – signals whose frequency
content does not change with time

• Drawback – tells how much of each frequency exists in


the signal, but it does not tell at which time these
frequency components occur

12
2. Short Time Fourier Transform (STFT)
• Signals – image & speech have different characteristics
at different time or space
• i.e. they are non-stationary
• To analyze – these signals, both frequency & time
information are needed simultaneously
• Hence STFT was introduced
• Input signal – chopped into sections, & each is
analyzed for its frequency content separately

• Drawbacks – fixed window width


– gives constant resolution at all frequencies

13
3. Wavelet Transform (WT)
• A Wave – is an oscillating function of time or space
• Wavelets – are localized waves, & have their energy
concentrated in time or space and are suited to
analysis of non-stationary signals
• Wavelet Transform – provides a better time-frequency
representation of the signal

• Multi-resolution Technique – by which different


frequencies are analyzed with different resolutions
• Image compression – based on the ideas of sub-band
decomposition or Discrete Wavelet Transform

14
4.3 Pyramidal Decomposition

LL

HL

LH

HH

15
4.4 2D-DWT of Image

LL HL

Image
LH HH

16
5. Algorithms
5.1 EZW (Embedded Zero-tree Wavelet)

• Introduced by J. M. Shapiro in 1993


1. Larger Wavelet coefficient – contains more
information & therefore the EZW algorithm encodes the
larger wavelet coefficients first

2. Maximum & average absolute coefficient – values


tend to get smaller as one move from the lower
frequency subbands to the higher frequency subbands

17
5.1.2 Zero Tree Structure
• Zero-tree structure – is a tree in which the parent-object
has four child objects

• Parent – coefficients at coarse


scale

• Children – coefficients
corresponding to same spatial
location at the next finer scale of
similar orientation
• zero-tree structure decreases from parent to child
18
• Significant Test – if a coefficient is found to be
insignificant with threshold ‘tO’ then all the children will
be insignificant too & therefore ‘branch’ will not contain
any important information

• A whole tree – could be encoded as a single symbol,


resulting in data reduction
• Output – produced by the EZW algorithm is progressive
in nature
• Resolution – as more data is added to the compression
process, the more detailed image will be reconstructed
• E in EZW – Progressive coding is also known as
Embedded coding
19
5.1.3 EZW Algorithm

20
• (DL) – coordinates of the coefficients to be coded
• (SL) – coefficients already coded as significant

1. Positive (P) – If the coefficient c is significant according


to current threshold ‘to’ and positive
2. Negative Significant (N) – If the coefficient c is significant
according to current threshold ‘to’ and negative
3. Isolated Zero (IZ) – If the coefficient c is insignificant
according to current threshold ‘to’ and one or more of its
descendants significant
4. Zero-tree root (ZT) – If current coefficient c and all of its
descendants are insignificant (zero) according to current
threshold ‘to’
21
5.1.4 Dominant Pass

22
5.1.5 Subordinate Pass

23
5.2 SPIHT (Set Partitioning In Hierarchical Trees)

5.2.1 Introduction

• Introduced – by Amir Said & William Pearlman in 1996

• Produces – an embedded bit stream from which the best


reconstructed images can be extracted
• Idea – is based on partitioning of sets, which consists of
coefficients or representatives of whole sub-trees
• Root of the tree – is excluded from the computation of
the significance attribute
• Classify – the coefficients of a wavelet transformed
image into the three different sets: i.e. – LIP, LIS, LSP
24
1. List of Insignificant Pixels (LIP) – which contains the
coordinates of those coefficients which are insignificant
with respect to the current threshold
2. List of Significant Pixels (LSP) – which contains the
coordinates of those coefficients which are significant
with respect to threshold
3. List of Insignificant Sets (LIS) – which contains the
coordinates of the roots of insignificant subtrees

• Sets of coefficients – in LIS are refined and if coefficients


become significant they are moved from LIP to LSP,
During the compression procedure

25
• Difference – to EZW, is the definition of the significance
• A significance function Sn(t) – which decides the
significance of the set of coordinates with respect to the
threshold 2n

Sn(T) = 1 , if max (i,j)ЄT{|Ci,j|}>2n


0 , else
Notations
• H – Roots of the all spatial orientation trees
• O(i, j) – Set of offspring of the coefficient (i, j)
• D(i, j) – Set of all descendants of the coefficient (i, j)
• L(i, j) – D(i, j) - O(i, j)

26
5.2.2 Parent-Child Relationship in SPIHT

• Significance is computed for the sets D(i, j) and L(i, j)


27
• SPIHT Algorithm

1.Initialization

Compute initial threshold


LIP: all root nodes (in low pass subband)
LIS: all trees (type D)
LSP: empty

2.Sorting Pass
a) Check significance of all coefficients in LIP
• If significant, output 1 followed by a sign bit &
move it to LSP
• If insignificant, output 0

28
b) Check significance of all trees in LIS
For type-D tree
• If significant, output 1 & proceed to code its children
• If a child is significant, output 1, sign bit, & add it to LSP
• If a child is insignificant, output 0 and add it to the end of
LIP
• If the child has descendants, move the tree to the end of
LIS as type L, otherwise remove it from LIS
• If insignificant, output 0
For type-L tree
• If significant, output 1, add each of the children to the end
of LIS as type D and remove the parent tree from LIS
• If insignificant, output 0

3. Refinement pass, like EZW


• Decrease the threshold by a factor of 2
• Go to Step 2.

29
5.3 SPECK (Set Partitioning Embedded BloCK)
• Different – from others in that it does not use trees,
which span and exploit the similarity across different
subbands
• it makes use of sets or groups of pixels-called blocks

• Main idea – is to exploit the clustering of energy in


frequency & space in hierarchical structures of the
transformed images
• Significance testing – on sets determines whether the
maximum magnitude in it is above a certain threshold
• Results – of these tests determines the path taken by the
coder to code the source samples
30
5.3.1 SPECK coding
• Image – X is represented by an indexed set of
transformed coefficients C{i, j} located at pixel position (i,
j)
• Pixels – are grouped together in sets, which comprise of
regions in the transformed image
• Followed by the ideas of SPIHT completes the SPECK
algorithm
• Condition – a set T of pixels is significant with respect to
threshold n, if
max (i,j)ЄT{|Ci,j|}>2n

Otherwise it is insignificant
31
5.3.2 Partitioning of Image X

• SPECK – algorithm makes use of rectangular regions of


image
• Regions – or sets therefore referred to as sets of type S,
can be of varying dimensions
• Dimension – of a set S depends on the dimension of the
original image & the subband level of the pyramidal
structure at which the set lies
32
• We maintain two lists:
• LIS – List of Insignificant Sets
• LSP – List of Significant Pixels
• The LIS contains sets of type S of varying sizes which
have not yet been found significant against threshold n

• SPECK Algorithm
• The actual algorithm consists;
1. Initialization step
2. Sorting Pass
3. Refinement Pass
4. Quantization step
33
5.3.3 SPECK Encoder

34
5.3.4 SPECK Decoder

35
6. Design of 2D-DWT core
• 2D-DWT/IDWT – is a heart
• Hence its core (HDL-Code) was designed & verified
• Consist of computation, data storage, and control blocks

• EDA Tools – CADENCE Design Systems Inc., platform


• NC-VHDL – all the blocks and the interface were
described
• RTL compiler – after the RTL core description was
verified, the gate level circuit was synthesized
• NCSim – for the verification of the whole functions we
simulated the core with the behavioral description
36
6.1 Original DWT

37
6.2 Modified DWT

38
6.3 Architecture

39
6.4 CADENCE EDA Tools Flow

40
7. Results
7.1 MATLAB Platform
Tree Coding Block
EZW Coding
SPECK
SPIHT

Wavelet type: biorthogonal 4.4, Level: 7


Algorithm Image Size MSE PSNR(dB)
EZW Lena 256x256 155.66 26.21
512x512 79.04 29.15
SPIHT Lena 256x256 14.84 36.41
512x512 6.72 39.85
41
Wavelet type: biorthogonal, Level: 10

Algorithm Image Size MSE PSNR(dB)

Lena 128x128 135.30 26.19


SPECK
Penny 512x512 4.83 41.29

42
1. EZW Algorithm

43
2. SPIHT Algorithm

44
3. SPECK Algorithm

45
7.2 CADENCE EDA Tools Platform

• Benchmark example – such as a Lena image used

• Simulation results – were compared with the results


obtained from the MATLAB programs

• Synthesized – system composed of 16,187 equivalent


2-input NAND gates, this gate count is considerably small

• 8-bit, B/W – Lena image with 256 X 256 pixels required


850,000 clock cycles

46
1. DWT Core Input

47
DWT Core Output

48
2. DWT Control Input

49
DWT Control Output

50
3. IDWT Control Input

51
IDWT Control Output

52
4. RWTU Input

53
RWTU Output

54
5. Module: DWT Top

55
Module: MUX

56
8. Conclusions & Future Work
8.1 Conclusions

• Results – show that these algorithms are successfully


implemented
• Implementation – creates a single file of coded bitstream
• As more no. bits – are added to the right side of the
bitstream more fine details/resolution we get

• Hence the problem – of embeddedness & scalability in a


image compression CODEC as stated in the problem
definition are completely eliminated
57
• It can be used in future image compression systems

• 2D-DWT core – shows a very good performance

• From the satisfactory – simulation and synthesized


results we can conclude that 2D-DWT core works
properly

• Goal – of project work is satisfied

58
8.2 Future Work

• M-EZW, M-SPIHT & L-SPECK algorithms can also be


implemented

• Currently working on SOC Encounter EDA Tool, so that


complete VLSI chip of our proposed architecture of the
2D-DWT core can be obtained

• 2D-DWT core can be used in various image processing


ASIC chips

59
Thank You …!!!

60
References
[1] R. Sudhakar, Ms R. Karthinga, S. Jayaraman, “Image
Compression Using Coding of Wavelet Coefficients – A
Survey”, International Congress for Global Science & Technology
(ICGST)- International Journal on Graphics, Vision & Image
Processing (GVIP), GVIP Special Issue On Image Compression,
pp 1 – 13, 2007.
[2] Robi Polikar, “The Engineer’s Ultimate Guide to Wavelet
Analysis”.
http://users.rowan.edu/~polikar/WAVELETS/WTtutorial.html

[3] K. Sayood, “Introduction to Data Compression”, 2nd Edition,


Academic Press, Morgan Kaufmann Publishers, 2000.

[4] Jerome M Shapiro, “Embedded Image Coding Using Zerotrees


of Wavelet Coefficients”, IEEE Transaction on Signal Processing,
vol. 41, no. 12, pp 3445 – 3462, December 1993.
61
[5] Amir Said & Pearlman W.A., “A New, Fast and Efficient Image
Coder based on Set Partitioning In Hierarchical Trees”, IEEE
Transaction on Circuit and Systems for Video Technology, vol. 6,
no. 3, pp 243 – 250, June 1996.

[6] Pearlman W. A., Islam A., Nagraj N. & Said A., “Efficient Low-
Complexity Image Coding with a Set-Partitioning Embedded
Block Coder”, IEEE Transaction on Circuit and Systems for Video
Technology, vol. 14, no. 11, pp 1219 – 1235, November 2004.

[7] Seonyoung Lee & Kyeongsoon Cho, “Design of a Two-


dimensional Discrete Wavelet Core for Image Compression”,
Journal of the Korean Physical Society, vol. 38, no. 3, pp 224 –
231, March 2001.

[8] Incisve Simulation, CADENCE Lab Manual, Version 5-8.3,


http://www.cadence.com
62

You might also like