In many different fields, digitized images have ... - Semantic Scholar

5 downloads 0 Views 275KB Size Report
Daub 2. 0.68301, 1.18301, .31699, -.18301. Daub 3. 0.47046, 1.14111, .650365 -0.190934, -.1208322, 0.0498174. Daub 4. 0.325803, 1.0109457, .8922001 ...
Wavelet Based Image Compression using Daubechies Filters Savita Gupta and Lakhwinder Kaur Department of Computer Science and Engineering Sant Longowal Institute of Engineering & Technology, Longowal, Sangrur Punjab (148106), India [email protected], [email protected]

Abstract Digitized images have replaced analog images as photographs or x-rays in many different fields. In their raw form, digital images require a tremendous memory capacity for storage and large amount of bandwidth for transmission. In the last two decades, many researchers have been devoted to develop new techniques for image compression. More recently, wavelets have become a cutting edge technology for compressing the images by extracting only the visible elements. In this paper a wavelet based image decomposition algorithm has been implemented. Also, a nonuniform threshold technique based on average intensity values of pixels in each sub band has been proposed to remove the insignificant wavelet coefficients in the transformed image. Experimental results are obtained to compare the Daub2, Daub3 and Daub4 compactly supported (Daubechies) orthogonal wavelets on various test images using two important performance parameters – compression ratio and PSNR. I. Introduction

Image compression is essential for applications such as transmission and storage in databases. It aims to reduce the bit rate for transmission or storage while maintaining an acceptable fidelity or image quality. A common characteristic of most of the images is that the neighboring pixels are highly correlated and therefore contain highly redundant information. The foremost task is then to find an image representation in which the image pixels are de-correlated. Redundancy and irrelevancy are two fundamental principles used in compression.

Compression can be achieved by transforming the data, projecting it onto a basis of functions, applying threshold and then encoding this transform [1]. Due to the nature of image signal and human perception mechanism, the transform used must accept non-stationary and be well localized in both the space and frequency domains. Moreover, it should exploit the psycho visual as well as statistical redundancies in the image data to enable bit rate reduction. Although international standard for still image compression called JPEG [2] has been established by ISO and ECE, the performance of such coder generally degrade at low bit-rates because of the underlying block based DCTscheme [3]. In the DCT the input image needs to be blocked, correlation across the block boundaries is not eliminated resulting in noticeable and annoying blocking artifacts. Wavelet transform solves this problem because there is no need to block the image. Wavelet based coding [4] provides substantial improvement in picture quality at higher compression ratios mainly due to the better energy compaction property of wavelet transforms. The compression method in this paper associates a wavelet transform and thresholding scheme. The paper is organized as follows. Section II describes the wavelet based image decomposition technique. Section III, discusses the threshold calculation method. Experimental results & discussions are given in section IV for various test images. Finally, the concluding remarks are given in section V. II. Wavelet based Image Decomposition

Wavelets are functions of limited duration and having average value of zero. These are

generated from the single function by dilations and translations

ψ a, b (t ) = a

−1 / 2

t −b ψ( ) a

(1)

The definition of wavelets as dilates of one function means that high frequency wavelets correspond to a1 or wider width. Daubechies [5] was the first to discover that the discrete time filters or QMFs can be iterated and under certain regularity conditions will lead to continuous-time wavelets. Since digital image is a discrete signal, so wavelet based image decomposition can be implemented using FIR discrete time filters. There are number of ways, wavelet transform may be used to decompose a signal into various subbands such as uniform decomposition, octave-band decomposition, adaptive or wavelet packet decomposition [4] etc. This paper uses the octave-band decomposition. In the octave-band decomposition, we first pass each row of image through analysis filter bank (h0, g0) and down sampled to get the transformed image which contains the average value and detail coefficients along each row. Next we treat these transformed rows as if they were themselves an image and apply the same process to each column (fig.3). This transformation process results in 4-band (LL, LH, HL, HH) decomposition of an image [6]. To further decompose the resulting image, we repeat this process recursively on the LL-sub band containing averages in both directions. This decomposition provides sub images corresponding to different resolution levels (fig. 4). At the decoder (fig 5), the sub band signals are decoded, up sampled and passed through a bank of synthesis filters (h1, g1) and properly summed up to yield the reconstructed image. For extensive evaluation of the algorithm and to compare the three different filters presented in this paper, algorithm is applied to a number of natural images with each of these filters at four different resolution levels. The coefficients of these filters are given in Table-I. PSNR and compression results are shown in Table-II and Table-III.

III. Threshold Calculation

The main property of wavelet transform is that regions of little variation in original data manifest themselves as small or zero elements in the wavelet-transformed version. Hence, The wavelet Transform of the image contains a large number of detail coefficients, which are very small in magnitude. By fixing a nonnegative threshold, we can reset these small coefficients to zero resulting in a very sparse matrix [8]. Very sparse matrices are easier to store and transmit than ordinary matrices of the same size. Moreover, the image constructed from the thresholded data gives visually acceptable results. A nonuniform thresholding technique is used in this paper for compressing the image. It involves two steps. First, the threshold value is computed separately for each sub band by finding the mean (µ) and standard deviation (σ) of the absolute intensity levels of non-zero pixels in the corresponding sub band. If the σ is greater than µ then the threshold value is set to (2*µ), otherwise, it is set to (µ-σ). Second, thresholding is applied on each sub band except LL sub band removing all detail coefficients whose absolute intensity values are less than the threshold value. IV. Results and Discussion

In the case of lossy compression, the reconstructed image is only an approximation to the original. Although many performance parameters exist for quantifying image quality, it is most commonly expressed in terms of peak signal to noise ratio (PSNR), which is defined as follows [7].

PSNR = 10 log10

255 2

(2)

σε2

where σ ε2 is the mean squared error(MSE) given by

σ

2

ε

1 = MN

M −1 N −1

∧   −   ∑∑ x x i, j i, j  i =0 j =0 

2

(3)

where x[⋅]is the original image with dimensions ∧

M×N and x[]⋅ is the reconstructed image. The

larger PSNR values correspond to good image quality. In order to evaluate the performance of image compression systems, compression ratio metric is often employed. In our results, compression ratio (CR) is computed as the ratio of non-zero entries in the original image to the non-zero entries in the transformed image. 8 7

Daub2 : Solid Line Daub3 : Dashed Line Daub4 : Dotted Line

6 oti a R 5 n oi ss er 4 p m o C 3

+---+ : Lena Image o---o : Barbara Image *----* : Goldhill image

2 1

1

2 3 Levels of decomposition

4

Fig. 1. Compression ratio vs levels of Decomposition of Daub2, Daub3, Daub4 for various images

in boldface represent the best result for each image at each decomposition level. The numerical results show that the PSNR decreases whereas compression ratio increases with increase in level of decomposition. V. Conclusion

This work provides implementation of a wavelet based image decomposition technique combined with a simple thresholding scheme. The PSNR and compression results are obtained for various natural test images at four different decomposition levels using Daubechies filters. The numerical results show that PSNR decreases with increase in compression ratio. Fig. 1 shows that compression ratio increases with increase in level of decomposition. It is also been shown that textured images [10](Barbara) are better compressed using Daub3 whereas Daub4 performs better for non-textured images (Lena & Goldhill). These results can be further improved by using a suitable image coding technique. It is expected that the results presented in this paper will provide a convenient tool for analysis and design of an image compression system. REFERENCES

44

42 Daub2 :Solid Line Daub3 :Dashed Line Daub4 :Dotted Line

40

38

) B d( R N S P

36

34

32 +---+ : Lena Image o---o : Barbara Image *----* : Goldhill image

30

28

26

1

2

3

4

Levels of decomposition

Fig. 2. PSNR vs levels of Decomposition of Daub2, Daub3, Daub4 for various images

Image compression experiments using Daubechies filters were conducted at four different resolution levels followed by thresholding. These experiments were performed on three natural images: Lena, Barbara and Goldhill, which are the canonical 8bpp grayscale test images used frequently in the image compression literature [9]. Table II shows PSNR [7] results for reconstructed images at various decomposition levels and table III gives the compression ratios achieved. The values shown

[1] M. Antonini, M. Barlaud, P. Mathieu, and I. Daubechies, “Image Coding using Wavelet Transform,” IEEE Trans. Image Processing, vol. 1 No. 2, pp. 205-220, April 1992. [2] W.B. Pennebaker, and J.L Mitchell, JPEGStill Image Data Compression Standards. Van Nostrand Reinhold, 1993. [3] K. R. Rao and P. Yip, Discrete Cosine Transforms – algorithms, advantages, applications. Academic Press, 1990. [4] M. Vattereli and J. Kovacevic, Wavelets and Subband Coding. Englewood Cliffs, NJ, Prentice Hall, 1995. [5] A. Cohen, I. Daubechies and J. C. Feauveau, “Biorthogonal bases of compactly supported wavelets,” Comm. Pure and Applied Mathematics, vol. XLV, pp. 485-560, 1992. [6] J. C. Goswami and A. K. Chan, Fundamentals of Wavelets: Theory, Algorithms, and Applications. John Wiley & Sons, 1999. [7] O. Egger, P. Fleury, T. Ebrahimi and M. Kunt, “High-performance compression of visual information-A tutorial review-part I:

Still pictures,” in Proc. IEEE, vol. 87, no. 6, June 1999. [8] E. J. Stollnitz, T. D. DeRose and D. H. Salesin, “Wavelets for computer graphics: a primer, part I,” IEEE Computer Graphics and Applications, vol. 15, No. 3, pp. 76-84, May 1995. [9] M. B. Martin and A. E. Bell, “New image compression techniques using multiwavelets and multiwavelet packets,” IEEE Trans.

Image prcessing, vol. 10, No. 4, pp. 500510, April 2001. [10] F. G. Meyer, A. Z. Averbuch and J. Stromberg, “Fast adaptive Wavelet Packet Image Compression,” IEEE Trans. Image prcessing, vol. 9, No. 1, pp. 792-800, May 2001.

Table I: Filters Coefficients for h1 (Synthesis filter) Filter Daub 2

0.68301, 1.18301, .31699, -.18301

Coefficients for h1

Daub 3

0.47046, 1.14111, .650365 -0.190934, -.1208322, 0.0498174

Daub 4

0.325803, 1.0109457, .8922001, -0.039575, -0.264507, .0436163, .0465036, -0.014987

Table II: PSNR results (in dB) for Daubechies Filters at various decomposition levels. Image (512x512) Lena

Barbara

Goldhill

Filter

Daub2 Daub3 Daub4 Daub2 Daub3 Daub4 Daub2 Daub3 Daub4

Decomposition Levels m=1

m=2

m=3

m=4

41.3136 41.7716 42.2978 35.5824 36.0399 36.6611 37.8430 38.1977 38.5973

37.055 38.2038 37.7034 32.5390 33.4660 33.5339 33.6417 34.3755 34.0134

33.2217 33.9468 34.5444 30.3527 31.0757 31.7144 30.6188 31.0307 31.5011

28.7348 29.5029 31.1425 27.3485 27.6581 28.9178 27.8393 27.9106 29.2751

Table III: Compression ratio for Daubechies Filters at various decomposition levels. Decomposition Levels Image (512x512)

Filter

Lena

Daub2 Daub3 Daub4 Daub2 Daub3 Daub4 Daub2 Daub3 Daub4

Barbara

Goldhill

m=1

m=2

m=3

m=4

1.8620 1.9439 1.9617 2.8143 2.8778 2.8533 2.1242 2.1421 2.1512

2.6895 2.8395 2.8936 5.1009 5.2097 5.1979 3.2669 3.2634 3.3085

3.0192 3.2203 3.2938 6.4091 6.6182 6.6046 3.7735 3.7776 3.8390

3.1167 3.3368 3.4208 6.8502 7.1054 7.1035 3.9293 3.9394 4.0126

ROWS

h0

Image corresponding to the low-resolution level m

COLUMNS h0

1↓2

g0

1↓2

h0

1↓2

g0

1↓2

Image corresponding to the lowresolution level m

2↓1

g0

2↓1

2↓1

Keep one column out of two

1↓2

Keep one line out of two

Detail images corresponding to the information visible at resolution level m-1

Convolve with filter x

x

Fig. 3. One stage in multiscale image decomposition.

m≥2

m=2

Low resolution sub images (LL2)

Horizontal orientation sub image at m =2 (LH2)

Vertical orientation sub image at m=2(HL2)

Diagonal orientation sub image at m=2 (HH2)

Resolution m=1 Vertical Orientation Sub-image (HL1)

m=1

Resolution m=1 Horizontal Orientation Sub-image (LH1)

Resolution m=1 Diagonal Orientation Sub-image (HH1)

Fig 4. Image decomposition

COLUMNS Image corresponding to the low resolution level m Detail images at resolution level m

ROWS

1↑2

h1

1↑2

g1

1↑2

h1

1↑2

g1

2↑1

Put one column of zero between each column

1↑2

Put one row of zero between each line Fig. 5.

2↑1

h1

2↑1

g1

x

Reconstructed resolution level m-1

Convolve with filter x

One stage in multiscale image reconstruction