You are on page 1of 21

48

Chapter 3

Image Compression Using Curvelet Transform

3.1 Introduction

Compression techniques [8] that are based on modifying the transform of an image are considered here. In these techniques, a reversible, linear transform (such as transforms discussed in Chapter 2) is used to map the image into a set of transform coefficients, which are then quantized and coded. For most natural images, a significant number of the coefficients have small magnitudes and can be coarsely quantized with little image distortion. Fig. 3.1 shows a typical transform coding system. The decoder implements the inverse sequence of steps (with the exception of the quantization function) of the encoder, which performs three relatively straightforward operations: transformation, quantization, and coding. The goal of the transformation process is to decorrelate the pixels of image, or to pack as much information as possible into the smallest number of transform coefficients. The quantization stage then selectively eliminates or more coarsely quantizes the coefficients that carry the least information. These coefficients have the smallest impact on reconstructed image quality. The encoding process terminates by coding the quantized coefficients.

49

Fig. 3.1 A Transform coding (a) encoder and (b) decoder

In

this

chapter

practical

implementations

of

proposed

compression method is focused. The next section will briefly survey existing methods, while section 3.3 briefs about new transform, section 3.4 discusses the quantizer design for proposed compression method, section 3.5 demonstrates the algorithm of new compression technique and sections 3.6 and 3.7 explains the metrics and indexes used to evaluate the performance. Finally, the superiority of proposed technique over conventional methods is demonstrated.

3.2 Survey of Existing Methods

Past few years have produced abundant results in compression techniques for images primarily for its wide spread usage in internet technologies etc. Wavelet based compression of digital signals and

50 images have been a topic of interest for quiet sometime now. In many hundreds of papers published [56-63] in journals throughout the scientific and engineering disciplines, a wide range of tools and ideas have been proposed and studied. Though wavelet based techniques have proven their worth in number of fields the major drawback associated with them are their inability to capture geometry of two dimensional edges. Therefore, the field of image processing demands a true 2-dimensional transform that can efficiently handle the intrinsic geometrical structure that is the key in visual information. The next section briefly describes the new transform that solves the problem of capturing image edges.

3.3 New Multiscale Transform

Candes and Donoho [1] developed a new multi-scale transform which they called as the curvelet transform . Motivated by the needs of image analysis, it was nevertheless first proposed in the context of objects f(x1; x2) defined on the continuum plane (x1,x2)R2. The new transform is believed to capture image information more efficiently than the wavelet transform by providing basis elements in addition to possessing the qualities of wavelet. Basis functions in curvelets are oriented at variety of directions and with variety of elongated shapes with different aspect ratios. In particular, it was designed to represent edges and other singularities along curves much more efficiently than traditional transforms, i.e. using many fewer coefficients for a given

51 accuracy of reconstruction. Roughly speaking, to represent an edge to squared error 1/N requires 1/N wavelets and only about 1/ N curvelets. The details of curvelet transform are given in section 2.2 of chapter 2.

3.4

Quantizer Design and Coding

The uniform quantizer is the most commonly used scalar quantizer for transform based image compression due to its simplicity. It is also known as a linear quantizer since its staircase input-output response lies along a straight line(with a unit slope). Two commonly used linear staircase quantizers are the midtread and the midrise quantizers.

3.4.1 Existing Quantizer

From MATLAB tool box, it is observed that the quantizer is defined as: y=Q_T(x) where: Q_T(x) = 0 , if |x|<T Q_T(x) = sgn(x) * [x/T] , otherwise (3.1)

The input values for quantizer are created with evenly spacing and bin size(T) is assumed as 0.1. The quantization curve is as shown

52 in Fig. 3.2(a). From the quantization curve, it can be said that the above quantizer is midtread.

For decompression, de-quantized values are computed using the following equation. Dq=sgn(Q) * (abs(Q)+0.5)*T (3.2)

Where Q are quantizer output values and Dq are de-quantized values. In the above equation 0.5 is chosen to get the de-quantized values at the mid-point of each quantization bin. De-quantized real values are shown in Fig. 3.2(b).

(a)

(b)

Fig. 3.2. Existing Quantizer (a) Quantization curve (b) De-quantized values.

It is known that the subinterval size of the midtread quantizer is larger than the midrise quantizer. Hence for the uniformly distributed input, the average quantization error of the midtread quantizer is larger than that of midrise quantizer.

53

3.4.2 Proposed Quantizer

The two constraints to be considered while designing quantizer are as follows: 1. Quantizer must have average quantization error as low as possible. 2. De-quantized values must be exactly at the mid-point of each quantization bin. Since the source considered for compression application is uniformly distributed, midrise quantizer is preferred, which satisfies the first constraint. To obtain the midrise quantizer and to satisfy second

constraint, the midtread quantizer equations are restructured as: y=Q_T(x) where: Q_T(x) = 0 , if |x|<T otherwise (3.3)

Q_T(x) = sgn(x) * ([x/T]+K)*T ,

The input values for quantizer are created with evenly spacing and bin size(T) is assumed as 0.1. Here K is a constant. For decompression, de-quantized equation is modified as: Dq=sgn(Q) * ([abs(Q)/T]-M)*T (3.4)

Where Q are quantizer output values, Dq are de-quantized values and M is a constant.

54 The above equations are tested for different values of K and M. For convenience the quantization and de-quantization curves for three different combinations of K and M are shown in Figs. 3.3, 3.4 and 3.5.

(a)

(b)

Fig. 3.3 Proposed Quantizer with K=0.6 and M=0.5 (a) Quantization curve (b) De-quantized values.

In Fig. 3.3

, it is observed that for K=0.6 and M=0.5 the

quantization and de-quantization curves are not efficient and the dequantized values are not at the mid-point of each quantization bin. Hence K and M values are changed to 0.7 and 0.4 respectively, whose quantization and de-quantization curves are shown in Fig. 3.4.

55

(a)

(b)

Fig. 3.4 Proposed Quantizer with K=0.7 and M=0.4 (a) Quantization curve (b) De-quantized values.

In Fig. 3.4 , it is observed that for K=0.7 and M=0.4 the quantization and de-quantization curves are still not efficient and the de-quantized values are not at the mid-point of each quantization bin. Hence K and M values are further changed to 0.8 and 0.3 respectively, whose quantization and de-quantization curves are shown in Fig. 3.5.

(a)

(b)

Fig. 3.5 Proposed Quantizer with K=0.8 and M=0.3 (a) Quantization curve (b) De-quantized values.

56

In Fig. 3.5 , it is observed that for K=0.8 and M=0.3 the quantization and de-quantization curves are efficient and the de-quantized values are exactly at the mid-point of each quantization bin. The quantization curve resembles midrise quantizer. Hence the proposed quantizer suits for the assumed uniformly distributed source, whose

quantization equation becomes as: y=Q_T(x) Q_T(x) = 0 , if |x|<T Q_T(x) = sgn(x) * ([x/T]+0.8)*T , and the de-quantization equation as: Dq=sgn(Q) * ([abs(Q)/T]-0.3)*T (3.6) otherwise (3.5)

Where Q are quantizer output values and Dq are de-quantized values. The purpose of an entropy encoder(symbol encoder) is to reduce the number of bits required to represent each symbol at the quantizer output. For simplicity one of the entropy encoding technique i.e. an arithmetic coding, which is an integral part of MATLAB tool box has been used to serve the purpose.

3.5 The Algorithm

The following steps are involved in the compression algorithm of Curvelet Transform. 1. Read input image f .

57 2. Apply the 2D FFT and obtain Fourier samples

f [ n1 , n2 ], n / 2 n1 , n2 < n / 2.
% 3. For each scale j and angle l , form the product U j ,l [n1 , n2 ] f [n1 , n2 ]. 4. Wrap this product around the origin and obtain

% % f j ,l [n1 , n2 ] = W (U j ,l f )[n1 , n2 ], where the range for n1 and n2 is now


0 n1 < L1, j and 0 n2 < L2, j (for in the range ( / 4, / 4) ).

% 5. Apply the inverse 2D FFT to each f j ,l , hence collecting the discrete coefficients c D ( j , l , k ) . 6. Quantize the coefficients with the proposed quantizer. 7. Entropy code the quantizer outputs. 8. Apply inverse operations to the result of step 7.

Based on the algorithm stated above, a compression technique has been developed for images of different sizes, which is tested using Curvlab[16] and MATLAB tools. The algorithm developed is working to a satisfaction and results are encouraging in case of curvelets.

3.6 Compression Metrics

The basic compression metric used to evaluate the performance of the compression algorithm is the compression ratio, which is defined as:

58
Compression ratio(%) = Output file size(bytes) Input file size(bytes )

Rate is another metric used to evaluate the performance of the compression algorithm, that gives the number of bits per pixel (bpp)used to encode an image and is defined as:
Rate(bpp ) = 8*(Output file size(bytes )) Input file size(bytes )

3.7 Performance Index

In the Objective fidelity criteria Mean Square Error(MSE), Signal to Noise Ratio(SNR) and Peak Signal to Noise Ratio(PSNR) are used to evaluate the quality of the decompressed image of an algorithm. MSE has some problem when images with different types of degradation are compared. The PSNR measure is superior to other measures such as SNR as it uses a constant value in which to compare the noise against instead of a fluctuating signal as in SNR. This allows PSNR values received to be treated more meaningfully when quantifiably comparing different image coding algorithms. Hence PSNR is used which is defined as:

psnr = 10 log10

M 1 M 2 max( f (i, j )) 2

M1 M 2

dB

[ f (i, j ) f (i, j )]

(3.7)

i= 1 j= 1

where M1 and M2 are the size of the image. f (i, j ) is the original image,
f (i, j ) is the decompressed image.

59

3.8 Simulations

In the simulation, various images like plain(Barbara), Building and Textured images have been selected for compression. The results are presented in Figs. 3.6 to 3.14 and in Tables 3.1 to 3.3. The results indicate that there exists a qualitative difference between the methods considered for compression and reconstruction of image under test. The following observations are made from the results. 1. The curvelet with proposed quantizer algorithm enjoys superior compression ratio over wavelet with existing quantizer, curvelet with existing and wavelet with proposed quantizer algorithms. The performance is judged mainly through visual clarity and through PSNR. 2. The curvelet with proposed quantizer reconstruction displays higher sensitivity even at higher compression ratios. 3. In case of plain(Barbara) image the curvelet with proposed quantizer performs better at all compression ratios compared to other algorithms, where as in case of Building and Textured images at low compression ratios curvelet with existing quantizer performs better compared to other algorithms, but at higher compression ratios curvelet with proposed quantizer outperforms the other algorithms irrespective of image.

60

(a)

(b) Fig. 3.6

(c)

(d)

(e)

Barbara image for compression ratio of 1:20 (a) Original (c) Curvelet with existing (e) Curvelet with

image (b) Wavelet with existing quantizer

quantizer (d) Wavelet with proposed quantizer proposed quantizer.

61

Fig. 3.7 PSNR Vs Compression ratio corresponding to Wavelet with existing quantizer, Curvelet with existing quantizer, Wavelet with

proposed quantizer and Curvelet with proposed quantizer for Barbara image.

Fig. 3.8

Bit rate Vs PSNR corresponding to Wavelet with existing Wavelet with proposed

quantizer, Curvelet with existing quantizer,

quantizer and Curvelet with proposed quantizer for Barbara image.

62

Table 3.1 PSNR Vs Compression ratio for various algorithms w.r.t. Barbara image.
S.No
Compression ratio Wavelet With existing quantizer

PSNR in dB(Barbara image)


Curvelet With existing quantizer Wavelet With proposed quanizer Curvelet With proposed quantizer

1 2 3 4 5 6 7 8 9 10

10 20 30 40 50 60 70 80 90 100

18.5611 15.0924 14.4269 14.1493 13.5877 13.6517 13.6520 13.6514 13.6510 13.6500

25.9800 20.8571 19.2967 18.6013 18.2636 18.1034 17.8048 17.4066 16.6934 15.6489

28.7499 25.5371 24.2425 23.4729 22.9075 22.4776 22.1051 21.7726 21.5213 21.2750

32.6106 29.4896 27.8719 26.8112 26.0476 25.4763 25.0048 24.6282 24.2929 24.0100

63

(a)

(b) Fig. 3.9

(c)

(d)

(e)

Building image for compression ratio of 1:100 (a) Original (c) Curvelet with existing (e) Curvelet with

image (b) Wavelet with existing quantizer

quantizer (d) Wavelet with proposed quantizer proposed quantizer.

64

Fig. 3.10 PSNR Vs Compression ratio corresponding to Wavelet with existing quantizer, Curvelet with existing quantizer, Wavelet with

proposed quantizer and Curvelet with proposed quantizer for Building image.

Fig. 3.11

Bit rate Vs PSNR corresponding to Wavelet with existing Wavelet with proposed

quantizer, Curvelet with existing quantizer,

quantizer and Curvelet with proposed quantizer for Building image.

65

Table 3.2 PSNR Vs Compression ratio for various algorithms w.r.t. Building image.
S.No
Compression ratio Wavelet With existing quantizer

PSNR in dB(Building image)


Curvelet With existing quantizer Wavelet With proposed quanizer Curvelet With proposed quantizer

1 2 3 4 5 6 7 8 9 10

10 20 30 40 50 60 70 80 90 100

68.2161 57.1632 51.5045 46.4771 43.4594 39.6710 37.0916 33.9523 31.6615 29.1476

71.9648 64.1273 55.6216 53.2969 49.0069 47.6945 45.0536 44.2485 42.5550 41.9857

64.7527 57.9770 54.4419 51.8921 49.9259 48.1999 46.7368 45.4894 44.2788 43.0620

65.6324 58.5926 55.1260 52.9034 51.2434 49.9897 48.9159 48.0753 47.3122 46.6589

66

(a)

(b)

(c)

(d)

(e)

Fig. 3.12 Textured image for compression ratio of 1:100 (a) Original image (b) Wavelet with existing quantizer (c) Curvelet with existing (e) Curvelet with

quantizer (d) Wavelet with proposed quantizer proposed quantizer.

67

Fig. 3.13 PSNR Vs Compression ratio corresponding to Wavelet with existing quantizer, Curvelet with existing quantizer, Wavelet with for

proposed quantizer and Curvelet with proposed quantizer Textured image.

Fig. 3.14

Bit rate Vs PSNR corresponding to Wavelet with existing Wavelet with proposed

quantizer, Curvelet with existing quantizer,

quantizer and Curvelet with proposed quantizer for Textured image.

68 Table 3.3 PSNR Vs Compression ratio for various algorithms w.r.t. Textured image.
S.No
Compression ratio Wavelet With existing quantizer

PSNR in dB(Textured image)


Curvelet With existing quantizer Wavelet With proposed quanizer Curvelet With proposed quantizer

1 2 3 4 5 6 7 8 9 10

10 20 30 40 50 60 70 80 90 100

36.3286 24.7334 18.6201 17.0703 16.7099 16.2356 15.8320 14.8297 15.0079 15.0055

47.5429 36.7437 29.5067 26.1013 23.8076 22.0474 20.4351 19.4446 19.0361 18.8832

42.3524 36.4863 33.2099 31.0792 29.5831 28.2602 27.1896 26.2466 25.5093 24.8066

46.8256 40.5269 37.2481 35.0942 33.5292 32.3276 31.3970 30.6500 30.0262 29.4955

3.9 Conclusion

In

this

chapter

practical

implementations

of

proposed

compression method is focused, tested on various types of images and it is proved that curvelet with proposed compression algorithm

outperforms the existing techniques even at higher compression ratios.

Chapter 4

You might also like