Open access peer-reviewed chapter

Low Complexity Implementation of Daubechies Wavelets for Medical Imaging Applications

By Khan Wahid

Submitted: November 9th 2010Reviewed: May 3rd 2011Published: August 29th 2011

DOI: 10.5772/20467

Downloaded: 1845

1. Introduction

The Discrete Wavelet Transform (DWT) has extensively been used in a wide range of applications, including numerical analysis, image and video coding, pattern recognition, medical and telemetric imaging, etc. The invention of DWT decomposition by Mallat (Mallat, 1998) shows that the DWT can be viewed as a multiresolution decomposition of signal. This means it decomposes the signal into its components in different frequency bands. The Inverse DWT does the opposite, i.e. it reconstructs the signal from its octave band components. After its inclusion in JPEG2000 compression standard (Seo & Kim, 2007), significant research has been done to optimize the DWT implementation to reduce the computational complexity. Among a wide range of wavelets, the Daubechies wavelets include members ranging from highly localized to highly smooth and can provide excellent performance in image compression (Daubechies, 1992). Among the family members, the first two – Daubechies 4-tap (DAUB4) and Daubechies 6-tap (DAUB6) – are popular choices in medical imaging applications.

While compressing medical images, the key here is to preserve as much critical information as possible in the reconstructed image so that accurate diagnosis is possible. There have been several efficient implementations of wavelet filters proposed for applications in image processing (Lee & Lim, 2006; Martina & Masera, 2007; Acharyya et al., 2009; Shi et al., 2009; Lai et al., 2009). But, the use of conventional fixed-point (FP) binary (or any other weighted) representation for implementing discrete wavelet coefficients (that are irrational in nature) introduces round-off or approximation errors at the very beginning of the process. The error is due to the lack of exact representation of the irrational numbers that form the coefficient basis. These errors tend to expand as the calculations progress through the architecture, degrading the quality of image reconstruction (Wahid et al., 2003). A lossless mapping technique, known as Algebraic Integer Quantization (AIQ), can be used to minimize the approximation error and efficiently compute the DAUB4 and DAUB6 coefficients (Wahid et al., 2004). The AIQ scheme is divided into two parts: the first stage is based on factorization and decomposition of transform matrices exploiting the symmetric structure. After the decomposition, we map the irrational transform basis coefficients using multidimensional algebraic integers that results in exact representation and simpler implementation. As a result, less error is introduced in the computation process that yields significantly better reconstruction of images while keeping critical information, making the scheme suitable for medical and telemetric imaging applications.

As a case study, we apply the scheme to several medical images, such as endoscopic, ultrasound, x-ray, CT-scan images and evaluate the performance. The chapter is organized as follows: Previous related works are presented next. Section 3 presents a brief introduction to Daubechies wavelets. In Section 4, we explain the AIQ scheme applied to Daubechies wavelets. Then the simulation and synthesized results of the case study are summarized in Section 5. Finally, we conclude the work in Section 6.

2. Past work

Lewis and Knowles proposed an architecture for Daubechies wavelets without multipliers (Lewis & Knowles, 1991). A major drawback was that it was heavily dependent on the properties of only one specific wavelet, DAUB4 tap coefficients. At the same time, Aware Inc. came out with a chip called Wavelet Transform Processor (WTP) (Aware, 1991). It essentially consists of a 4-tap filter (4 Multiply-Accumulate cells) and some external memory with control but no specific features that can take advantage of the DWT structure rather it relies heavily on the software to compute the DWT. It is also a complex design requiring extensive user control. Parhi and Nishitani proposed two architectures, folded and digit serial, for 1D DWT (Parhi & Nishitani, 1993). These architectures do not easily scale with the filter size and the number of octaves computed. The number of multipliers is higher, and hence the silicon area is large. In (Vishwanath et al., 1995), the authors proposed linear systolic array architecture. Paek and Kim in proposed recursive and semi-recursive architectures for DWT which has several drawbacks like large area (hardware cost), scheduling control overhead and incomplete data-bus utilization (Paek & Kim, 1998).

Most of the research work to reduce the hardware complexity is inclined towards multiplierless implementations by maneuvering the filter banks (Lee & Lim, 2006; Martina & Masera, 2007; Acharyya et al., 2009) or using lifting schemes (Shi et al., 2009; Lai et al., 2009; Huang et al., 2004). However, in these designs, the use of conventional FP binary representation results in erroneous computation process and degrades image reconstruction. In this chapter, we present an efficient low-cost implementation of the DAUB filters with a demonstration of performance advantages on medical images and noisy environment.

3. Daubechies wavelets

This section provides a brief introduction to Daubechies wavelets. This class of wavelets includes members ranging from highly localized to highly smooth – Daubechies-2 (DAUB2 with two coefficients) to Daubechies-20 (DAUB20 with 20 coefficients) and also provides excellent performance in image compression (Daubechies, 1992). The Daubechies wavelet coefficients are based on computing wavelet coefficients, Cn(where, n = 0, 1, 2,..., N-1 and N is the number of coefficients) to satisfy the following conditions (Mallat, 1998):

  1. The conservation of area under a finite length signalx(t): nCn=2

  2. The accuracy conditions: n(1)nnmCn=0(where m = 0, 1, 2,..., p-1 andp=N2)

  3. The perfect reconstruction conditions: nCn2=2and nCnCn+2m=0

Then the low-pass filter is h(n)=Cn2and the high-pass filter isg(n)=(1)n+1h(nN1). One of the simplest and most localized members is the DAUB6 which has six coefficients:

C0=(1+z1+z2)162C1=(5+z1+3z2)162C2=(102z1+2z2)162C3=(102z12z2)162C4=(5+z13z2)162C5=(1+z1z2)162E1

Where, z1=10andz2=5+210. For an 8x8 input data, the DAUB6 forward transform matrix (using an assumption of periodicity) is shown in Eq. (2):

ψ6(C)=[C0C1C2C3C4C500C5C4C3C2C1C00000C0C1C2C3C4C500C5C4C3C2C1C0C4C500C0C1C2C3C1C000C5C4C3C2C2C3C4C500C0C1C3C2C1C000C5C4]E2

Figure 1.

FP-based DAUB6 filter architecture.

The structure of the matrix uses the set of coefficients, {C0,C1,...,C5}as a smoothing filter (low-pass) and the set, {C5,C4,...,C0}as a non-smoothing filter (high-pass). The DWT is invertible and orthogonal - the inverse transform, when viewed as a matrix, is simply the transpose of the forward transform matrix. So, basically we need only 2 sets of multiply-accumulate (MAC) cells each containing 6 multipliers and 5 adders where partial products are computed separately and subsequently added. However, it can be seen that, by introducing additional control circuitry, the same multipliers can be used for both low-pass and high-pass filtering. As a result, the number of multipliers can be reduced to 6 instead of 12. Fig. 1 shows the signal flow graph of the conventional finite-precision (FP) implementation of Eq. (2), where xiis the input data vector. Since all the coefficients are fixed, for a fixed precision, we can in fact replace all the multipliers by adders and shifters. As a result, the total equivalent additions required to compute the 1-D DAUB6 filter is 44.

4. AIQ-based algorithm

Algebraic integer (AI) is defined by real numbers that are roots of monic polynomials with integer coefficients (Wahid et al., 2004). As an example, let ω=e2πj16denote a primitive 16th root of unity over the ring of complex numbers. Then ωsatisfies the equation:x8+1=0. The ring Z(ω)can be regarded as consisting of polynomials in ωof degree 7 with integer coefficients. The elements of Z(ω)are added and multiplied as polynomials, except that the rule ω8=1is used in the product to reduce the degree of powers to below 8.

In summary, algebraic integers of an extension of degree n can be assumed to be of the form:

a0ω0+a1ω1+...+an1ωn1E3

Where, {ω0,ω1,...,ωn1}is called the AI basis and the coefficients aiare integers. The process of mapping with AI is known as Algebraic Integer Quantization (AIQ).

The AIQ technique is useful in computing discrete transforms as first explored by Cozzens and Finkelstein (Cozzens & Finkelstein, 1985). In their work, the algebraic integer number representation, in which the signal sample is represented by a set of (typically four to eight) small integers, combines with the Residue Number System (RNS) to produce processors composed of simple parallel channels. The analog samples must first be quantized into the algebraic integer representation and the final algebraic integer result converted back to an analog or digital form. In between these two conversions, the algebraic integer representation must be converted into and out of two levels of RNS parallelism.

4.1. AIQ-based Daubechies wavelets

Now we present the concept of AIQ to encode the DAUB6 coefficients. First of all, consider the polynomial of two variables:

f(z1,z2)=i=01j=01aijzi1zj2=[a00a10a01a11][1z2z1z1z2]E4

So the corresponding coefficients, aij, are encoded in the form[a00a10a01a11]. Then all the DAUB6 coefficients are exactly encoded (scaled by162) and shown below in Eq. (5):

C0=[1110]C1=[5130]C2=[10220]C3=[10220]C4=[5130]C5=[1110]E5

The obvious advantages of this approach are: a) Very small dynamic range (numbers ranging from 0 to 10); b) Multiplication by a constant is very easy and efficient (only 1 addition is required in most cases; so, multiplication can be eliminated by add/shift algorithm); and c) We have 3 parallel channels through which data flows independently (since a11is zero for all) and also a very simple scheduling is needed. No quantization errors would be incurred. Fig. 2 shows the signal flow graph of the AIQ-based scheme that requires 42 adders.

Figure 2.

AIQ-based DAUB6 filter architecture.

The encoding scheme can be easily applied to DAUB4 coefficients. In that case, we need a 2nd degree polynomial of one variable:

f(z3)=a0+a1z3+a2z23E6

Where,z3=3. As a result, the error-free mapping of DAUB4 coefficients can computed as given below (scaled by42):

C0=1+z3;C1=3+z3;C2=3z3;C3=1z3E7

4.2. Hardware implementation

The AIQ-based architecture is coded in Verilog and prototyped onto Xilinx VirtexE FPGA to assess the performance. A precision of 8-bit is used in the multipliers to minimize the hardware and optimize the operation, which is completed in one clock cycle (CC). Table 1 presents the comparison of the synthesized results along with the fixed-point (FP) designs. It can be seen from the table that the AIQ scheme for both DAUB4 (D4) and DAUB6 (D6) costs lesser hardware resources and has lower critical path delay; in case of DAUB4, the savings is even higher.

SchemeFixed-pointAIQOverall savings (%)
D4D6D4D6D4D6
Datapath4636250
Adders32441642505
LUTs268364124340547
Registers422520200494535
Critical pathTm+2TaTm+3Ta5Ta6Ta----
Frequency (MHz)98112148120----

Table 1.

Xilinx VirtexE (xcv300epq240-8); D4 = DAUB4; D6 = DAUB6; Tm = latency for multiply operation; Ta = latency for addition operationFPGA1 implementation and hardware comparison.

A key advantage of the AIQ approach is error reduction. In order to better understand the sources of error induction, we present in Fig. 3 the entire process of digital computation process. Here each arrow represents one key stage in the computation. In case of FP-based approach, there are three stages of error accumulation (or induction). In stage 1, the quantization (or approximation) error is introduced due to the lack of finite representation of transform basis coefficients that are irrational numbers. The error gets larger and larger in later stages as the process continues.

However, in AIQ-based approach, there is only one stage of error induction at the end: in stage 1, the basis coefficients are mapped with algebraic integers (that is error-free); then all the required computations take place (that is also error-free) using the AI representation. Finally, the data is converted back to binary (in stage 3) where some errors may be introduced; but these errors are much less compared to FP-approach, and are introduced very late in the computation process, and hence less affect the quality of image reconstruction.

Figure 3.

Stages in computation process (error induced in shaded blocks): (a) FP approach; (b) AIQ approach.

Moreover, the error introduced at the final stage in AIQ approach can be further minimized using higher precision AIQ multipliers. We have performed an error analysis that shows the error incurred for different bit-length of the AIQ multipliers (in Fig. 4). The error is computed taking a multiplier of 16-bit width as reference. The signed digit representation (for 8-bits) is shown below in Eq. (8):

z1=1011.001010=3+23+25z2=5+210100.1¯01¯00=42123z3=310.01¯001¯0=22225E8

Figure 4.

Computation error in AIQ multipliers.

5. Performance evaluation

The AIQ-based algorithm to compute the Daubechies Wavelet Transform is intended to be used in applications where the quality of image reconstruction is critical, such as biomedical imaging, telemedicine, capsule endoscopy (Wahid et al., 2008), etc. Due to the error-free nature of integer mapping, the AIQ approach results in a much better reconstruction compared to conventional binary approach. Here, we present the results of our study, where we apply the scheme to several standard benchmark and medical images, such as endoscopic, ultrasound, x-ray, CT-scan images and evaluate the performance.

The section is divided into four sub-sections. In the first section, we evaluate the performance of the AIQ scheme for standard images followed by the analysis of medical images. Next, we show the performance of the scheme in a noisy environment. Finally, the results are compared with existing works related to medical image compression. In all these cases, we have used peak-signal-to-noise-ratio (PSNR) as the visual quality assessment index which is given by Eq. (9):

PSNR=20×log102551M×Nn=1Nm=1M(xm,nx'm,n)2E9

Where, M and N are the image width and height namely; x and x’ are the original and reconstructed component values namely.

5.1. Performance analysis on standard images

Here, we perform 1-D forward transform on the benchmark “Goldhill” image followed by the inverse transform to get the original image back. No compression was performed, so the image quality degradation is purely due to arithmetic quantization effects. Different hardware precision (number of bit) is used where a full adder is considered as the unit for the hardware cost, and making a simple assumption of a hardware cost of n for an n-bit word (this will be a best case comparison for the fixed-point binary implementation). The results are shown in Fig. 5 and 6.

As shown in Fig. 5(a), the PSNR of the reconstructed image gets higher with the increased bit precision which is expected. In all cases, the AIQ performs much better that FP, i.e., the data recovery rate is higher, especially in lower bit rate region. In other words, for a fixed level of distortion, the number of bits required to transmit the transformed coefficients of AIQ approach would be less than those required for FP technique.

In Fig. 5(b), we present an analysis of reconstruction quality (in PSNR) with the cost of implementation. An interesting comparison is to select similar hardware cost and then compare the reconstruction performance. As an example, for same hardware cost of 150, compare the PSNR of both FP (44dB) and AIQ implementation (82dB). In this case the difference in the PSNR is 38dB in favour of AI – that is for similar cost of implementation, the AIQ scheme produces much better image reconstruction. On the other hand, for same PSNR, say 60 dB, AIQ scheme (95) requires around three times less hardware than FP implementation (270).

Figure 5.

Performance analysis of DAUB4 – FP vs. AIQ: (a) PSNR vs. Precision; (b) PSNR vs. Hardware cost.

Figure 6.

Performance analysis of DAUB6 – FP vs. AIQ: (a) PSNR vs. Precision; (b) PSNR vs. Hardware cost.

Same kind of superiority is seen for DAUB6 (Figure 6) too. So, not only an improvement in image reconstruction quality is obtained but also hardware cost is reduced. Fig. 7 shows the image reconstruction for a 8-bit FP vs. a 14-bit AIQ for DAUB4. The difference in PSNR is about 45dB and the level of improvement is quite noticeable.

Figure 7.

a) Original goldhill image; (b) Reconstructed image using FP scheme (8-bits); (c) AIQ scheme (14-bits).

5.2. Performance analysis on medical images

We have performed an exhaustive simulation using several medical images, such as, X-ray, CT-scan, Ultrasound (US) and endoscopic images, and the results are presented in Table 2 (showing for two cases of bit precision: 8-bits and 12-bits). In all cases, the AIQ-based scheme produces a high PSNR and outperforms the conventional approach by a far margin. Some sample original and reconstructed images are shown in Fig. 811. In most cases, the difference in PSNR is around 8dB with noticeable level of improvement.

D4-FPD4-AIQD6-FPD6-AIQ
CT8 bit44.452.541.149.3
12 bit66.776.665.576.6
Endoscopic8 bit44.851.841.450.8
12 bit67.176.066.175.9
US8 bit48.055.944.853.7
12 bit70.479.969.079.9
X-ray8 bit43.350.139.949.2
12 bit65.574.164.574.1

Table 2.

Quality of reconstruction (in terms of PSNR in dB) for medical images.

Figure 8.

a) Original endoscopic image; (b) Reconstructed image using FP scheme; (c) AIQ scheme.

Figure 9.

a) Original x-ray image; (b) Reconstructed image using FP scheme; (c) AIQ scheme.

Figure 10.

a) Original CT-scan image; (b) Reconstructed image using FP scheme; (c) AIQ scheme.

Figure 11.

a) Original US image; (b) Reconstructed image using FP scheme; (c) AIQ scheme.

5.3. Performance analysis on noisy images

As a final study, the AIQ algorithm is tested under a noisy environment. The Gaussian white noise and Poisson noise are added to the images of all types, and the performance is compared with the FP implementation. The results are tabulated in Table 3 (all using 8-bit precision). Like previous cases, due to less error accumulation in the computation process, the AIQ-based approach is seen to have performed better than FP approaches even in a noisy environment.

NoiseAlgorithmPSNR (dB)
GoldhillUSX-rayEndoscopicCT
GaussianD4 - FP43.947.543.144.644.4
D4 - AIQ51.455.550.051.652.4
D6 - FP40.644.339.741.341.1
D6 - AIQ49.953.249.350.649.7
PoissonD4 - FP44.147.643.244.844.6
D4 - AIQ51.655.650.051.852.5
D6 - FP40.744.539.841.541.3
D6 - AIQ50.153.449.350.949.9

Table 3.

Quality of reconstruction in noisy environment.

5.4. Comparative analysis

In order to show the effectiveness of the AIQ approach, the algorithm is compared with some compression standards: JPEG, JPEG2000, and existing algorithms targeted to medical imaging. Since there is no benchmark for medical images, we have conducted the experiment with benchmark images like “Lena”, “Barbara” and “Goldhill”. Table 4 summarizes the comparison results (all using 8-bit precision with 0.25 bits per pixel). From the table, it is clearly observed that the error-free algorithm performs competitively compared to other existing compression schemes.

AlgorithmLenaBarbaraGoldhill
HS-HIC (Mohammed, 2008)35.026.130.5
Hybrid (Yu & Mitra, 1997)35.031.532.9
JPEG (Wahid et al., 2008)32.427.729.7
JPEG2000 (Seo & Kim, 2007)34.128.830.5
OB-HIC (Mohammed & Abd, 2010)35.932.833.8
D4-AIQ44.945.035.8
D6-AIQ43.243.635.3

Table 4.

Comparative analysis (in terms of PSNR in dB) of the AIQ scheme.

6. Conclusion

In this chapter, we have presented an efficient approach to compute Daubechies wavelet transforms that is based on encoding the basis set of forward transform coefficients using algebraic integers. The AIQ approach not only reduces the number of arithmetic operations, but also reduces the dynamic range of the computations. Because of error-free mapping in the earlier stages, less error is introduced in the system, as compared to FP implementation, that results in much better data reconstruction. The performance is validated using standard and medical images in both normal and noisy conditions. In all cases, the AIQ-based approach outperforms the conventional FP scheme by far margin. The rate of data recovery is very high while preserving critical information that makes the scheme suitable for medical and telemetric imaging applications.

Acknowledgments

The author would like to acknowledge the Natural Science and Engineering Research Council of Canada (NSERC) for its support to this research work. The author is also indebted to the Canadian Microelectronics Corporation (CMC) for providing the hardware and software infrastructure used in the development of this design.

© 2011 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike-3.0 License, which permits use, distribution and reproduction for non-commercial purposes, provided the original is properly cited and derivative works building on this content are distributed under the same license.

How to cite and reference

Link to this chapter Copy to clipboard

Cite this chapter Copy to clipboard

Khan Wahid (August 29th 2011). Low Complexity Implementation of Daubechies Wavelets for Medical Imaging Applications, Discrete Wavelet Transforms - Algorithms and Applications, Hannu Olkkonen, IntechOpen, DOI: 10.5772/20467. Available from:

chapter statistics

1845total chapter downloads

6Crossref citations

More statistics for editors and authors

Login to your personal dashboard for more detailed statistics on your publications.

Access personal reporting

Related Content

This Book

Next chapter

Discrete Wavelets on Edges

By Alexandre Chapiro, Tassio Knop De Castro, Virginia Mota, Eder De Almeida Perez, Marcelo Bernardes Vieira and Wilhelm Passarella Freire

Related Book

First chapter

Biomedical Applications of the Discrete Wavelet Transform

By Raquel Cervigón

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

More About Us