You are on page 1of 46

3-D

DISCRETE WAVELET
TRANSFORM

_______

Abstract

The digital data can be transformed using Discrete Wavelet Transform (DWT). The Discrete Wavelet Transform (DWT) was based on time-scale representation, which provides efficient multi-resolution. The lifting based scheme (9, 7) (Here 9 Low Pass filter coefficients and the 7 High Pass filter coefficients) filter give lossy mode of information. The lifting based DWT are lower computational complexity and reduced memory requirements. Since Conventional convolution based DWT is area and power hungry which can be overcome by using the lifting based scheme. The discrete wavelet transform (DWT) is being increasingly used for image coding. This is due to the fact that DWT supports features like progressive image transmission (by quality, by resolution), ease of transformed image manipulation, region of interest coding, etc. DWT has traditionally been implemented by convolution. Such an implementation demands both a large number of computations and a large storage features that are not desirable for either high-speed or low-power applications. Recently, a lifting-based scheme that often requires far fewer computations has been proposed for the DWT. In this work, the design of Lossy 3-D DWT (Discrete Wavelet Transform) using Lifting Scheme Architecture will be modeled using the Verilog HDL and its functionality were verified using the Modelsim tool and can be synthesized using the Xilinx tool.

CHAPTER 1 INTRODUCTION 1.1 Introduction


The fundamental idea behind wavelets is to analyze according to scale. Indeed, some researchers in the wavelet field feel that, by using wavelets, one is adopting a perspective in processing data. Wavelets are functions that satisfy certain mathematical requirements and are used in representing data or other functions. This idea is not new. Approximation using superposition of functions has existed since the early 1800's, when Joseph Fourier discovered that he could superpose sines and cosines to represent other functions. However, in wavelet analysis, the scale that we use to look at data plays a special role. Wavelet algorithms process data at different scales or resolutions. Fourier Transform (FT) with its fast algorithms (FFT) is an important tool for analysis and processing of many natural signals. FT has certain limitations to characterize many natural signals, which are non-stationary (e.g. speech). Though a time varying, overlapping window based FT namely STFT (Short Time FT) is well known for speech processing applications, a time-scale based Wavelet Transform is a powerful mathematical tool for non-stationary signals. Wavelet Transform uses a set of damped oscillating functions known as wavelet basis. WT in its continuous (analog) form is represented as CWT. CWT with various deterministic or non-deterministic basis is a more effective representation of signals for analysis as well as characterization. Continuous wavelet transform is powerful in singularity detection. A discrete and fast implementation of CWT (generally with real valued basis) is known as the standard DWT (Discrete Wavelet Transform).With standard DWT, signal has a same data size in transform domain and therefore it is a non-redundant transform. A very important property was Multi-resolution Analysis (MRA) allows DWT to view and process.

1.2 Introduction to Wavelet Transform


The wavelet transform is computed separately for different segments of the timedomain signal at different frequencies. Multi-resolution analysis: analyzes the signal at different frequencies giving different resolutions. Multi-resolution analysis is designed to give good time resolution and poor frequency resolution at high frequencies and good frequency resolution and poor time resolution at low frequencies. Good for signal having high frequency components for short durations and low frequency components for long duration, e.g. Images and video frames. 1.2.1 Why wavelet? Fourier transform based spectral analysis is the dominant analytical tool for frequency domain analysis. However, Fourier transform cannot provide any information of the spectrum changes with respect to time. Fourier transform assumes the signal is stationary, but PD signal is always non-stationary. To overcome this deficiency, a modified methodshort time Fourier transform allows representing the signal in both time and frequency domain through time windowing functions. The window length determines a constant time and frequency resolution. Thus, a shorter time windowing is used in order to capture the transient behavior of a signal; we sacrifice the frequency resolution. The nature of the real PD signals is non-periodic and transient as shown in such signals cannot easily be analyzed by conventional transforms. So, an alternative mathematical tool- wavelet transform must be selected to extract the relevant time-amplitude information from a signal. In the meantime, we can improve the signal to noise ratio based on prior knowledge of the signal characteristics. A continuous-time wavelet transform of f(t) is defined. Here a, b R, a 0 and they are dilating and translating coefficients, respectively. The asterisk denotes a complex conjugate. This multiplication of [ a ]^1/2 is for energy normalization purposes so that the transformed signal will have the same energy at every scale. The analysis function (t) , the so-called mother wavelet, is scaled by a, so a wavelet analysis is often called a time-scale analysis rather than a timefrequency analysis. The wavelet transform decomposes the signal into different scales

with different levels of resolution by dilating a single prototype function, the mother wavelet. Furthermore, a mother wavelet has to satisfy that it has a zero net area, which suggest that the transformation kernel of the wavelet transform is a compactly support function (localized in time), thereby offering the potential to capture the PD spikes which normally occur in a short period of time. 1.2.2 The Continuous Wavelet Transform and the Wavelet Series The Continuous Wavelet Transform (CWT) is provided below, where x(t) is the signal to be analyzed. (t) is the mother wavelet or the basis function. All the wavelet functions used in the transformation are derived from the mother wavelet through translation (shifting) and scaling (dilation or compression). The mother wavelet used to generate all the basis functions is designed based on some desired characteristics associated with that function. The translation parameter relates to the location of the wavelet function as it is shifted through the signal. Thus, it corresponds to the time information in the Wavelet Transform. The scale parameter s is defined as |1/frequency| and corresponds to frequency information. Scaling either dilates (expands) or compresses a signal. Large scales (low frequencies) dilate the signal and provide detailed information hidden in the signal, while small scales (high frequencies) compress the signal and provide global information about the signal. Notice that the Wavelet Transform merely performs the convolution operation of the signal and the basis function. The above analysis becomes very useful as in most practical applications, high frequencies (low scales) do not last for a long duration, but instead, appear as short bursts, while low frequencies (high scales) usually last for entire duration of the signal. The Wavelet Series is obtained by discretizing CWT. This aids in computation of CWT using computers and is obtained by sampling the time-scale plane. The sampling rate can be changed accordingly with scale change without violating the Nyquist criterion. Nyquist criterion states that, the minimum sampling rate that allows reconstruction of the original signal is 2 radians, where is the highest frequency in the signal. Therefore, as the scale goes higher (lower frequencies), the sampling rate can be decreased thus reducing the number of computations.

1.2.3 Wavelet Definition A wavelet is a small wave which has its energy concentrated in time. It has an oscillating wavelike characteristic but also has the ability to allow simultaneous time and frequency analysis and it is a suitable tool for transient, non-stationary or time-varying phenomena. (a) (b)

Figure1.1 Representation of a (a) wave (b) wavelet

1.2.4 Wavelet Characteristics The difference between wave (sinusoids) and wavelet is shown in figure 1.1. Waves are smooth, predictable and everlasting, whereas wavelets are of limited duration, irregular and may be asymmetric. Waves are used as deterministic basis functions in Fourier analysis for the expansion of functions (signals), which are time-invariant, or stationary. The important characteristic of wavelets is that they can serve as deterministic or non-deterministic basis for generation and analysis of the most natural signals to provide better time-frequency representation, which is not possible with waves using conventional Fourier analysis. 1.2.5 Wavelet Analysis The wavelet analysis procedure is to adopt a wavelet prototype function, called an analyzing wavelet or mother wavelet. Temporal analysis is performed with a contracted, high frequency version of the prototype wavelet, while frequency analysis is performed with a dilated, low frequency version of the same wavelet. Mathematical formulation of signal expansion using wavelets gives Wavelet Transform (WT) pair,

which is analogous to the Fourier Transform (FT) pair. Discrete-time and discreteparameter version of WT is termed as Discrete Wavelet Transform (DWT).

1.3 Types of Transforms


1.3.1 Fourier Transform (FT) Fourier transform is a well-known mathematical tool to transform time-domain signal to frequency-domain for efficient extraction of information and it is reversible also. For a signal x(t), the FT is given by

Though FT has a great ability to capture signals frequency content as long as x(t) is composed of few stationary components (e.g. sine waves). However, any abrupt change in time for non-stationary signal x(t) is spread out over the whole frequency axis in X(f). Hence the time-domain signal sampled with Dirac-delta function is highly localized in time but spills over entire frequency band and vice versa. The limitation of FT is that it cannot offer both time and frequency localization of a signal at the same time. 1.3.2 Short Time Fourier Transform (STFT) To overcome the limitations of the standard FT, Gabor introduced the initial concept of Short Time Fourier Transform (STFT). The advantage of STFT is that it uses an arbitrary but fixed-length window g(t) for analysis, over which the actual nonstationary signal is assumed to be approximately stationary. The STFT decomposes such a pseudo-stationary signal x(t) into a two dimensional time-frequency representation S( , f) using that sliding window g(t) at different times . Thus the FT of windowed signal x(t) g*(t-) yields STFT as

The time-frequency resolution is fixed over the entire time-frequency plane because the same window is used at all frequencies. There is always a trade off between time resolution and frequency resolution in STFT. 1.3.3 Wavelet Transform (WT) Fixed resolution limitation of STFT can be resolved by letting the resolution in time-frequency plane in order to obtain Multi resolution analysis. The Wavelet Transform (WT) in its continuous (CWT) form provides a flexible time-frequency, which narrows when observing high frequency phenomena and widens when analyzing low frequency behaviour. Thus time resolution becomes arbitrarily good at high frequencies, while the frequency resolution becomes arbitrarily good at low frequencies. This kind of analysis is suitable for signals composed of high frequency components with short duration and low frequency components with long duration, which is often the case in practical situations.

1.3.4 Comparative Visualisation The time-frequency representation problem is illustrated in figure1.2. A comprehensive visualization of various time-frequency representations shown in figure 1.2, demonstrates the time-frequency resolution for a given signal in various transform domains with their corresponding basis functions.

Figure1.2 Comparative visualizations of time-frequency representation of an arbitrary non-stationary signal in various transform domains

1.4 Difference between Continuous Wavelet Transform and Discrete Wavelet Transform
Wavelet transforms are classified into discrete wavelet transforms (DWTs) and continuous wavelet transforms (CWTs). Note that both DWT and CWT are continuoustime (analog) transforms. They can be used to represent continuous-time (analog) signals. CWTs operate over every possible scale and translation whereas DWTs use a specific subset of scale and translation values or representation grid. The word wavelet is due to Morlet and Grossmann in the early 1980s. They used the French word ondelette, meaning "small wave". Soon it was transferred to English by translating "onde" into "wave", giving "wavelet". The Wavelet transform is in fact an infinite set of various transforms, depending on the merit function used for its computation. This is the main reason, why we can hear the term "wavelet transforms" in very different situations and applications.

Orthogonal wavelets are used to develop the discrete wavelet transform Non-orthogonal wavelets are used to develop the continuous wavelet transform

There are more wavelet types and transforms, but those two are most widely used and can serve as examples of two main types of the wavelet transform: redundant and nonredundant ones.

The discrete wavelet transform returns a data vector of the same length as the input is. Usually, even in this vector many data are almost zero. This corresponds to the fact that it decomposes into a set of wavelets (functions) that are orthogonal to its translations and scaling. Therefore we decompose such a signal to a same or lower number of the wavelet coefficient spectrum as is the number of signal data points. Such a wavelet spectrum is very good for signal processing and compression, for example, as we get no redundant information here.

The continuous wavelet transform in contrary returns an array one dimension larger than the input data. For a 1D data we obtain an image of the time-frequency plane. We can easily see the signal frequencies evolution during the duration of

10

the signal and compare the spectrum with other signals spectra. As here is used the non-orthogonal set of wavelets, data are correlated highly, so big redundancy is seen here. This helps to see the results in a more humane form.

1.5 Applications of Discrete Wavelet Transform


Generally, an approximation to DWT is used for data compression if signal is already sampled, and the CWT for signal analysis. Thus, DWT approximation is commonly used in engineering and computer science, and the CWT in scientific research. One use of wavelet approximation is in data compression. Like some other transforms, wavelet transforms can be used to transform data and then encode the transformed data, resulting in effective compression. For example, JPEG 2000 is an image compression standard that uses biorthogonal wavelets. A related use is that of smoothing/denoising data based on wavelet coefficient thresholding, also called wavelet shrinkage. By adaptively thresholding the wavelet coefficients that correspond to undesired frequency components smoothing and/or denoising operations can be performed. Other applied fields that are making use of wavelets include astronomy, acoustics, nuclear engineering, sub-band coding, signal and image processing, neurophysiology, music, magnetic resonance imaging, speech discrimination, optics, fractals, turbulence, earthquake-prediction, radar, human vision, and pure mathematics applications such as solving partial differential equations.

1.6 Area of Application


Medical application Signal denoising Data compression Image processing

11

CHAPTER 2 Literature Review 2.1Introduction


The DWT represents the signal in dynamic sub-band decomposition. Generation of the DWT in a wavelet packet allows sub-band analysis without the constraint of dynamic decomposition. The discrete wavelet packet transform (DWPT) performs an adaptive decomposition of frequency axis. The specific decomposition will be selected according to an optimization criterion The Discrete Wavelet Transform (DWT), based on time-scale representation, provides efficient multi-resolution sub-band decomposition of signals. It has become a powerful tool for signal processing and finds numerous applications in various fields such as audio compression, pattern recognition, texture discrimination, computer graphics etc. Specifically the 3-D DWT play a significant role in many image/video coding applications.

2.2Types of compressions
There are two types of compressions 1. Lossless compression Digitally identical to the original image. Only achieve a modest amount of compression Lossless compression involves with compressing data, when decompressed data will be an exact replica of the original data. This is the case when binary data such as executable are compressed. 2. Lossy compression Discards components of the signal that are known to be redundant. Signal is therefore changed from input

12

LOSSY

Predictive

Frequency oriented Transfor m

Importanc e oriented

Hybrid

DCT

DWT

Fracta l

Mallat

Transversal filter

Lifting Scheme

Coedic

Figure 2.1 Different Types of Lossy Compression Techniques

2.3 The Discrete Wavelet Transform The Wavelet Series is just a sampled version of CWT and its computation may consume significant amount of time and resources, depending on the resolution required. The Discrete Wavelet Transform (DWT), which is based on sub-band coding is found to yield a fast computation of Wavelet Transform. It is easy to implement and reduces the computation time and resources required. Similar work was done in speech signal coding which was named as sub-band coding. In 1983, a technique similar to sub-band coding was developed which was named pyramidal coding. Later many improvements were made to these coding schemes which resulted in efficient multi-resolution analysis schemes. In CWT, the signals are analyzed using a set of basis functions which relate to each other by simple scaling and translation. In the case of DWT, a time-scale representation of the digital signal is obtained using digital filtering techniques. The signal to be analyzed is passed through filters with different cutoff frequencies at different scales.

13

2.4 Reviewed Architectures of Discrete wavelet transforms


2. 4.1 DWT and Filter Banks Multi-Resolution Analysis using Filter Banks Filters are one of the most widely used signal processing functions. Wavelets can be realized by iteration of filters with rescaling. The resolution of the signal, which is a measure of the amount of detail information in the signal, is determined by the filtering operations, and the scale is determined by up sampling and down sampling (sub sampling) operations. The DWT is computed by successive low pass and high pass filtering of the discrete time-domain signal. This is called the Mallat algorithm or Mallat-tree decomposition. Its significance is in the manner it connects the continuous-time mutiresolution to discrete-time filters. In the figure, the signal is denoted by the sequence x[n], where n is an integer. The low pass filter is denoted by G0 while the high pass filter is denoted by H0. At each level, the high pass filter produces detail information, d[n], while the low pass filter associated with scaling function produces coarse approximations, a[n].

Figure2.2

Three-level wavelet decomposition tree

At each decomposition level, the half band filters produce signals spanning only half the frequency band. This doubles the frequency resolution as the uncertainty in frequency is reduced by half. In accordance with Nyquists rule if the original signal has a highest frequency of , which requires a sampling frequency of 2 radians, then it now has a highest frequency of /2 radians. It can now be sampled at a frequency of radians thus discarding half the samples with no loss of information. This decimation by 2 halves the time resolution as the entire signal is now represented by only half the number of samples. Thus, while the half band low pass filtering removes half of the frequencies and thus halves the resolution, the decimation by 2 doubles the scale. With this approach, the time resolution becomes arbitrarily good at high frequencies, while the frequency resolution becomes arbitrarily good at low frequencies. The time-frequency plane is thus resolved. The filtering and decimation process is continued until the desired level is reached. The maximum number of levels depends on the length of the signal. The

14

DWT of the original signal is then obtained by concatenating all the coefficients, a[n] and d[n], starting from the last level of decomposition.

Figure:2.3 Three-level wavelet reconstruction tree. Figure 4.5 shows the reconstruction of the original signal from the wavelet coefficients. Basically, the reconstruction is the reverse process of decomposition. The approximation and detail coefficients at every level are up sampled by two, passed through the low pass and high pass synthesis filters and then added. This process is continued through the same number of levels as in the decomposition process to obtain and Hthe original signal. The Mallat algorithm works equally well if the analysis filters, G 0 and H0, are exchanged with the synthesis filters, G1 H1. 2.4.2 Conditions for Perfect Reconstruction In most Wavelet Transform applications, it is required that the original signal be synthesized from the wavelet coefficients. To achieve perfect reconstruction the analysis and synthesis filters have to satisfy certain conditions. Let G0(z) and G1(z) be the low pass analysis and synthesis filters, respectively and H0(z) and H1(z) the high pass analysis and synthesis filters respectively. Then the filters have to satisfy the following two conditions as given in : G0 (-z) G1 (z) + H0 (-z). H1 (z) = 0 G0 (z) G1 (z) + H0 (z). H1 (z) = 2z-d The first condition implies that the reconstruction is aliasing-free and the second condition implies that the amplitude distortion has amplitude of one. It can be observed that the perfect reconstruction condition does not change if we switch the analysis and synthesis filters.

15

There are a number of filters which satisfy these conditions. But not all of them give accurate Wavelet Transforms, especially when the filter coefficients are quantized. The accuracy of the Wavelet Transform can be determined after reconstruction by calculating the Signal to Noise Ratio (SNR) of the signal. Some applications like pattern recognition do not need reconstruction, and in such applications, the above conditions need not apply.

2.4.3 Classification of wavelets We can classify wavelets into two classes: (a) orthogonal and (b) biorthogonal. Based on the application, either of them can be used. (a)Features of orthogonal wavelet filter banks The coefficients of orthogonal filters are real numbers. The filters are of the same length and are not symmetric. The low pass filter, G0 and the high pass filter, H0 are related to each other by H0 (z) = z -N G0 (-z-1) The two filters are alternated flip of each other. The alternating flip automatically gives double-shift orthogonality between the low pass and high pass filters ,i.e., the scalar product of the filters, for a shift by two is zero. i.e., G[k] H[k-2l] = 0. Perfect reconstruction is possible with alternating flip. Also, for perfect reconstruction, the synthesis filters are identical to the analysis filters except for a time reversal. Orthogonal filters offer a high number of en into account and the appropriate mother wavelet should be chosen in order tvanishing moments. This property is useful in many signal and image processing applications. They have regular structure which leads to easy implementation and scalable architecture. (b)Features of biorthogonal wavelet filter banks In the case of the biorthogonal wavelet filters, the low pass and the high pass filters do not have the same length. The low pass filter is always symmetric, while the high pass filter could be either symmetric or anti-symmetric. The coefficients of the filters are either real numbers or integers. For perfect reconstruction, biorthogonal filter bank has all odd length or all even length filters. The two analysis filters can be symmetric with odd length or one symmetric and the other antisymmetric with even length. Also, the two sets of analysis and synthesis filters must be dual. The linear phase biorthogonal filters are the most popular filters for data compression applications. Wavelet Families

16

There are a number of basis functions that can be used as the mother wavelet for Wavelet Transformation. Since the mother wavelet produces all wavelet functions used in the transformation through translation and scaling, it determines the characteristics of the resulting Wavelet Transform. Therefore, the details of the particular application should be take use the Wavelet Transform effectively.

Figure 2.4 illustrates some of the commonly used wavelet functions. Haar wavelet is one of the oldest and simplest wavelet. Therefore, any discussion of wavelets starts with the Haar wavelet. Daubechies wavelets are the most popular wavelets. They represent the foundations of wavelet signal processing and are used in numerous applications. These are also called Maxflat wavelets as their frequency responses have maximum flatness at frequencies 0 and . This is a very desirable property in some applications. The Haar, Daubechies, Symlets and Coiflets are compactly supported orthogonal wavelets. These wavelets along with Meyer wavelets are capable of perfect reconstruction. The Meyer,

17

Morlet and Mexican Hat wavelets are symmetric in shape. The wavelets are chosen based on their shape and their ability to analyze the signal in a particular application. 2.4.5 Discrete Wavelet Transform The Discrete Wavelet Transform (DWT) is a popular signal processing technique best known for its results in data compression. As hardware designers, we are concerned more with the algorithmic details of the DWT, rather than the mathematical details discussed in the many papers which provide the foundations for wavelets. Algorithmically, the DWT is a recursive filtering process. At each level, the input data is filtered by two related filters to produce two result data-streams. These data-streams are then sub samples by two (or decimated) to reduce the output to the same number of data-words as the original signal. The low-pass filter output of this result is then further processed by the same two filters, and this continues recursively for the desired depth or until no further filtering can occur. This recursive filtering process of the one-dimensional DWT is shown in Figure 1, where z is the input data-stream, a and d are approximation (low-pass filter output) and difference (highpass filter output) data-streams respectively. The subscript values show the level of output.

Figure2.5 the DWT filtering process. The filtering steps are multiply and accumulate operations. A filter in the algorithmic, discrete sense is a number of coefficient values. The number of these values is referred to as the filter width and these coefficients are also referred to as taps. At each data-word of the input, the filter spans across that data-word and its neighboring data-words as a

18

window. The values within this window are multiplied by their corresponding filter coefficient and all the results are added together to give the filtered result for this data-word. The filtering operation extracts certain frequency information from the data depending on the characteristics of the filter. This filtering operation can be done with a systolic array. It is simple to implement a systolic array for each level of the DWT, but the arrays are poorly utilized due to the decreasing data-rates of the levels. It is possible, through some complex timing, to use a single array to perform all levels of the DWT.

2.4.6 Discrete Wavelet Transform Architecture


The discrete wavelet transform (DWT) is being increasingly used for image coding. This is due to the fact that DWT supports features like progressive image transmission (by quality, by resolution), ease of compressed image manipulation, region of interest coding, etc. DWT has traditionally been implemented by convolution. Such an implementation demands both a large number of computations and a large storage features that are not desirable for either high-speed or low-power applications. Recently, a lifting-based scheme that often requires far fewer computations has been proposed for the DWT. The main feature of the lifting based DWT scheme is to break up the high pass and low pass filters into a sequence of upper and lower triangular matrices and convert the filter implementation into banded matrix multiplications. Such a scheme has several advantages, including in-place computation of the DWT, integer-to-integer wavelet transform (IWT), symmetric forward and inverse transform, etc. Therefore, it comes as no surprise that lifting has been chosen in the upcoming. The proposed architecture computes multilevel DWT for both the forward and the inverse transforms one level at a time, in a row-column fashion. There are two row processors to compute along the rows and two column processors to compute along the columns. While this arrangement is suitable or filters that require two banded-matrix multiplications filters that require four banded-matrix multiplications require all four processors to compute along the rows or along the columns. The outputs generated by the row and column processors (that are used for further computations) are stored in memory modules. The memory modules are divided into multiple banks to accommodate high computational bandwidth requirements. The proposed architecture is an extension of the architecture for the forward transform that was presented. A number of architectures have

19

been proposed for calculation of the convolution-based DWT. The architectures are mostly folded and can be broadly classified into serial architectures (where the inputs are supplied to the filters in a serial manner) and parallel architectures (where the inputs are supplied to the filters in a parallel manner). Recently, a methodology for implementing lifting-based DWT that reduces the memory requirements and communication between the processors, when the image is broken up into blocks. For a system that consists of the lifting-based DWT transform followed by an embedded zero-tree algorithm, a new interleaving scheme that reduces the number of memory accesses has been proposed. Finally, a lifting-based DWT architecture capable of performing filters with one lifting step, i.e., one predict and one update step. The outputs are generated in an interleaved fashion.

Figure2.6 Lifting Schemes. (a) Scheme 1. (b) Scheme 2. The basic principle of the lifting scheme is to factorize the poly phase matrix of a wavelet filter into a sequence of alternating upper and lower triangular matrices and a diagonal matrix. This leads to the wavelet implementation by means of banded-matrix multiplications.

2.5 Lifting Implementation of the Discrete Wavelet Transform


As the DWT intrinsically constitutes a pair of filtering operations, a unified representation of the poly-phase matrix is introduced as follows

20

where h(z) and g(z) stand for the transfer functions for the low pass and high pass filter banks, respectively, and all suffixes e and o in the literature correspond to even and odd terms, respectively. Thus, the transform is symbolized with the equation

with (z) and (z) signifying the filtered low pass and high pass parts of the input x(z). The lifting scheme factorizes the poly phase representation into a cascade of upper and lower triangular matrices and a scaling matrix which subsequently return a set of linear algebraic equations in the time domain bringing forth the possibility of a pipelined processor. For instance, the common Daubechies (9, 7) filter bank can be factorized as

Figure 2.7 The lifting scheme :Split,Predict,Update and Scale phases

21

Figure 2.8 1-D lifting Scheme of daubechies 9/7 for forward wavelet DWT Advantages 1. Lifting schema of DWT has been recognized as a faster approach. 2. No need to divide the input coding into non-overlapping 2-D blocks. It has higher compression ratios avoid blocking artefacts. 3. Allows good localization both in time and spatial frequency domain 4. Better identification of which data is relevant to human perception higher compression ratio

Disadvantages 1. The cost of computing DWT as compared to DCT is higher because the number of logic gates used for DWT is more compared to DCT. 2. The use of larger DWT basis functions or wavelet filters produces blurring and ringing noise near edge regions in the images or video frames.

2.6 Summary of Literature Review


1. Lifting scheme of discrete wavelet transform and Inverse discrete wavelet transform has been recognized as a faster approach 2. Allows good localization both in time and spatial frequency domain 3. Transformation of the whole image introduces inherent scaling 4. Better identification of which data compression ratio 5. It is perceived that the wavelet transform is an important tool for analysis and processing of signals. The wavelet transform in its continuous form can accurately represent minor variations in signal characteristics. Critically sampled version of continuous wavelet transform, known as standard DWT 6. DWT is very popular for de-noising and compression in a number of applications by the virtue of its computational simplicity through fast algorithms, and non-redundant. is relevant to human perception, higher

22

There are certain signal processing applications (e.g. Time-division multiplexing in Telecommunication)

23

CHAPTER 3 Design of Hardware Model 3.1 Discrete Wavelet Transforms


The discrete wavelet transform (DWT) became a very versatile signal processing tool after Mallat proposed the multi-resolution representation of signals based on wavelet decomposition. The method of multi-resolution is to represent a function (signal) with a collection of coefficients, each of which provides information about the position as well as the frequency of the signal (function). The advantage of the DWT over Fourier transformation is that it performs multi-resolution analysis of signals with localization both in time and frequency, popularly known as time-frequency localization. As a result, the DWT decomposes a digital signal into different sub bands so that the lower frequency sub bands have finer frequency resolution and coarser time resolution compared to the higher frequency sub bands. The DWT is being increasingly used for image compression due to the fact that the DWT supports features like progressive image transmission (by quality, by resolution), ease of compressed image manipulation] region of interest coding, etc. Because of these characteristics, the DWT is the basis of the new JPEG2000 image compression standard.

3.2 One dimensional DWT


Any signal is first applied to a pair of low-pass and high-pass filters. Then down sampling (i.e., neglecting the alternate coefficients) is applied to these filtered coefficients. The filter pair (h, g) which is used for decomposition is called analysis filter-bank and the filter pair which is used for reconstruction of the signal is called synthesis filter bank.(g`, h`).The output of the low pass filter after down sampling contains low frequency components of the signal which is approximate part of the original signal and the output of the high pass filter after down sampling contains the high frequency components which are called details (i.e., highly textured parts like edges) of the original signal. This approximate part can still be further decomposed into low frequency and high frequency components. This process can be continued successively to the required number of levels. This process is called multi level decomposition, shown in Figure 3.1

24

Figure 3.1 One dimensional two level wavelet decomposition In reconstruction process, these approximate and detail coefficients are first upsampled and then applied to low-pass and high-pass reconstruction filters. These filtered coefficients are then added to get the reconstructed version of the original image. This process can be extended to multi level reconstruction i.e., the approximate coefficients to this block may have been formed from pairs of approximate and detail coefficients. Shown in Figure 3.2

Figure 3.2 One dimensional inverse wavelet transforms

3.3 Two-Dimensional DWT


One dimensional DWT can be easily extended to two dimensions which can be used for the transformation of two dimensional images. A two dimensional digital image which can be represented by a 2-D array X [m,n] with m rows and n columns, where m, n are positive integers. First, a one dimensional DWT is performed on rows to get low frequency L and high frequency H components of the image. Then, once again a one dimensional DWT is

25

performed column wise on this intermediate result to form the final DWT coefficients LL, HL, LH, HH. These are called sub-bands. The LL sub-band can be further decomposed into four sub-bands by following the above procedure. This process can continue to the required number of levels. This process is called multi level decomposition. A three level decomposition of the given digital image is as shown. High pass and low pass filters are used to decompose the image first row-wise and then column wise. Similarly, the inverse DWT is applied which is just opposite to the forward DWT to get back the reconstructed image, shown in Figure 3.3

Figure 3.3 Row-column computation of 2-D DWT

Figure 3.4 Two channel filter bank at level 3

26

Various architectures have been proposed for computation of the DWT. These can be mainly classified as either Convolution Architectures or Lifting Based Architectures. The number of computations required to find the DWT coefficients by the filter method is large for higher level of decomposition. This leads to the implementation of new technique called lifting scheme for computing DWT coefficients. This scheme reduces the number of computations and also provides in-place computation of DWT coefficients.

3.4 3D DISCRETE WAVELET TRANSFORM

Figure 3.5 3D-DWT The 3D DWT can be considered as a combination of three 1D DWT in the x, y and z directions, as shown in Fig. 1. The preliminary work in the DWT processor design is to build 1D DWT modules, which are composed of high-pass and low-pass filters that perform a convolution of filter coefficients and input pixels. After a one-level of 3D discrete wavelet transform, the volume of image is decomposed into HHH, HHL, HLH, HLL, LHH, LHL, LLH and LLL signals as shown in the Figure Lifting Scheme The basic idea behind the lifting scheme is very simple; try to use the correlation in the data to remove redundancy. First split the data into two sets (split phase) i.e., odd samples and even samples as shown in Fig. 2. Because of the assumed smoothness of the data, we predict that the odd samples have a value that is closely related to their neighboring even samples. We use N even samples to predict the value of a neighboring odd value (predict phase). With a good prediction method, the chance is high that the original odd sample is in

27

the same range as its prediction. We calculate the difference between the odd sample and its prediction and replace the odd sample with this difference. As long as the signal is highly correlated, the newly calculated odd samples will be on the average smaller than the original one and can be represented with fewer bits. The odd half of the signal is now transformed. To transform the other half, we will have to apply the predict step on the even half as well. Because the even half is merely a sub-sampled version of the original signal, it has lost some properties that we might want to preserve. In case of images we would like to keep the intensity (mean of the samples) constant throughout different levels. The third step (update phase) updates the even samples using the newly calculated odd samples such that the desired property is preserved. Now the circle is round and we can move to the next level. We apply these three steps repeatedly on the even samples and transform each time half of the even samples, until all samples are transformed. 3.4.1 Rationalization of Filter Coefficients As already stated lifting scheme is one of the most efficient algorithms for the implementation of discrete wavelet transform. But one of the major shortcomings with this scheme is that the lifting coefficients obtained for the implementation of bi-orthogonal 9/7 wavelet transformation are irrational numbers [7, 8]. Hence the direct irrational coefficient implementation requires lot of hardware resources and the processing time at the cost of slight improvement in the compression performance. On the other hand, lower precision in filter coefficients results in smaller and faster hardware at the cost of compression performance. In addition to this rationalization also determines other critical hardware properties such as throughput and power consumption. Hence it is suggested that they should be optimally rationalized without much affecting the compression performance. Table 1 shows the irrational and approximated rational counterpart for 9/7 filter which are considered as a very good alternative to irrational coefficients. When these coefficients are applied to image coding, the compression performance is almost same as that of irrationalized filter coefficient implementation, while the computational complexity is reduced remarkably. The heart of 3-D DWT implementation is designing of 1-D processor which is clearly elaborated in Fig. 4. The different lifting coefficients can be easily obtained for Daubechies 9/7 filter by factorization of poly phase matrix. Fig. 3 shows the implementation of 9/7 lifting scheme. This figure is direct implementation of Fig. 2 for the required scheme. When the signal passes through various steps, it is split into three separate one dimensional transforms, the high pass component (HHH) and a low pass component (LLL). Because of sub sampling the total number of transformed coefficients is same as that

28

of original one. These transformed coefficients are then processed by x-coordinate Processor, which have the same architecture as that of y and z-processor, to complete 3-D transformation. The bi-orthogonal 9/7 wavelet can be implemented as four lifting steps followed by scaling requires that the following equations be implemented in hardware.

The original data to be filtered is denoted by x[n]; and the 1-D DWT outputs are the detail coefficients x5[n] and approximation coefficients x6[n]. The lifting step coefficients scaling coefficients are constants given by Table 1. The above equations are implemented on Verilog to obtain the coefficients x5[n] and x6[n]. These coefficients correspond to H and L respectively. Now these coefficients are passed through the 1-D processor 3 times. Where, zcoordinate processor gives the final output as the eight subsets of original image as shown in Fig. 1. These coefficients are then stored in external memory in the form of binary file. For the multiple level of decomposition this binary file can be invoked iteratively to obtain further sublevels. The lifting scheme is a technique for both designing wavelets and performing the discrete wavelet transform. Actually it is worthwhile to merge these steps and design the wavelet filters while performing the wavelet transform. This is then called the second generation wavelet transform. The technique was introduced by Wim Sweldens. The discrete wavelet transform applies several filters separately to the same signal. In contrast to that, for the lifting scheme the signal is divided like a zipper. Then a series of convolution-accumulate operations across the divided signals is applied. The basic idea of lifting is the following: If a pair of filters ( h,g) is complementary, that is it allows for perfect reconstruction. Each such transform of the filter bank (or the respective operation in a wavelet transform) is called a lifting step. A sequence of lifting steps consists of alternating lifts, that is, once the low pass is fixed and the high pass is changed and in the next step the high pass is fixed and the low pass is changed. Successive steps of the same direction can be merged.

29

There are two types of lifting. One is called primal lifting and the other is called dual lifting. We define these two types of lifting based on the mathematical formulations shown in the previous section.

3.5 GENERAL IMPLEMENTATION FLOW


The generalized implementation flow diagram of the project is represented as follows.

Figure 3.6 General Implementation Flow Diagram Initially the market research should be carried out which covers the previous version of the design and the current requirements on the design. Based on this survey, the specification and the architecture must be identified. Then the RTL modelling should be carried out in VERILOG HDL with respect to the identified architecture. Once the RTL

30

modelling is done, it should be simulated and verified for all the cases. The functional verification should meet the intended architecture and should pass all the test cases. Once the functional verification is clear, the RTL model will be taken to the synthesis process. Three operations will be carried out in the synthesis process such as Translate Map Place and Route The developed RTL model will be translated to the mathematical equation format which will be in the understandable format of the tool. These translated equations will be then mapped to the library that is, mapped to the hardware. Once the mapping is done, the gates were placed and routed. Before these processes, the constraints can be given in order to optimize the design. Finally the BIT MAP file will be generated that has the design information in the binary format which will be dumped in the FPGA board.

3.6 Implementation
The 3D (9,7) wavelet transform block were designed. 3.6.1 Integer Wavelet Transform In conventional DWT realizations, partial transform results need to be represented with a high precision. This raises storage and complexity problems. On the other hand, the Integer Wavelet Transform (IWT) produces integer intermediate results. Thus, it is possible to use integer arithmetic without encountering rounding error problems. There are different types of integer transforms like S(sequential) transform which is popularly known as Haar wavelet transform, S(sequential)+P(prediction) transform. The two filter banks supported by JPEG2000 standard are Debauchies (9, 7) and Debauchies (5, 3) filter banks. Since the integer to integer wavelet transform coefficients are integers, it can be used in lossless compression. Since the aim of the thesis is to suggest a lossy method so we will consider only (9,7) Integer Wavelet Transform. 3-D (9,7) DWT Lossy Transformation The analysis and the synthesis filter coefficients ( both low pass and high pass) for Wavelet Transform are as shown in the table 3.1.

31

The rational coefficients allow the transform to be invertible with finite precision analysis, hence giving a chance for performing lossy compression.

3.6.2 The 3-D (9, 7) Discrete Wavelet Transform Initially the Pixel values of any image will be taken with the help of MATLAB, which will be used as the primary inputs to the DWT Block. Basically 1-D (9, 7) DWT block diagram is developed based on the equations. The registers in the top half will operate in even clock where as the ones in bottom half work in odd clock. The input pixels arrive serially row-wise at one pixel per clock cycle and it will get split into even and odd. So after the manipulation with the lifting coefficients a,b,c and d is done, the low pass and high pass coefficients will be given out. Hence for every pair of pixel values, one high pass and one low pass coefficients will be given as output respectively.

Figure 3.7 Computation of Basic (9,7) DWT Block in which coefficients a,b,c and d are lifting coefficients

32

The internal operation of the DWT block has been explained above and hence the high pass and low pass coefficients of the taken image were identified and separated. The generated low pass and high pass coefficients are stored in buffers for further calculations.

33

CHAPTER 4 Results and Discussion 4.1 Introduction


The DWT process and the developed architecture for the required functionality were discussed in the previous chapters. Now this chapter deals with the simulation and synthesis results of the DWT process. Here Modelsim tool is used in order to simulate the design and checks the functionality of the design. Once the functional verification is done, the design will be taken to the Xilinx tool for Synthesis process and the netlist generation. The Appropriate test cases have been identified in order to test this modelled DWT process architecture. Based on the identified values, the simulation results which describes the operation of the process has been achieved. This proves that the modelled design works properly as per its functionality.

4.2 Simulation Results


The test bench is developed in order to test the modeled design. This developed test bench will automatically force the inputs and will make the operations of algorithm to perform. 4.2.1 DWT Block The initial block of the design is that the Discrete Wavelet Transform (DWT) block which is mainly used for the transformation of the image. In this process, the image will be transformed and hence the high pass coefficients and the low pass coefficients were generated. Since the operation of this DWT block has been discussed in the previous chapter, here the snapshots of the simulation results were directly taken in to consideration and discussed. The input is 16 bits each input bit width is vary because of the multiplier. The DWT consists of registers and adders. When ever the input is send, the data divided into even data and odd data. The even data and odd data is stored in the temporary registers. When the reset is high the temporary register value consists of zero when ever the reset is low the input data split into the even data and odd data. The input data read up to sixteen clock cycles after that the data read according to the lifting scheme. The output data consists of low pass and high pass elements. This is the 1-D discrete wavelet transform. The 2-D discrete wavelet transform is that the low pass and the high pass again divided into LL, LH and HH, HL. The 3-D discrete wavelet transform is that the low pass and the high pass again divided into LLL, LLH, LHL, LHH, HLL, HLH, HHL, and HHH. The output is verified in the Modelsim.

34

For this DWT block, the clock and reset were the primary inputs. The pixel values of the image, that is, the input data will be given to this block and hence these values will be split in to even and odd pixel values. In the design, this even and odd were taken as a array which will store its pixel values in it and once all the input pixel values over, then load will be made high which represents that the system is ready for the further process.

Figure 4.1 Simulation Result of DWT-1 Block with Both High and Low Pass Coefficients

Figure 4.2 Simulation Result of DWT-2 Block with Both High and Low Pass Coefficients

35

Figure 4.3 Simulation Result of DWT-3 Block with Both High and Low Pass Coefficients

Figure 4.4 Simulation Result of DWT-4 Block with Both High and Low Pass Coefficients

36

Figure 4.5 Simulation Result of DWT-5 Block with Both High and Low Pass Coefficients

Figure 4.6 Simulation Result of DWT-6 Block with Both High and Low Pass Coefficients

37

Figure 4.7 Simulation Result of DWT-7 Block with Both High and Low Pass Coefficients

Figure 4.8 Simulation Result of 3D-DWT(TOP MODULE) Block with High and Low Pass Coefficients LLL, LLH, LHL, LHH, HLL, HLH, HHL and HHH. Once the load signal is set to high, then the each value from the even and odd array will be taken and used for the Low Pass Coefficients generation process. Hence each value

38

will be given to the adder and in turn given to the multiplication process with the filter coefficients. Finally the Low Pass Coefficients will be achieved from the addition process of multiplied output and the odd pixel value. Again this Low Pass Coefficient will be taken and it will be multiplied with the filter coefficients. The resultant will be added with the even pixel value which gives the High Pass Coefficient. Hence all the values from even and odd array will be taken and then above said process will be carried out in order to achieve the High and Low Pass Coefficients of the image. Now these low pass coefficients and the high pass coefficients were taken as the input for the further process. Hence for the DWT-2 process, low pass coefficients will be taken as the inputs and will do the process in order to calculate the low pass and high pass coefficients from the transformed coefficients of DWT-1. In DWT-2, the same process as in DWT-1 will be carried out. Hence the simulated waveform is shown in the figure 4.2. Similarly the high pass coefficients from the DWT-1 block were taken as input to the DWT-3 block and hence further transformed low pass and high pass coefficients will be obtained. Similarly the process is continued for DWT-4, DWT-5, DWT-6, and DWT-7.

4.3 Introduction to FPGA


FPGA stands for Field Programmable Gate Array which has the array of logic module, I /O module and routing tracks (programmable interconnect). FPGA can be configured by end user to implement specific circuitry. Speed is up to 100 MHz but at present speed is in GHz. Main applications are DSP, FPGA based computers, logic emulation, ASIC and ASSP. FPGA can be programmed mainly on SRAM (Static Random Access Memory). It is Volatile and main advantage of using SRAM programming technology is re-configurability. Issues in FPGA technology are complexity of logic element, clock support, IO support and interconnections (Routing). In this work, design of a DWT and IDWT is made using Verilog HDL and is synthesized on FPGA family of Spartan 3E through XILINX ISE Tool. This process includes following: Translate Map

39

Place and Route 4.3.1 FPGA Flow The basic implementation of design on FPGA has the following steps. Design Entry Logic Optimization Technology Mapping Placement Routing Programming Unit Configured FPGA Above shows the basic steps involved in implementation. The initial design entry of may be Verilog HDL, schematic or Boolean expression. The optimization of the Boolean expression will be carried out by considering area or speed.

Figure 4.9 Logic Block In technology mapping, the transformation of optimized Boolean expression to FPGA logic blocks, that is said to be as Slices. Here area and delay optimization will be taken place. During placement the algorithms are used to place each block in FPGA array. Assigning the FPGA wire segments, which are programmable, to establish connections among FPGA blocks through routing. The configuration of final chip is made in programming unit.

4.4 Synthesis Result

40

The developed DWT, is simulated and verified their functionality. Once the functional verification is done, the RTL model is taken to the synthesis process using the Xilinx ISE tool. In synthesis process, the RTL model will be converted to the gate level net list mapped to a specific technology library. The design of DWT is synthesized and its results were analyzed as follows. 4.4.1 DWT Synthesis Result This device utilization includes the following. Logic Utilization Logic Distribution Total Gate count for the Design

Device utilization summary: ================================================================= =

HDL Synthesis Report


Macro Statistics # RAMs 10x120-bit dual-port RAM 12x60-bit dual-port RAM 8x10-bit dual-port RAM # Multipliers 200x10-bit multiplier # Adders/Subtractors 200-bit adder # Counters 4-bit up counter # Registers 1-bit register 200-bit register # Comparators 4-bit comparator greater : 56 : 14 : 14 : 132 : 20 : 112 : 21 :7 : 42 : 42 : 56 : 14 :8 :4 :2

41

4-bit comparator lessequal

: 14

================================================================= =

Advanced HDL Synthesis Report


Macro Statistics # RAMs 10x120-bit dual-port block RAM 12x60-bit dual-port block RAM 8x10-bit dual-port distributed RAM # Multipliers 200x10-bit registered multiplier # Adders/Subtractors 200-bit adder # Counters 4-bit up counter # Registers Flip-Flops # Comparators 4-bit comparator greater 4-bit comparator lessequal : 56 : 14 : 14 : 8870 : 8870 : 21 :7 : 14 : 42 : 42 : 56 : 14 :8 :4 :2

================================================================= =

*
= Final Results

Final Report

=================================================================

RTL Top Level Output File Name Top Level Output File Name

: top_dwt_m97.ngr

: top_dwt_m97

42

Output Format Optimization Goal Keep Hierarchy Design Statistics # IOs Cell Usage : # BELS # # # # # # # # # # # # # # # # # # # # # # GND INV LUT1 LUT2 LUT3 LUT4 LUT5 LUT6 MUXCY VCC XORCY FDR FDRE FDSE FDSE_1 RAM32M RAM32X1D RAMB18 RAMB36_EXP RAMB36SDP_EXP :1

: NGC : Speed : NO

: 1612

: 54288 :1 : 30 : 1022 : 17056 : 133 : 38 :4 :8 : 18001 : 17994 : 14166 : 14070 : 83 :7 :6 : 46 :2 :8 :8 : 24 :4 :2 :1 :1

# FlipFlops/Latches

# RAMS

# Clock Buffers BUFG BUFGP

43

# IO Buffers # # # = IBUF OBUF DSP48E

: 1611 : 11 : 1600 : 670 : 670

# DSPs

=================================================================

Device utilization summary: --------------------------Selected Device : 5vfx200tff1738-1 Slice Logic Utilization: Number of Slice Registers: Number of Slice LUTs: Number used as Logic: Number used as Memory: Number used as RAM: Slice Logic Distribution: Number of LUT Flip Flop pairs used: 27459 Number with an unused Flip Flop: 13293 out of 27459 Number with an unused LUT: Number of unique control sets: IO Utilization: Number of IOs: Number of bonded IOBs: Specific Feature Utilization: Number of Block RAM/FIFO: Number using Block RAM only: Number of BUFG/BUFGCTRLs: Number of DSP48Es: 32 out of 32 2 out of 670 out of 32 6% 384 174% (*) 456 7% 1612 1612 out of 960 167% (*) 9144 out of 27459 42 Number of fully used LUT-FF pairs: 5022 out of 27459 48% 33% 18% 24 14166 out of 122880 18315 out of 122880 18291 out of 122880 24 out of 36480 11% 14% 14% 0%

44

4.5 Summary
The developed DWT are modelled and are simulated using the Modelsim tool. The simulation results are discussed by considering different cases. The RTL model is synthesized using the Xilinx tool in Spartan 3E and their synthesis results were discussed with the help of generated reports.

45

CHAPTER 5 Conclusion and Future Work 5.1 Conclusion


Basically the medical images need more accuracy without loosing of information. The Discrete Wavelet Transform (DWT) was based on time-scale representation, which provides efficient multi-resolution. The lifting based scheme (9, 7) (The high pass filter has five taps and the low pass filter has three taps) filter give lossless mode of information. A more efficient approach to lossless whose coefficients are exactly represented by finite precision numbers allows for truly lossless encoding. This work ensures that the image pixel values given to the DWT process which gives the high pass and low pass coefficients of the input image. The simulation results of DWT were verified with the appropriate test cases. Once the functional verification is done.

5.2 Future scope of the Work


As future work, This work can be extended in order to increase the accuracy by increasing the level of transformations. This can be used as a part of the block in the full fledged application, i.e., by using these DWT, the applications can be developed such as compression, watermarking, etc.

46

You might also like