• No results found

A flexible hardware architecture for 2-D discrete wavelet transform: design and FPGA implementation

N/A
N/A
Protected

Academic year: 2019

Share "A flexible hardware architecture for 2-D discrete wavelet transform: design and FPGA implementation"

Copied!
135
0
0

Loading.... (view fulltext now)

Full text

(1)

Rochester Institute of Technology

RIT Scholar Works

Theses

Thesis/Dissertation Collections

5-23-2003

A flexible hardware architecture for 2-D discrete

wavelet transform: design and FPGA

implementation

Richard Carbone

Follow this and additional works at:

http://scholarworks.rit.edu/theses

This Thesis is brought to you for free and open access by the Thesis/Dissertation Collections at RIT Scholar Works. It has been accepted for inclusion in Theses by an authorized administrator of RIT Scholar Works. For more information, please [email protected].

Recommended Citation

(2)

A Flexible Hardware Architecture for 2-D Discrete

Wavelet Transform: Design and FPGA Implementation

by

Richard

L.

H. Carbone

May 23,2003

A thesis submitted in partial fulfillment of

the requirements for the degree of

Masters of Science in

Computer Engineering

Rochester Institute of Technology

Approved by:

Principal Advisor:

Dr. Andreas Savakis, Associate Professor and Department Head

Committee Member:

Dr. Marcin Lukowiak, Visiting Assistant Professor

Committee Member:

(3)

Release Permission Form

Rochester Institute of Technology

A Flexible Hardware Architecture for 2-D Discrete Wavelet Transfonn:

Design and FPGA Implementation

I, Richard Carbone, hereby grant pennission to the Wallace Library of the Rochester Institute of

Technology to reproduce my thesis in whole or in part. Any reproduction will not be for

commercial use or profit.

(4)

Abstract

The Discrete Wavelet Transform

(DWT)

is a powerful signalprocessing tool that has recently gained widespread acceptance in thefield ofdigital image processing. The multiresolution analysis provided

by

the DWTaddresses the shortcomings ofthe Fourier Transform and its

derivatives. The DWThasproven usefulin thearea of imagecompression whereitreplaces the Discrete Cosine Transform

(DCT)

in newJPEG2000andMPEG4 image and video compression standards. The Cohen-Daubechies-Feauveau

(CDF)

5/3 and CDF 9/7 DWTs are usedfor reversible lossless and irreversible

lossy

compression encoders in the JPEG2000 standard respectively.

Thedesignandimplementation ofaflexible hardwarearchitectureforthe2-D DWT ispresented

inthis thesis. Thisarchitecturecanbeconfiguredtoperformboth theforwardandinverseDWT for any DWT

family,

usingfixed-pointarithmetic and no auxiliarymemory. The

Lifting

Scheme methodis usedtoperform theDWT insteadoftheless efficient convolution-based methods. The

DWTcore is modeled using MATLAB and

highly

parameterized VHDL. The VHDL model is synthesized to a Xilinx FPGA to prove hardware functionality. The CDF 5/3 and CDF 9/7 versions ofthe DWT are both modeled and used as comparisons throughout this thesis. The DWTcoreis usedinconjunction with averysimpleimage

denoising

module to demonstrate the

potentialoftheDWTcoretoperformimage processingtechniques.

The CDF 5/3 hardwareproduces identical resultsto its theoreticalMATLABmodel. The fixed-pointCDF 9/7 deviates very slightlyfrom itsfloating-point MATLABmodel witha ~59dBPSNR deviation fornine levels ofDWT decomposition. Theexecution timefor performing both DWTs isnearly identicalat -14clock cycles perimagepixelforone levelofDWTdecomposition. The hardware area generatedforthe CDF 5/3 is -16,000 gates using only 5% ofthe XilinxFPGA

(5)

Acknowledgements

(6)

Table

of

Contents

Release Permission Form i

Abstract ii

Acknowledgements iii

TableofContents iv

ListofFigures vi

ListofTables ix

Chapter 1. Introduction 1

Chapter2.Background 3

2.1. Wavelet Motivation 3

2.1.1. Fourier Transform 4

2.1.2. Short Term Fourier Transform 4

2.2. MultiresolutionAnalysisandtheWavelet Transform 5

2.2.1. Continuous Wavelet Transform

(CWT)

6

2.2.2. Discrete Wavelet Transform

(DWT)

8

2.3. BiorthogonalWavelets 12

2.3.1. CDF 5/3 13

2.3.2. CDF 9/7 14

2.4. DWT using Convolution 16

2.5. DWT using

Lifting

Scheme 18

2.5.1. Featuresof

Lifting

Scheme 24

2.5.2.

Lifting

Step

Extraction 25

2.5.3. CDF 5/3 DWT using

Lifting

Scheme 26

2.5.4. CDF 9/7 DWT using

Lifting

Scheme 30

2.6. 2-D DWTandDigital Images 34

2.6.1. 2-D DWT 34

2.6.2. 2-D DWT Properties andDigital Images 39

2.7. Wavelet ApplicationstoDigital Images 41

2.7.1. Image

Denoising

41

2.7.2. Image Compression 44

2.8. Current Implementations ofDWT 47

2.8.1. Software 48

2.8.2. Hardware 48

Chapter 3.DesignandImplementationofDWT Core 51

3.1. DWT Core Features 51

3.2. DWT Core Design 53

3.3. DWT CoreImplementation 80

3.3.1. MATLAB Implementation 80

3.3.2. VHDLImplementation 81

3.3.3. FPGAImplementation 82

Chapter4. Results 86

4.1. DWT CoreVerification 86

4.1.1. MATLABVerification 88

4.1.2. VHDLVerification 93

(7)

4.2. PerformanceAnalysis 97

4.3. Synthesis Results 100

4.3.1. Hardware Area 100

4.3.2. Hardware Speed 103

4.4.

Denoising

Results 105

Chapters.Conclusion 109

5.1. Recommendations for Future Work 109

References 117

Appendix 119

Appendix A: DWT Images 119

Appendix B:

Denoising

Results 120

Appendix C: MATLAB Source Code 121

Appendix D: VHDL Source Code 122

(8)

List

of

Figures

Figure2.1: Exampleof aMother Wavelet 7

Figure2.2: ExampleofScaled

Baby

Wavelet 7

Figure 2.3: ExampleofTranslated

Baby

Wavelet 7

Figure2.4: Dyadic

Sampling

9

Figure 2.5: Subband Decomposition without

Scaling

Function 9 Figure 2.6: Subband Decomposition with

Scaling

Function 10 Figure 2.7: Haar

Family

Wavelet

(a)

and

Scaling

Function

(b)

10 Figure 2.8: DWT AnalysisofSignal using Two-Channel Subband

Coding

11 Figure 2.9: Multiple Level DWT AnalysisofSignal using Two-Channel Subband

Coding

12 Figure 2.10: DWT SynthesisofSignal using Two-Channel Subband

Coding

12

Figure 2.11: CDF 5/3 Analysis Wavelet 13

Figure 2.12: CDF 5/3 Synthesis Wavelet 13

Figure 2.13: CDF 9/7 Analysis Wavelet 14

Figure 2.14: CDF 9/7 Synthesis Wavelet 15

Figure 2.15: Forward DWT using Convolution 17

Figure 2.16: Split

Step

ofForward DWT using

Lifting

Scheme 19 Figure 2.17: SplitandPredict StepsofForward DWT using

Lifting

Scheme 20 Figure 2. 18:

Split, Predict,

andUpdate StepsofForward DWT using

Lifting

Scheme 21 Figure 2.19: Forward DWT using

Lifting

SchemewithMultiple

Lifting

Steps 22 Figure 2.20: Forward DWT using

Lifting

SchemewithMultiple

Lifting

and

Scaling

Steps 23

Figure 2.21: Inverse DWTvia

Lifting

Scheme 23

Figure 2.22: Inverse DWT using

Lifting

SchemewithMultiple

Lifting

and

Scaling

Steps 24 Figure 2.23: Forward CDF 5/3 DWT using

Lifting

Scheme 27 Figure 2.24: Forward CDF 9/7 DWT using

Lifting

Scheme 32

Figure 2.25: Forward 2-D DWT 35

Figure 2.26: Forward 2-D DWT Row

Processing

ofImage 35

Figure 2.27: Forward 2-D DWT Column

Processing

ofImage 36

Figure 2.28: Forward 2-D DWTofImage 36

Figure 2.29: Forward 2-D DWT for Multiple LevelsofDecomposition 37 Figure 2.30: Forward 2-D DWT RowandColumn

Processing

ofImagefor Multiple Levelsof

Decomposition 37

Figure 2.3 1: Forward 2-D DWTofImage for Multiple LevelsofDecomposition 38

Figure 2.32: Image

Denoising

Block Diagram 42

Figure2.33: Hard

Thresholding

43

Figure2.34: Soft

Thresholding

43

Figure2.35: ImageCompressionBlock Diagram 45

Figure2.36: Embedded Zero Tree 47

Figure 2.37:

Analog

DevicesADV601

Chip

Block Diagram 49

Figure 3.1: DWTCore ComponentDiagram 53

Figure3.2: DWT CoreInterface 54

Figure3.3: MEMORY_CONTROLLERStateDiagram 55

Figure 3.4: MULTI_LIFT_REORDER_2D_CTRLState Diagram 56

Figure3.5: LIFT_REORDER_2D_CTRLState Diagram 58

(9)

Figure 3.7: LIFT_RE0RDER_1D_CTRLState Diagram 61

Figure 3.8: Forward CDF 5/3 DWTofRowofPixels using

Sliding

Window Method 63

Figure3.9: Forward CDF 9/7 DWTofRowofPixels using

Sliding

Window Method 65

Figure3.10:

Reordering

of

Scaling

andWaveletCoefficientswithin aRow 66

Figure 3.1 1:

Reordering

Algorithmfor

Scaling

andWaveletCoefficients within aRow 69

Figure3.12: LIFT_1D_CTRL

Lifting

Scheme StateMachine 72

Figure 3.13: LIFT_1D_CTRL

Reordering

State Machine 74

Figure 3.14: Forward ConfigurationofSLTDING_WINDOWunitfor CDF 5/3 DWT 76 Figure 3.15: Inverse ConfigurationofSLTDING_WINDOWunitfor CDF 5/3 DWT 76 Figure 3.16: Forward ConfigurationofSLIDlNG_WINDOWunitfor CDF 9/7 DWT 77 Figure 3.17: Inverse ConfigurationofSLTDING_WINDOWunitfor CDF 9/7 DWT 77 Figure 3.18: ExampleofGenerated FPT_COEF_MULT Hardware 80

Figure 3.19: PictureofXSV-300 FPGA

Prototyping

Board 83

Figure 3.20: Module DiagramofXSV-300 FPGA

Prototyping

Board 83 Figure 3.21: SRAM Interface Circuit Diagram for XSV-300 FPGA

Prototyping

Board 84 Figure 3.22: Clock Interface Circuit Diagram for XSV-300 FPGA

Prototyping

Board 84 Figure 3.23: Input Switch Interface Circuit Diagram for XSV-300 FPGA

Prototyping

Board.. 84

Figure 3.24: Output LED Interface Circuit Diagram for XSV-300 FPGA

Prototyping

Board... 85

Figure 4.1: Lena 512x512 Pixel 8-bit Grayscale Image 87

Figure 4.2: ComparisonofLena Image Transformed using CDF 9/7 DWT Convolutionand

Lifting

Schemefor Multiple LevelsofDecomposition 89 Figure 4.3: ComparisonofLena Image Transformed using CDF 9/7 DWT

Lifting

Schemewith

ActualandApproximated Coefficients for Multiple LevelsofDecomposition 90 Figure 4.4: ComparisonofLena Image TransformedandReconstructed MultipleTimes using

Lifting

Scheme CDF 9/7 DWT for Multiple LevelsofDecomposition 92

Figure 4.5: Rapper 75x84 Pixel 8-bit Grayscale Image 94

Figure 4.6: Execution Time for CDF 5/3andCDF 9/7 DWTonRapper Image for Multiple

LevelsofDecomposition 94

Figure 4.7: Normalized

Complexity

of2-D DWT for Different LevelsofDecomposition 97 Figure 4.8: Normalized

Memory

Bandwidth

(Reads/Writes)

for CDF5/3 andCDF 9/7 DWT

using

Convolution,

Lifting

Scheme,

andDWTCore 99

Figure 4.9: Normalized Arithmetic Operations for CDF 5/3 andCDF9/7 DWT using

Convolution,

Lifting

Scheme,

andDWT Core 100

Figure 4.10: Combinational Logic Units for CDF 5/3 andCDF 9/7 DWT Synthesized for

Maximum Speed/Minimum Area usingRipple-Carry/CLAadders 101 Figure 4.11: Sequential Logic Units for CDF 5/3andCDF 9/7 DWT Synthesized for Maximum

Speed/MinimumArea usingRipple-Carry/CLAadders 102

Figure 4.12: Tri-State Buffer Units for CDF 5/3 andCDF 9/7 DWT Synthesized for Maximum

Speed/Mimmum Area usingRipple-Carry/CLAadders 102

Figure 4.13: Maximum Clock Speed for CDF 5/3 andCDF 9/7 DWT Synthesized for Maximum

Speed/MinimumArea usingRipple-Carry/CLAadders 103

(10)

Figure 4.19: Best Wavelet

Denoising

Results for Lena ImagewithSpeckle Noise 108

Figure 5.1: Module DiagramofHardware ImplementationofWavelet

Denoising

Processor. 1 10 Figure 5.2: Module DiagramofGeneric Hardware ImplementationofWavelet-BasedImage

Processor Ill

(11)

List

of

Tables

Table2.1: NumberofGuard Bits Needed for CDF 5/3 DWT

Scaling

andWaveletCoefficients

toEliminate OverflowandUnderflow 39

Table2.2: NumberofGuard Bits Needed for CDF 9/7 DWT

Scaling

andWaveletCoefficients

toEliminate OverflowandUnderflow 39

Table 3.1: MEMORY_CONTROLLER State Output Table 55

Table3.2: MULTI_LIFT_REORDER_2D_CTRL State Output Table 57

Table 3.3: LIFT_REORDER_2D_CTRL State Output Table 59

Table 3.4: MULTI_LIFT_REORDER_lD_CTRL State Output Table 60

Table 3.5: LIFT_REORDER_lD_CTRL State Output Table 61

Table 3.6: LJPT_1D_CTRL

Lifting

Scheme State Output Table 73

Table 3.7: LIFT_1D_CTRL

Reordering

State Output Table 75 Table 4.1: CDF 9/7 Actualvs.ApproximatedCoefficient ValuesandError 90 Table 4.2: Maximum Clock Speed for CDF 5/3andCDF 9/7 DWT Synthesizedfor Maximum

Speed/Minimum Area using Ripple-Carry/CLAadders 103 Table 4.3: Maximum Clock Speed andEquivalent GateCount for Hardware CDF 5/3 DWT

(12)

Chapter 1. Introduction

The digital multimedia revolution is upon us. The exchange ofinformation is rapidly moving

away from the traditional analog realm and into the digital arena fostered

by

the

increasing

availabilityofthe internet in homes and at work. The speed and ease of which digital mediais

transferredand manipulated makes it an attractive alternativeto conventional analogmedia such as audio and video. An example of digital media that has received alot of attention in recent years is digital images. Digital image processing techniques can be used to compress, reduce noise, or even understand information present in digital images making this format even more

desirable.

The Discrete Wavelet Transform

(DWT)

is a signal processing technique that is

beginning

to show promise in the field ofdigital image processing. The new JPEG2000 and MPEG4 still image and video compression standards are based upon the DWT and are shown to produce superior results over their previous incarnations that do not use the DWT [7]. The DWT has

potential for many other applications to digital images other than compression such as noise reduction [12]. A hardware DWT core could be integrated into digital camera or scanners to performimageprocessinginsidethedevicesuch asimagecompressiontoincreasetheamount of imagesthatcanbestoredinternally. Despitethebenefitsahardware DWTcore could provideto these applications there are very few hardware implementations of the DWT commercially available

[19,

20].

Aflexible hardware architecturefor performing theDWTon adigital image ispresented inthis thesis. Thisarchitecture uses avariationofthe

lifting

schemetechnique thatprovides significant advantages overtheboth the standard

lifting

scheme-based DWTand convolution-based

DWT,

such as smaller memory requirements, fixed-point arithmetic instead of more costly

floating

point, andlessarithmetic computations [9]. Inaddition, thearchitectureis flexible inthatit can beconfiguredtoperformmany differentvariationsoftheDWT. ForexampletheJPEG2000still image compression standard uses the Cohen-Daubechies-Feauveau

(CDF)

5/3 and CDF 9/7
(13)

this thesis is flexible in that it allows for the hardware for either of these two DWTs to be

generatedautomatically.

The DWT coreis modeledusing MATLAB and VHDL. The VHDLmodel is synthesized toa

Xilinx FPGAtoprovehardware functionality. The CDF 5/3 andCDF 9/7versions oftheDWT

are both modeled and used as comparisons throughout this thesis. The DWT core is used in

conjunction with averysimpleimage

denoising

moduletodemonstratethepotential oftheDWT

coretoperformimage processingtechniques.

Following

the introduction provided here in Chapter

1,

an introduction to the discrete wavelet

transform is provided through a brief discussion of signal processing techniques in Chapter 2.

Techniques for performing the discretewavelet transformare explored. The application ofthe

discrete wavelet transform to digital image processing and current implementations are also

discussed. Chapter 3 describes the unique features of the DWT core developed in this thesis.

The designofthe DWTcoreandits implementation is discussed in detail. Chapter4 discusses

theverificationoftheDWTcore. Aperformance analysis oftheDWTcoreis givenalong with

results from hardware synthesis.

Finally

theresults from applyingwavelet

denoising

to images

are discussed. Chapter 5 provides concluding remarks and explores various recommendations

for futureworkintheareaofthediscretewavelettransform, particularlytheDWTcoredesigned

for this thesis.

Following

Chapter 5 are the reference section and appendix. Appendix A

contains images transformedusingthe discrete wavelettransform, Appendix B contains images

and resultsfromwaveletimage

denoising,

Appendix

C, D,

andEcontain

MATLAB,

VHDLand
(14)

Chapter 2. Background

This chapter introduces the discrete wavelet transform through a brief discussion of signal

processingtechniques. Techniques for performing the discrete wavelet transform are explored. The application ofthe discretewavelettransform todigital images and currentimplementations

are alsodiscussed.

2.1. WaveletMotivation

Signals are omni-present in the real world. Signals are the vehicle for

delivering

information

such as sound and images. Signals represent avalue or amplitude thatvaries

depending

on its location within a particular domain. Some signals occur in the time

domain;

that is the

amplitude ofthe signal varies with time. Other signals occur in the spatial

domain;

that is the amplitude ofthesignalvaries

depending

onitsspatiallocation. Anaudio signalis an example of atime-domain signal

having

an amplitude that varies withtime. A digital image is an example ofaspatial-domain signal

having

an amplitude, or

intensity

that varies

depending

on thespatial

locationwithintheimage.

Signal processing involves theconditioning ofraw datasignals intoaformthatis more suitable

fortheirintended application. Mathematicaltransforms serve as apowerful toolused toextract information which is notreadily availablefrom theraw signal

by

converting a signal fromone domaintoanother. Ofteninformationthatisembeddedin one

domain,

suchasthe time

domain,

ismore apparentinanother

domain,

such asthe

frequency

domain. Oneexamplefrom

[1]

isthe

Electrocardiography

(ECG)

signal. 'Thetypical shapeofa

healthy

ECGsignalis wellknownto cardiologists.

Any

significant deviation fromthat shape is usuallyconsidered tobe a symptom of a pathological condition. This pathological condition,

however,

may not always be quite obvious in the original time-domain signal. Cardiologists usually use the time-domain ECG signals which are recorded on strip-charts to analyze ECG signals.

Recently,

the new computerizedECGrecorders/analyzers also utilizethe

frequency

information to decide whether a pathological condition exits. A pathological condition can sometimes be diagnosed more

easily when the

frequency

content of the signal is

analyzed"

[1]. A mathematical tool for

(15)

2.1.1. Fourier Transform

In 1882 the French mathematician J. Fourier showed that any periodic function can be

decomposed into aninfinite sum of periodic complex exponential

functions,

or sinusoids. After manyyears Fourier'sideas were generalizedto non-periodic functions and

finally

to periodic or non-periodic discrete time signals resulting in the Fourier Transform (FT). The FT converts a

time-domainsignal intothe

frequency

domainthusproviding information asto which

frequency

components are presentina signal. The FTprovides perfect resolutioninthe

frequency

domain;

inother words theexact frequenciespresentinthe signal aredetermined. The FTalso provides perfect time resolution in the time domain as the value ofthe signal at every instantoftime is known.

Theshortcomings oftheFT are thatwhilethefrequenciespresentin asignal canbe determined withperfectresolution, there is zero resolution in the timedomain as the time location ofthese

frequenciesare unknown. HencetheFTis sufficientfor stationarysignals where

frequency

does not vary withtime, but for non-stationary signals whose

frequency

does varywithtime, simply

knowing

which

frequency

components exists may not be sufficient. A possible solution to

finding

both the

frequency

component and where it occurs in time is the Short Term Fourier Transform.

[2]

2.1.2. ShortTerm Fourier Transform

The FTis suitable only forstationary signalsbutnot for non-stationary signals. The solutionis tofindportions of anon-stationarysignalthatare stationary. The Short Term Fourier Transform

(STFT)

does exactly this

by

segmenting anon-stationary signal into sections, orwindows, and

treating

each window as a stationary signal. The FT is then performed on each window of stationary signals. A

time-frequency

representation can nowbe obtained fromthe signal since

frequency

information foreachwindowhasalocation intime.
(16)

time-intervals

in which certain bands of frequencies exist can be known providing imperfect

resolution in both the

frequency

and time domains. Narrow windows provide good time resolution, but poor

frequency

resolution.

Conversely,

wide windows provide good

frequency

resolution,butpoortimeresolution. In addition,wide windows maynolongercontainstationary signals

defeating

thepurpose oftheSTFT. Whereas thekernel intheFT is a window ofinfinite

length providing perfect

frequency

resolution and zero

frequency

resolution, the kernel in the

STFT is a window of finite length yielding imperfect resolution in both cases. The time and

frequency

resolution problems are results ofaphysical phenomenon and existregardless ofthe

transform used,

however,

it is possible to analyze a signal using a different approach, called Multiresolution Analysis.

[2, 3]

2.2. Multiresolution AnalysisandtheWavelet Transform

Multiresolution analysis

(MRA)

analyzes signals at multiple frequencies yielding different

resolutions at each frequency. At higher frequencies good time resolution is obtained at the

expense of poorer

frequency

resolution.

Conversely,

at lower frequencies there is good

frequency

resolution, but poor time resolution. Thepower ofMRA lies in the fact that certain information may go undetected at one resolution, but may be readily apparent at another resolution.

[2, 4]

The STFT dividedanon-stationarysignalintoafinitenumber ofstationary signals, windows,for analysis. As discussed earlier, the resolution problems arose from the manner in which the

original non-stationary signal was segmented.

Using

smaller windows yielded poor

frequency

resolution and using larger segments provided poor time resolution. One solution is to use a

fully

scalable, modulated window that is shifted along the signal at every position to extract

frequency

information. Thisprocess wouldthenberepeated manytimeswithslightly shorter or

longer windows for each new repetition until every size window has been applied to every

position ofthe signal. Theendresultwillbeacollection of

time-frequency

representations of a
(17)

2.2.1. Continuous Wavelet Transform

(CWT)

The Continuous Wavelet Transform

(CWT)

is the most recent solution to overcome the

shortcomings of the FT and STFT providing perfect resolution in both the time domain and

frequency

domain.

The term "wavelet"

literally

means "small wave". A wavelet is a function of finite length

(small)

and whichis oscillatory

(wave)

having

an averagevalue,

integral,

of zero. Thesearethe mostimportantproperties of a wavelet as

they

satisfy theadmissibilityandregularityconditions

required for decomposition

(analysis)

and reconstruction

(synthesis)

of a signal without loss of

information. Further information isprovidedin

[3]

regardingthedetailsoftheadmissibilityand

regularity conditions. Whereas basis functions for the

FT,

and hence the

STFT,

are sinusoids

(the FTdecomposesa signal/functionintoa series ofsinusoids), thebasis functions fortheCWT are known as

"baby

wavelets". More specifically, the CWT decomposes a signal or function intoa series of

baby

waveletfunctions. These

baby

waveletsare derivedfroma singleprototype

wavelet viadilations or contractions

(scaling)

andtranslations (shifts). Thisprototypewaveletis

aptly named the "mother wavelet". An example of amother wavelet and derived wavelets are

shownin Figures

2.1, 2.2,

and2.3.

A

baby

wavelet y/ir(r) is derived from the mother wavelet y/(t)

by

varying scaling and

translation parameters s and x respectively as shown in equation 2.1. The /= is for energy

normalizationacrossthedifferentscales.

(2.1)

sAt)=

-nV/\-r^

s J

The CWTis performed

by

multiplyingthesignaltobeanalyzed

by

all the

baby

wavelets

having

(18)

earlier referred to a

time-frequency

resolution.

[3, 5]

The CWT y(s,r) of a function

f(t)

is defined in equation 2.2. denotes complex conjugation. The s and x parameters represent the

new scale andtranslation scales respectively.

H**)=

J/(fK(0*

(2-2)

Forcompletenesstheinverse CWTtransformisdefined inequation2.3.

/(')=

\\y{s,x)ifsr{t)dxds

(2.3)

Figure 2.1: Exampleof aMother Wavelet

Figure 2.2: ExampleofScaled

Baby

Wavelet
(19)

The CWT addresses the limited time and

frequency

resolution shortcoming of the STFT

by

providing

frequency

(scale)

informationof a signal atmany different resolutionshence providing aMRAof a signal.

Sincecomputers perform almost all calculations andprocessingofsignalsintherealworld, there is a concern about how practical the CWT is to implement. There are three properties ofthe CWT that make it difficult to use.

First,

the CWT is performed

by

continuously shifting a

continuously scalable functionover a signal andperformingcalculations betweenthe two. The second problemisthat thereisan infinite number of waveletsintheCWT. Thethirdproblemis

thatformostfunctionsthewavelettransformshaveno analytical solutionsand canbecalculated

only numerically or

by

an optical analog computer. The Discretized Continuous Wavelet Transformcanbeusedtoperformthe CWT usingcomputers andthusprovidethewaveletseries

of a signal,

however,

thisis onlya sampledversion oftheCWTandis still

highly

redundantand

thereforeinefficient. Asa resulttheDiscrete Wavelet Transformwas developedtoaddressthese issuesand makewaveletprocessingmore practical.

[3]

2.2.2. DiscreteWavelet Transform

(DWT)

The Discrete Wavelet Transform

(DWT)

requires a discrete mother wavelet since the

computationcomplexity ofperforming analysis of a signal with a continuous wavelet as inthe CWT is not efficient. Discrete wavelets can only be scaled and translated in discrete steps as

they

are not continuously scalable or translatable. The representation for the new discretized wavelet is shown in equation

2.4,

j

andk are integers and so > 1 is a fixed dilation step. The

translationfactor r0 is dependentuponsq.

1 (1-J-c.n

vJAt)=-f=v/

A0 J

(2.4)

The effect of

discretizing

the wavelet is that the time-scale space is now sampled at discrete

intervals. A value ofs0=2and r0 = 1 areusuallychosen sothat the samplingofthe

frequency

andtime axes correspond to dyadic sampling which is illustrated in Figure 2.4. One reason for

(20)

Figure 2.4: Dyadic

Sampling

Even witha discrete wavelet the wavelet transformrequires an infinite number ofsearings and

translationsofthemotherwavelet,

however,

thisis not possiblewith adiscretealgorithmsuch as the DWT. In order to provide good coverage of the signal spectrum using a finite number of wavelets the scaling factor of 2 is used and

by

doing

so each wavelet will touch each otheras shownin Figure 2.5.

[3]

Figure2.5: Subband Decompositionwithout

Scaling

Function

Itis impossible to cover the spectrum all the way down to zero as the spectrum is continually halved and never reaches zero. As a result, Mallat introduced a scaling function which

effectively

"corks"

theremaining spectrumthusrequiring only afinite number ofwavelets. As

shownin Figure

2.6,

this"cork" fillsthevoidwithalow-passspectrumcommonlyreferredtoas
(21)

Figure2.6: Subband Decompositionwith

Scaling

Function

Scaling

Function

.--\ . A

it

'

. I \

w. w.

-?

f

Anexample of aHaar

family

waveletandscaling functionsareshownin Figure 2.7aandb

respectively.

Figure 2.7: Haar

Family

Wavelet

(a)

and

Scaling

Function

(b)

dk.

a

Now that the continuous issues of the CWT have been addressed, a method is required to

perform the DWT on a signal. In 1976

Croisier,

Esteban and Galand used a special type of

analysis-synthesis systemknown as aQuadrature Mirror Filter

(QMF)

filter bankto perform an

analysis of speechsignals andnamedtheiranalysis scheme"subbandcoding". Atechniquevery

similar to subband coding, called pyramidal coding, was defined

by

Burt in 1983. This

technique is alsoknown as MRAmentioned earlier. In 1989 Vetterli andLe Gall modifiedthe

subbandcodingschemeandthusremovedtheexistingredundancyintheinthepyramidalcoding

(22)

representation ofthe signal.

Similarly

in subbandcodingatime-scalerepresentation of adigital

signal is obtained using digital

filtering

techniques. The signal is passed through a series of

high-pass filters and low-pass filters with different cut-off frequencies to analyze the

high-frequency

and

low-frequency

components of a signal respectively at different scales. The

resolution of the signal is changed

by

the

filtering

operations and the scale is changed

by

upsampling and

downsampling

operations. The techniques used in subband coding can be

applied to the DWT. Two digital filter banks are used to perform low-pass and high-pass

filtering

ontheoriginal signal, effectively splitting it intotwo

frequency

spectrums,orsubbands.

Eachsubbandis down-sampled

by

afactoroftwo to

keep

the totalnumber of samples thesame as the original signal. The samples in the low-pass subband are referred to as the "scale"

(scaling)

coefficients with thelow-pass filter

being

the scaling filter. The scale coefficients are also commonlyreferred to as

"average", "approximation",

or

"smooth"

coefficients as the low-pass

filtering

serves to smooth the original signal. The samples in the high-pass subband are referredto as the "wavelet" coefficients withthe high-pass filter

being

the wavelet filter. The wavelet coefficients are also referredto as

"detail"

or

"difference"

coefficients asthe high-pass

filtering

serves to highlight regions of larger variance. These wavelet coefficients contain the smallest details of

interest, however,

more detail information is present in the new low-pass

subband ofthe signal. TheDWT analysis of asignal usingthe described two-channel subband techniqueisshown in Figure 2.8.

Figure 2.8: DWT AnalysisofSignal using Two-Channel Subband

Coding

i ?

L

?

12

scaling

coef

input

?

H

?

12

wavelet

coef

Theproceduredescribedabove canbeappliedrecursivelytoeachresulting low-pass subbandfor

multiplelevels of

decomposition,

or analysis, ofthe signal as shownin Figure 2.9. In

doing

so, an iterated filter bank has been developed requiring only two

filters, however,

only providing
(23)

Figure 2.9: Multiple LevelDWTAnalysisofSignalusing Two-ChannelSubband

Coding

i ?

L

>

12

scaling

coef

i ?

L

?

12

wavelet

input

?

H

?

12

? coef

?

H

?

12

'

wavelet

(level

2)

coef

(level

1)

Reconstruction of the signal, or synthesis, is performed in the opposite manner

by

using

synthesisfiltersandupsamplingasdemonstrated in Figure 2.10.

Figure 2.10: DWT SynthesisofSignal using Two-Channel Subband

Coding

scaling

coef

T2

?

L

-Join

?output

wavelet

coef

T2

>

H

-2.3. Biorthogonal Wavelets

A transform is described as

being

orthonormal if both its forward and inverse transforms are

identical,

thereforeanorthonormal waveletis one thatis usedin bothanalysis and synthesis ofa

signal. A filter

having

linearphase is one whose impulse responseis either symmetric or anti

symmetric. Linearphaseis important foravarietyofreasonsin applications wherethe signal is

of finite

duration,

such as image compression. As mentioned earlier, two-channel subband

transforms are usedto performthe DWTon a signal.

Unfortunately,

there are no two-channel

linear-phase subbandfilters with finitesupportthat are alsoorthonormal. The solution is touse

two symmetric wavelets for analysis and synthesis that are orthogonal to each other, or

biorthogonal. These biorthogonal wavelets exhibitlinearphase andthereforeare now useful. [7

(chapter

4,6)]

A

family

ofbiorthogonal waveletsthat has proved usefulin applications such as
(24)

CDF 9/7 are two specific wavelets that will be used as continuing examples throughout this

thesisas

they

provide an

interesting

comparison.

2.3.1. CDF 5/3

The Cohen-Daubechies-Feauveau

(CDF)

5/3 biorthogonal wavelet is a simple wavelet that has

twosets ofscaling and waveletfunctionsfor analysis andsynthesis, hence biorthogonality. The CDF 5/3 wavelet has a

5-tap

low-pass analysis filter

h(z)

and

3-tap

high-pass analysis filter

g(z), hence5/3. The CDF 5/3also hasa

3-tap

low-pass synthesisfilter

h(z)

and

5-tap

high-pass

synthesis filter g(z). The CDF 5/3 analysis and synthesis wavelets are shown in Figures 2.11

and2.12respectively.

Figure 2.11: CDF 5/3 Analysis Wavelet

A

|

2

j

I

a

-a

.1

i.J

HljJ

-T

V

-A

(

i

I

] 1 2 3 A

Figure 2.12: CDF 5/3 Synthesis Wavelet

(25)

AnalysisFilters:

i_/\

1-2

l-i

3 li

12

h(z)

= z

l+z

H 1 z

z2 w

8 4 4 4 8

1 -i , 1 i

-z +1 r

2 2

g(z)= --z ^l-z

Synthesis Filters:

h(z)

=

iz-1+l

+ W

2 2

/ \

1-2

1-1

3 It It

g(z)= z z + z z

w

8 4 4 4 8

2.3.2. CDF 9/7

The Cohen-Daubechies-Feauveau

(CDF)

9/7 biorthogonal wavelet is a more complex wavelet

than theCDF 5/3 wavelet. Italso hastwo sets ofscalingandwaveletfunctions foranalysis and

synthesis,

however, they

are nearly identical and therefore more orthonormalthan the CDF5/3. The CDF 9/7wavelethas a

9-tap

low-pass analysis filter

h(z)

and

7-tap

high-passanalysis filter

g(z). The CDF 9/7 alsohas a

7-tap

low-pass synthesisfilter

h(z)

and

9-tap

high-pass synthesis

filter g(z). The CDF 9/7 analysis and synthesis wavelets are shown in Figures 2.13 and 2.14

respectively.

(26)

Figure 2.14: CDF9/7Synthesis Wavelet

The CDF 9/7analysis and synthesis sequences arelisted below.

Analysis Filters:

f 0.6029490182363579

+0.2668641

184428723^

+Z1)

h(z)

=

2 +

z2

+

0.07822326652898785(z

0.0168641 1844287495(:

0.02674875741080976(z-4 +

z4)

z3+z3

g(z)=

1.115087052456994

+Z1)

+ z2

0.09127176311424948(z"3 +z:

SynthesisFilters:

f 1.115087052456994

+

0.5912717631142470^

+Z1)

+

z2

(27)

j(z)

=

f 0.6029490182363579

-0.2668641184428723(z_1+

z1

)

-0.07822326652898785(:z"2

+

z2,

+0.01686411844287495(z"3

+

z3

)

+0.02674875741080976(z"4+

z4)

2.4. DWT usingConvolution

The traditional method for performing the DWT on a discrete signal is

by

convolution using digital filter banks. Convolutionconsistsofperforming a series ofdotproductsbetweenaset of filter coefficients and the signal. Convolution using digital filters is performed

by inputting

a

samplealongwith afixed number ofits neighboring samples to thedigital filter. Aset offilter coefficientsisusedtoevaluatethesample anditsneighborstoget a new weighted,orconvolved,

value. The weighting operation is performed

by

multiplying all the samples

by

each oftheir

respectivefiltercoefficientvalues. The resultingproducts arethenaddedtogethertogetthefinal convolved value. The digital filter is shifted along the signal to repeat the above operation for everysampleintheoriginal signal andthefinalresultisthenewconvolvedsignal.

One issue encountered

during

convolution arises when sufficient neighboring samples do not

existforasample, asis thecasefor samplesneartheboundaries of afinitesignal. Anextension method needstobe implementedtoprovidethemissingsamplesto thedigitalfilter. A

boundary

extensionmethodisthenrequiredtodetermine howtoextendthesignalbeyondits boundariesto

provide the extra samples needed

by

the filter. One method is to simply make all the extra values outsidethe

boundary

ofthe signal oneconstant value. Anexample ofthis methodis to simply extend the sample at the edge of the signal beyondthe

boundary

so that any neighbor

sample outside the

boundary

is considered to be the

boundary

sample. Another

boundary

extension methodis called symmetric extension, hisymmetric extensionthe signal is reflected

across the

boundary

providing a rnirror image of the original signal as the extra samples. Whetherthe

boundary

sampleisrepeatedor notbeyondthe

boundary

isanotherconsideration.
(28)

filters are constructed

directly,

one for the low-pass scaling filter and one for the high-pass

waveletfilter. Oncethese twodigital filters areobtained, theforwardDWT isperformedexactly

as mentioned earlierusingthe two-channelsubbandcodingtechnique. Convolution is performed

onthesignalusing boththescalingand waveletdigital filters. Theappropriate extension method

is used to provide the missing samples. The resulting signals are downsampled

by

a factor of

two to

keep

the same number of samples as the original signal. In this mannerthe scaling and

wavelet coefficients are obtained as shown in Figure 2.15. Reconstruction of the signal is

performedintheoppositemannerusingsynthesisfilters.

Figure 2.15: Forward DWT using Convolution

i ?

L

?

12

scaling

coef

input

>

H

?

12

wavelet

coef

The examplebelow demonstrates the steps requiredtoperform the forward DWT foronelevel

of decomposition on a 1-D discrete signal using convolution. The CDF 5/3 DWT is used.

Symmetric extension ofthe signal is used to provide samples to the convolution filters beyond

theboundaries ofthesignal.

Rowofsamples: 4 7 3 5 9 6

Convolution is performedon the original row of samples using the CDF 5/3 high-pass wavelet

analysis filter. The results fromthe convolution are rounded using the floor function and then

downsampled

by

afactor2 startingwith thesecond sampleto obtainthewavelet coefficients of

thesignal.

g(z)

=

SW

2 2

Rowofsamples: 4 7 3

Convolution 3

9

3

(29)

Waveletcoefficients:3 -1 -3

Convolution is also performed on the original row of samples using the CDF 5/3 low-pass

scalinganalysisfilter. Theresults fromtheconvolution are roundedusingthefloor functionand

then downsampled

by

a factor 2 starting with the first sample to get the scaling coefficients of

thesignal.

h(z)=_Iz-2+Iz-l+2 +

Izl_Iz2

8 4 4 4 8

Rowof samples: 4 7 3 5 9 6

Convolutionoutput: 5 5 3 5 8 7

Scaling

coefficients: 5 3 8

Itis importanttonotethat

temporary

storageis requiredtoholdtheresults oftheconvolution as

the original samples cannot be overwritten until both the wavelet and scaling coefficients are

obtained.

Performing

the DWT via convolution is a relatively expensive operation requiring

large amounts of intermediate storage and unnecessary computations. In addition a DWT

performed via convolution is limitedjust as the Fourier Transform is near the boundaries of a

finitesignal. Aproposedalternativeis the

Lifting

Scheme.

2.5. DWT using

Lifting

Scheme

In 1994 Wim Sweldens proposed an alternative approach to computing the DWT using

biorthogonal wavelets calledthe

Lifting

Scheme. The

lifting

scheme calculatestheDWT using

spatial domain analysis rather than

frequency

domain analysis. This provides a more practical

approach to computing the DWTthat is better suitedfor many applications not requiring more

complex frequency-based Fourier analysis techniques, hi addition, certain information within

the signal that cannotbeobtained using traditionalfrequency-based techniques canbe obtained

using the

lifting

scheme and are referred to as second-generation wavelets. The

lifting

scheme

can be traced back to the Euclidean algorithm and was inspired

by

M. Lounsbery's work
(30)

more compact representation of a signal

by

finding

andexploiting spatial correlation within. A

major assumption that the

lifting

scheme takes advantage of is that samples that are spatially close toone another are more similar to each otherthan samplesthat are spatially fartheraway.

Therefore neighboring samples are maximallycorrelated.

Using

this assumption a sample could

be interpolated

fairly

accurately

by having

only knowledge of its close neighbors. A sample

couldbeinterpolatedeven moreaccuratelythemore neighborsthereareto interpolate from.

[8]

The

lifting

scheme consists of a series ofstepsthatmodify, or

lift,

one set of samplestobeused

in the next step. This

"lifting"

of samples gives the

lifting

scheme its name. The first step to

performing theforward DWT usingthe

lifting

schemeis called the"Split" stepshown in Figure

2.16. Thepurposeofthesplit step isto splittheoriginal signal intotwo setsthat aremaximally correlated. Given the assumption above neighboring samples are the most correlated so therefore

during

thesplitstepthesignalis splitintoone setcontaining onlytheeven samples and a second set containing onlythe odd samples. This is commonly referred toas a

Lazy

wavelet transform.

Figure 2.16: Split

Step

ofForward DWTusing

Lifting

Scheme

12

? even in

z

-1

12

? odd

o o o o

The second step ofthe

lifting

scheme is called the "Predict" step shown in Figure 2.17. The

predict step first uses samples from the even set to predict the values in the odd set. More

specifically theright andleft even neighbors ofan odd sample are used intheprediction. Once theprediction is donethe predicted valuederived from theeven set is compared toactual value

from the odd set and the difference between the two is calculated. This difference should be

relatively smallcompared to theoriginal valuefromtheoddsetassumingthepredictionmethod

is This difference is referredto as the

"difference" or

"wavelet"

(31)

wavelet coefficient indicatestheextenttowhichtheprediction oftheoddset of samplesfromthe

evenset of samplesfail. Ifthewaveletcoefficientis zerothismeansthesample fromtheodd set

canbe exactlypredicted fromthesamples in theeven set.

Finally

each samplein theodd set is

overwritten with their respective wavelet coefficients, again which should be relatively small.

The odd set now contains the wavelet coefficients and the even set still contains the even

samples fromtheoriginal signal. Theodd set capturesthe

high-frequency

content oftheoriginal

signal now, but the even set still contains both high and

low-frequency

data from the original

signal since it is merely a downsampled version and thus contains aliasing. A third step is

neededtoremovethealiasing.

Figure 2.17: SplitandPredictStepsofForward DWT using

Lifting

Scheme

12

III ' ^/V^l 1

z

-1

/

12

/

+

j

? odd

c\

a

*

A

t

A

t

\ 1 / s 1 / \ 1 / ^ ' ^^v '^^ '3^U

'tfh

The

following

is thepredictstepequation with a asthepredictstepcoefficient.

Predict: odd^ =

oddold+a(evenleft+evenright

)

The third step of the

lifting

scheme is called the "Update" step shown in Figure 2.18. The

Update step uses the new wavelet coefficients in the odd set to update the even set producing

"smooth"

or

"scaling"

coefficients. Morespecificallytherightandleftodd neighborsof an even

sample areusedintheupdate. These scalingcoefficients nowhavesame average

intensity

ofthe

original signal inthe form of

low-frequency

content and thus remove the aliasing. The scaling

coefficients nowoverwritetheirrespective samplesintheeven set. The signal now containsthe

(32)

Figure 2.18:

Split, Predict,

and UpdateStepsofForward DWT using

Lifting

Scheme

12

^V

scaling

111

Sf/ coef

z

-1

A

1

B

A1.

12

^

wavelet

coef

fWWl

The

following

istheupdatestepequationwith |3 astheupdate stepcoefficient.

Update: evennew =

evenold+

p(oddleft

+oddright

)

A more complex DWT

involving

more neighbors can be performed

by

merely adding more

predict and update steps to themethoddescribed above, with thefinal predict and update steps

producingthewavelet andscalingcoefficientsrespectivelyas shownin Figure 2.19.

In addition, scaling steps can be added to adjust the DC gain of the wavelet and scaling

coefficients ifneeded asshownin Figure 2.20.

The inverse DWT usingthe

lifting

scheme is intuitive. Toperform theinverse DWT the

lifting

steps are simplyperformed inthereverse orderusingtheinverseoperations. If any scaling was

performed on the wavelet and scaling coefficients at the end ofthe forward DWT then it first must be undone

by

scaling the coefficients

by

inverse scale factors. Next the last update step

mustbe undone followed

by

the last predict step. This continues backwards until all the steps havebeenundone andthe original signalhas beenobtained asdemonstrated in Figures 2.21 and
(33)

Figure 2.19: ForwardDWT using

Lifting

SchemewithMultiple

Lifting

Steps

12

^\

-4 + v.

\ /

scaling

coef II 1

Y

z

-1

A

T

B

ic

!

l

i

:

D

12

-<?)

... J j- v i

wavelet

coef \ /

S^iv/ S'*i^/ S^f'

(34)

Figure 2.20:

Forward

DWTusing

Lifting

SchemewithMultiple

Lifting

and

Scaling

Steps

in

12

12

^)

\ 0 :

scaling

v L.J.j coef

t i

!

D

L.^..J

: ; 0 : wavelet

... ^

s

j+

L 1 coef

li I

z

-1

A

z

B

:

c

1

>,

i i >, J + V.

V>

1 T 1

*

*

*

*

(35)

Figure 2.22: InverseDWT using

Lifting

SchemewithMultiple

Lifting

and

Scaling

Steps

scaling

coef -iVS2r-4

D

wavelet !, : :

coef 11

..*.

,+,

Y

'' * r

B

A

Join

k

z

JL

out

2.5.1. Featuresof

Lifting

Scheme

The main advantages ofcomputing the DWT viathe

lifting

scheme rather than convolution are

that it is much

faster,

is calculated

fully

in-place requiring no intermediate storage, has

symmetric forward and inverse transforms, potential for integer wavelet transform, and can be

usedinsituations wherefrequency-basedtechniquescannot.

[8]

2.5.1.1. Faster Implementation

Thetraditional DWTis performedusing atwo-bandsubbandanalysis whereby both ahigh-pass

and alow-passanalysis filterare appliedto theentire signal andtheresulting high-pass and

low-pass subbands are downsampled

by

afactoroftwo to gettheresult. The

lifting

schemeexploits

the similarities between the two analysis filters to reduce the number of calculations.

Unnecessary

calculationsresulting in samplesthatwouldbe lost inthe

downsampling

andrepeat

calculations between the two analysis filters are avoided thus providing an overall speedup. In

some casesthenumber of operations canbereduced

by

uptoafactoroftwo.

[9]

2.5.1.2. In-Place Calculation

The

lifting

scheme computes the DWT in an iterative manner. After each iteration the

intermediate results/samples can overwrite the previous results/samples without data loss and

thereforeno auxiliary memory is requiredin thecalculation oftheDWT. The

lifting

schemeis
(36)

2.5.1.3.

Symmetric ForwardandInverse Transform

Traditionally

theinverse DWTis performed

by

using a set of synthesis filters separate fromthe

analysis filters and as a result the inverse transform may not be intuitive. The

lifting

scheme

performs the inverse DWT

by

simply undoing the operations ofthe forward DWT. The same

machinery usedfortheforward DWTcanbeusedfortheinverseDWT

by

reversingtheorder of

operations.

2.5.1.4. Integer-to-integer Transform

Dueto the

linearity

ofthe

lifting

scheme, ifthe input data is in integer

format,

it is possibleto

maintain data to be in integer format throughout the transform

by

introduction a rounding

function inthe

filtering

operation. Dueto this property,the transformisreversible andis called

the

integer-to-integer,

orInteger Wavelet Transform (IWT).

2.5.1.5. Second Generation Wavelets

Since the

lifting

scheme does not use Fourier analysis to compute the

DWT,

it can be used in

situations wheretranslation anddilation is impossible. One example wouldbenearboundaries

of afinitesignal where normalFouriertechniqueswould provideborder distortionor artifacts.

2.5.2.

Lifting Step

Extraction

Asmentioned abovethe

lifting

schemeisanalternativetechniquefor performingtheDWT using

biorthogonalwavelets. In ordertoperformtheDWT usingthe

lifting

schemethecorresponding

lifting

andscaling steps mustbe derived fromthebiorthogonalwavelets. Theanalysis filters of

theparticularwaveletare firstwritteninpolyphase matrixformshownbelow.

heven(Z)

geven(Z)

.hoddfc)

godd(Z).

The polyphase matrix is a 2 x 2 matrix containing the analysis low-pass and high-pass filters

each split up into their even and odd polynomial coefficients and normalized. From here the

matrix is factored into a series of2 x2 upper andlower triangularmatrices each withdiagonal

entries equalto 1. Theuppertriangularmatrices containthecoefficientsforthepredictsteps and

thelowertriangularmatrices containthecoefficients fortheupdate steps. Amatrixconsistingof

all O's with the exception of the diagonal values may be extracted to derive the scaling step

(37)

P(z)

=

coefficients. Thepolyphasematrix is factored intotheform shown in theequation

below,

a is

thecoefficientforthepredictstepand

p

is thecoefficientfortheupdate step.

1 a(l+ z_I)T 1

0 1

JLp(i

+

z)

1_

Anexample of a more complicated extraction

having

multiple predict and update steps as wellas

scaling steps is shown

below;

a is the coefficient for thefirst predict step,

p

is the coefficient

forthefirstupdate step, A, isthecoefficient forthe second predictstep, 5 isthecoefficientfor

the second update step,

^

is the odd sample scaling coefficient, and

,2

is the even sample

scalingcoefficient.

P(Z): 1 a(l+ 1 1 y(i + 1 0

0 1 P(l+z) 1 0 1 5(1+z) 1 o

c2

According

tomatrixtheory, anymatrix

having

polynomial entries and adeterminantof1 canbe

factoredas describedabove. Therefore every FTRwavelet orfilter bankcanbe decomposed into

a series of

lifting

and scaling steps. Daubechies andSweldens discuss

lifting

step extraction in

further detail.

[10]

The

lifting

step extraction for the CDF 5/3 and CDF 9/7 biorthogonal

waveletsis shownbelow.

2.5.3. CDF 5/3 DWT using

Lifting

Scheme

Thelow-pass andhigh-passanalysisfilters fortheCDF 5/3 are restatedbelowwiththehigh-pass

filtertranslated

by

z"1.

h(z)

=_Iz-2+Iz-l+2+

Izl_Iz2

w

8 4 4 4 8

i ( \ -if 1 -i , 1 i^

1-2

-i 1 z1g(z)=z 1 z

!+l

z

\

= z

l+zl

SW

i

2 2

J

2 2

Thepolyphase matrix

P(z)

fortheCDF5/3 waveletisshownbelow.

P(z)

=

1 _! 3 1 1 -1 1

z + z z

8 4 8 2 2

1 1 1

- +

-z 1

(38)

P(z)

=

l-^z

+

z"1)

-i-fl+

z"1)

4 8V / 2V /

Thepolyphase matrix canthenbefactored intotwo triangularmatrices.

1

P(z)

=

1 -i-ll+

z"1)

2V ;

0 1

1

(1

+z) 1

It isapparentthat twoliftsteps arerequired,one predict and one updatestep,toperformtheCDF 5/3 DWT. Thecoefficientforthepredictstep is:

1

a=

andthecoefficientfortheupdate step is:

Thepredict and update equationsfortheCDF 5/3 filterare shownbelow. Predict:

Update:

odd =odd ,j+ new """old

4(

evennew =

evenold+

2,evenieft+evenright

-(oddleft+oddright)

The floor function is used for both the predict and update equations to provide an

integer-to-integertransform. Theforward CDF 5/3 DWT usingthe

lifting

schemeis shownin Figure 2.23.

Figure2.23: Forward CDF 5/3 DWT using

Lifting

Scheme

in

12

7-1

scaling

coef

wavelet

coef

A

=
(39)

The examplebelow demonstrates the steps required to perform the forward DWTforone level

of

decomposition

on a 1-D signal using the

lifting

scheme. The CDF 5/3 DWT is used.

Symmetric extension of only one sample beyond the

boundary

is necessary for the

lifting

scheme.

Rowof samples: 4 7 3 5 9 6

The CDF 5/3 DWTconsists oftwo

lifting

steps. The first

lifting

step (predict step)is appliedto

theoriginalrow of samples andtheresults then safely overwritetheodd samples intheoriginal

signalforuseinthenext

lifting

step. Theresultsfromthissteparethewavelet coefficients.

oddnew =

oddold+

l(

(evenleft+evenrigh

)

Rowof samples: 4 7 3 5 9 6

Lifting

step 1 results: 3 -1 -3

Newrowofsamp les: 4 3 3 -1 9 -3

Waveletcoefficients:3 -3

Thesecond

lifting

step (updatestep)is appliedto thenew waveletcoefficients andtheremaining

even samples ofthe original signal. The results then safely overwrite the even samples in the

signal. Theresultsfromthissteparethescalingcoefficients.

even^ =

even0ld+

-(oddleft+oddright)

4

Rowof samples: 4 3 3 -1 9

Lifting

step 2results: 5 3 8

Newrowof samples: 5 3 3 -1 8

-3

-3

(40)

Theresulting wavelet and scalingcoefficients obtained fromthis example are identical to those

fromtheforward DWTexampleusingconvolution earlier.

The inverse DWTtransformisperformed

by

performingtheinvertedversions ofthe

lifting

steps

on the wavelet and scaling coefficients in the reverse order as

they

were performed for the

forward DWT. Thewavelet coefficients arelocated in the odd samplepositions andthescaling

coefficients arelocated intheeven sample positions.

Wavelet/Scaling

Coefficients: 5 3 3 -18 -3

The inverseversion ofthe second

lifting

step (update step) is appliedto the waveletandscaling

coefficients and the results then safely overwrite the scaling coefficients. The results from this

steparetheeven samples oftheoriginal signal.

evennew =

evenold

--(oddleft+oddright)

Wavelet/Scaling

Coefficients: 5 3 3 -1 8 -3

Inverse

lifting

step 2

Results: 4 3 9

Newrow ofsamples: 4 3 3 -1 9 -3

The inverse version ofthe first

lifting

step (predict step) is appliedto newly determined even

samples and remaining wavelet coefficients. The results then safely overwrite the wavelet

coefficients. Theresultsfromthissteparetheodd samples oftheoriginalsignal.

ddnew =

ddold --(evenleft+evenrigJ

Newrowofsamples: 4

Inverse

lifting

step 1
(41)

Newrow of samples: 4 7 3 5 9 6

Thecomplete signalhas been perfectlyreconstructed.

Reconstructed

signal: 4 7 3 5 9 6

2.5.4. CDF 9/7 DWTusing

Lifting

Scheme

The low-passandhigh-passanalysisfilters fortheCDF 9/7arerestatedbelowwiththehigh-pass filtertranslated

by

z"1.

( 0.6029490182363579 ^

+0.2668641 184428723(z_1+

z1

)

h(Z): +

z2)

- 0.0168641 1

844287495(z~3 + z3

)

+0.02674875741080976(z"4

+z4)

z1g(z)=z-1 1.115087052456994z-1

+11)

+

z1)

+0.09127176311424948(z-4+

z2}

' 1.115087052456994 -0.5912717631 142470(z_1

+Z1)

+

z2)

+z3)y

Thepolyphase matrix

P(z)

is trivial yetveryungainly andtherefore not shown. Thepolyphase

matrix forthe CDF 9/7 wavelet canbe factored into the

following

fourtriangular matrices and

one scale matrix.

i cdW1)! i oTi yfi+z"1)! i

oK

o

o l

[p(i+z)

i]o i

i(i+z)

lJLo

c2.

P(z)

=

where:

a=-1.586134342

P

= -0.05298011854

y=0.8829110762

5=0.4435068522

(42)

A total offour liftsteps are required, twopredict andtwoupdate steps, toperformthe CDF9/7

DWT. Thecoefficientforthefirstpredictstep is:

a=

-1.586134342

Thecoefficientforthefirstupdatestep is:

P

=-0.05298011854

Thecoefficientforthesecond predictstep is:

7=0.8829110762

Thecoefficientforthesecond updatestep is:

5=0.4435068522

Thescale coefficientfortheodd samplesis:

d

=1.149604398

Thescale coefficientfortheeven samplesis:

2

=0.8698644523

Thepredict and update equationsfortheCDF 9/7 filterare shownbelow.

Predictl: oddnew =

oddold+

[a(evenleft

+evenright

)J

Updatel: evennew =

evenold+

[p(oddleft

+oddright

)J

Predict2: oddnew =

oddold +

[j(evenleft

+evenright

)J

Update2: evennew =

evenold+

[o(oddleft

+oddright

)J

Scaleodd: oddnew =

|_d

*

oddold

J

Scaleeven: evennew =

|_C2

x

evenold

J

The floor function isusedforallthepredict, updateand scale equationstoprovide an

(43)

Figure2.24: Forward CDF 9/7 DWTusing

Lifting

Scheme

in

12

scaling

coef

wavelet coef

A

=

B

=

1.5861

34342

C

=

0.88291

1 0762

0.0529801

1

854

D

=

0.4435068522

S

=

1.149604398

S2

=

0.8698644523

The CDF 9/7 DWT consists of four

lifting

steps and two scaling steps. The first

lifting

step

(predict step

1)

is appliedtotheoriginalrowof samples andtheresults thensafelyoverwritethe

odd samplesintheoriginal signalforuseinthenext

lifting

step.

oddnew =

oddold+

[a(evenleft

+evenright

)J

a= -1.586134342

Rowof samples: 4 7 3 5 9 6

Lifting

step 1 results: -5 -15 -23

Newrowof samples: 4 5 3 -15 9 -23

Thesecond

lifting

step (update step

1)

is appliedto theresults from thefirst

lifting

step andthe

remaining even samples of the original signal. The results then safely overwrite the even

samplesinthesignal.

eVennew =

eVenold+

Lp(0ddleft

+ddright

)J

p

= -0.05298011854

Rowofsamples: 4 5 3 -15 9 -23

(44)

The third

lifting

step (predict step

2)

is applied to the results from the first and second

lifting

steps. Theresultsthensafelyoverwritetheresultsfromthefirst

lifting

step.

oddnew

=

oddold

+

L.Y(evenleft

+evenright

)J

7=0.8829110762

Rowof samples: 4 5 4 -15 11 -23

Lifting

step3results: 2 -2 -4

Newrow of samples: 4 2 4 -2 11 -4

The fourth

lifting

step (update step

2)

is appliedto the results from the second and third

lifting

steps. Theresultsthensafelyoverwritetheresults fromthesecond

lifting

step.

evennew =

evenold+

[.o(oddleft

+oddright

)J

5=0.4435068522

Rowof samples: 4 2 4 -2 11

Lifting

step 4results: 5 4 8

Newrow of samples: 5 2 4 -2 8

The first scaling step is appliedto theresults fromthe third

lifting

step. The resultsthen safely

overwrite the results from the third

lifting

step. The results from this step are the wavelet

coefficients.

oddnew=LC.xoddoldJ

d

=1.149604398

Rowof samples: 5 2 4 -2 8 -4

Lifting

step 4results: 2 -3 -5

Newrow of samples: 5 2 4 -3 8 -5

(45)

The second scaling step is applied to the results from the fourth

lifting

step. The results then

safelyoverwritetheresultsfrom thefourth

lifting

step. Theresults fromthis step arethescaling

coefficients.

evennew=LC2xevenoldJ

2

=0.8698644523

Rowof samples: 5 2 4 -3 8

Lifting

step 4results: 4 3 6

Newrow of samples: 4 2 3 -3 6

Scaling

coefficients: 4 3 6

2.6. 2-D DWT andDigitalImages

As still and motion pictures are steadily moving from the traditional film media into digital

mediaformthedemandfor digital image processingtechniques is growing. Since digital images

aremerely 2-dimensionalspatial-domainsignals,thefieldofdigital image processing is simplya

classification of signal processing pertaining specifically to digital images and thus many

techniques that are used in signal processing are also applicable to digital images.

Hence,

the

application oftheDWTtodigital images isofgrowing interest.

2.6.1. 2-D DWT

A digital image is an example of aspatial-domain signal

having

an amplitude, or

intensity

that

varies

depending

on the location within the image. An image consists of picture elements, or

"pixels",

that represent

intensity

values at a specific location withthe image. Thesepixels are

located within a discrete 2-D grid of rows and columns that represent the spatial-domain. A

grayscale image contains pixels

having

only one

intensity

value ranging from black to white

creating a monochrome "black & white"

image,

also called an

intensity

image. A color image

usually hasthree

intensity

values perpixelrepresentingred,blue and greento create afull-color

image. Forthe most part, image processingtechniques that are unrelated tocolor are the same

(46)

TheDWTdescribedearlier appliesto 1-Dsignals, but canbe easilymodifiedtoaccompany 2-D

signals such asdigital images

by

treating

themas groups of1-D signals as shownin Figure 2.25.

Figure2.25: Forward 2-DDWT

originalimage

?

L

12

rows

12

columns

H

12

columns

>

H

12

rows

12

columns

H

12

smooth + coefficients (LL) verticaldetail -? coefficients (LH) horizontal detail + coefficients (HL) diagonal detail -+ coefficients (HH) columns

In ordertoperformthe 2-D DWT on imagethe 1-DDWT is performed

horizontally

along each

row (or vertically alongthe columns if

desired)

ofthe image

treating

each row as if

they

were

single 1-D signals as shownin Figure 2.26. The results are two subbands, one containing the low-pass scalingcoefficients andtheothercontainingthehigh-passwavelet coefficients.

Figure 2.26: Forward 2-D DWT Row

Processing

ofImage

oooooooo oooooooo oooooooo oooooooo oooooooo oooooooo oooooooo oooooooo 09090909 oooooooo oooooooo oooooooo oooooooo oooooooo oooooooo oooooooo ooooiiii oooooooo oooooooo oooooooo oooooooo oooooooo oooooooo oooooooo

O 0 O 0 # 6 e

o o o o 9 9 9 9

0 o o o 9

o o o o

O 0 o o

0 O O 0

0 0 o o 99

O 0 o o 9 9 9 9

Afterthe 1-D DWT isperformedonall therows ofthe

image,

theprocess is repeatedvertically

onevery column ofthetwo subbandsfromtheprevious step as shown in Figure 2.27. Thetwo

original subbands are each splitinto twomoresubbands foratotal offoursubbands. Oncethis

(47)

Figure2.27: Forward 2-DDWT Column

Processing

ofImage

0 0 0 0 9 9 9 9

9 O 0 O 9 9 9 9

0 O 0 0 9 9 9 9

9 0 0 0 9 9 9 9

0 0 0 O 9 9 9 9

9 O 0 0 9 9 9 9

0 0 0 0 9 9 9 9

9 0 0 0 9 9 9 9

0 O 0 0 9 9 9 9

o o o o 9 9 9 9

O 0 o o 9 9 9 9

0 o o 0 9 9 9 9

9 O O 0 9 9 9 9

9 0 O 0 9 9 9 9

9 O O 0 9 9 9 9

9 O O 0 9 9 9 9

0 0 0 0

0 0 O 0

o o o o

0 0 0 0

9 9 9 9

9 9 9 9

9 9 9 9

9 9 9 9

9 9 9 9

9 9 9 9

9 9

References

Related documents

As described more fully below, one of the Poker Companies, Full Tilt Poker, not only engaged in the operation of an unlawful gambling business, bank fraud, wire fraud, and

Most algorithms for large item sets are related to the Apri- ori algorithm that will be discussed in Chapter IV-A2. All algorithms and methods are usually based on the same

Among emblematists it has been used to portray disguise as in Guillaume de la Perriere's Le Theatre des bons Engins, in which four masked heads are depicted: one aged and

[r]

One of them (case 3) re-fevered after 7 months and was diagnosed as immunoblastic T-cell lymphoma by pathological biopsy of cervical lymph nodes. After 3 courses of E-CHOP

During the thesis work, I measured six different parameters: the number of emergency processes, hash table entry number, caching replacement policy, cache entry

Though some studies have investigated the effects of workplace eating on employees’ health, no research has focused on the link between the food consumed in

Declining fertility and increasing migration of young people from rural to urban areas for study and work might lead to increase in one-person or elderly-only households in