• Aucun résultat trouvé

Discrete Wavelet Transformation

Dans le document Standard for (Page 167-171)

JPEG2000 Standard

6.5 IMAGE PREPROCESSING

6.6.1 Discrete Wavelet Transformation

The key difference between current JPEG [4] and JPEG2000 starts with the adoption of discrete wavelet transform (DWT) instead of the 8 x 8 block based discrete cosine transform (DCT). As we discussed earlier, the DWT essentially analyzes a tile (image) component to decompose it into a number of subbands at different levels of resolution. The two-dimensional DWT is performed by applying the one-dimensional DWT row-wise and then column- wise in each component as shown in Figure 4.4 in Chapter 4. In the first level of decomposition, four subbands LL1, HL1, LH1, and HH1 are created.

The low-pass subband (LL1) represents a 2:l subsampled in both vertical and horizonal directions, a low-resolution version of the original component. As explained in the theory of multiresolution analysis in Chapter 4, this is an approximation of the original image in subsampled form. The other subbands (HL1

,

LH1

,

HH1) represent a downsampled residual version (error because of coarser approximation) of the original image needed for the perfect recon- struction of the original image. The LL1 subband can again be analyzed to produce four subbands LL2, HL2, LH2, and HH2, and the higher level of decomposition can continue in a similar fashion. Typically, we don’t get much compression benefit after five levels of decomposition in natural images.

However, theoretically it can go even further. The maximum number of levels of decomposition allowed in Part 1 is 32. In Part 1 of the JPEG2000 stan- dard, only power of 2 dyadic decomposition in multiple levels of resolution is allowed.

In Chapter 4 we discussed the theoretical background of the DWT and its implementation using both a convolution approach as well as a lifting-based approach. The standard supports both the convolution and the lifting-based approach for DWT. We also discussed issues of VLSI implementations of the DWT for both convolution and lifting-based approaches in Chapter 5. For details of DWT and their VLSI implementations, the reader is referred to Chapters 4 and 5 respectively. In the rest of this section, we present the two default wavelet filter pairs supported by Part 1 of the JPEG2000 standard.

6.6.1.1 Discrete Wavelet Transforma tion for Lossy Compression For lossy com- pression, the default wavelet filter used in the JPEG2000 standard is the Daubechies (9, 7) biorthogonal spline filter. By (9, 7) we indicate that the analysis filter is formed by a 9-tap low-pass FIR filter and a 7-tap high-pass FIR filter. Both filters are symmetric. The analysis filter coefficients (for forward transformation) are as follows:

150 JPEG2000 STANDARD

0 9-tap low-pass filter: [h-4, h-3, h-2, h-1, ho, hl, h2, h3, h4]

hq = h-4 = +0.026748757410810 h3 = h-3 = -0.016864118442875 h2 = h-2 = -0.078223266528988 hi = h-1 = +0.266864118442872

ho = f0.602949018236358 7-tap high-pass filter: [9-3, 9-2, 9-1, go, 91, 92, 931

g3 = Q-3 = f0.0912717631142495 g2 = 9-2 = -0.057543526228500 91 = 9-1 = -0.591271763114247 go = +1.115087052456994

For the synthesis filter pair used for inverse transformation, the low-pass FIR filter has seven filter coefficients and the high-pass FIR filter has nine coefficients. The corresponding synthesis filter coefficients are as follows:

0 7-tap low-pass filter: [hi,, hL2, hLl, hb, h i , hh, h;]

hi = hL3 = -0.0912717631142495 hh = h/2 = -0.057543526228500 hi = h i l = +0.591271763114247

hb = f1.115087052456994 9-tap high-pass filter: [gL4, gL3, gL2, gL1, 91, g:, gk, gh, gi]

Q4

'

= g-4

'

- - t0.026748757410810 9; = gk3 = t0.016864118442875 gh = gL2 = -0.078223266528988

= gY1 = -0.266864118442872 gh = +0.602949018236358

For lifting implementation, the (9, 7) wavelet filter pair can be factorized into a sequence of primal and dual lifting as explained in Chapter 4. The detailed explanation on the principles of lifting factorization of the wavelet filters has been presented in Section 4.4.4 in Chapter 4. The most efficient factorization of the polyphase matrix for the (9, 7) filter is as follows [lo]:

where a = -1.586134342, b = -0.05298011854, c = 0.8829110762, d = -0.4435068522, K= 1.149604398.

COMPRESSION 151 6.6.1.2 Reversible Wavelet Transform for Lossless Compression For lossless compression, the default wavelet filter used in the JPEG2000 standard is the Le Gall (5, 3) spline filter [28]. Although this is the default filter for lossless transformation, it can be applied in lossy compression as well. However, experimentally it has been observed that the (9, 7) filter produces better visual quality and compression efficiency in lossy mode than the (5, 3) filter.

The analysis filter coefficients for the (5, 3) filter are as follows:

0 5-tap low-pass filter: [h-2, h-1, ho, hl, hz]

h2 = h-2 = -118 hi = h-1 = 114

ho = 314

0 3-tap high-pass filter: [ g - l , go, 911

91 = g - 1 = -112 go = 1

The corresponding synthesis filter coefficients are as follows:

0 3-tap low-pass filter: [h:,, hb, hi]

hi = hyl = 112 h& = 1

The effective lifting factorization of the polyphase matrix for the (5, 3) filter has been derived in Section 4.4.4 in Chapter 4. This is shown below for the sake of completeness:

6.6.1.3 Boundary Handling Like a convolution, filtering is applied to the input samples by multiplying the filter coefficients with the input samples and accumulating the results. Since these filters are not causal, they cause discontinuities at the tile boundaries and create visible artifacts at the im- age boundaries as well. This introduces the dilemma of what to do at the boundaries. In order to reduce discontinuities in tile boundaries or reduce

152 JPEG2000 STANDARD

artifacts at image boundaries, the input samples should be first extended periodically at both sides of the input boundaries before applying the one- dimensional filtering both during row-wise and column-wise computation. By symmetrical/mirror extension of the data around the boundaries, one is able to deal with the noncausal nature of the filters and avoid edge effects. The number of additional samples needed to extend the boundaries of the input data is dependent on filter length. The general idea of period extension of the finite-length signal boundaries is explained by the following two examples.

Example 1: Consider the finite-length input signal A

B

C

D

E F G H. For an FIR filter of odd length, the signal can be extended periodically as

F G H G F E D C B A B C D E F G H G F E D C B A B C . . . The two underlined sequences demonstrate the symmetry of extension with respect to the first sample ( A ) and the last sample

(H)

of the input signal as axis, and hence the boundary samples (A and H) are not included in the extension. The overlined sequence is the original input signal. This is called

“whole-sample” symmetric (WSS) extension. The (9, 7) and (5, 3) filter ker- nels in Part 1 of the standard are odd-length filters and the boundary handling is done using the whole-sample symmetric extension.

Example 2: For an FIR filter of even length, the signal can be extended periodically as

. F G H H G F E D C B A A B C D E F G H H G F E D C B A A B C

. . .

The two underlined sequences demonstrate the mirror symmetry of the input signal at both of the boundaries and the overlined sequence is the original input signal. This is called “half-sample” symmetric (HSS) extension, in which the boundary samples ( A and H) are also included in the extension because of the mirror symmetry. The even-length filters are allowed in the Part 2 extension of the standard and the boundary handling is accomplished by the half-sample symmetric extension.

6.6.2 Quantization

After the DWT, all the subbands are quantized in lossy compression mode in order to reduce the precision of the subbands to aid in achieving compression.

Quantization of DWT subbands is one of the main sources of information loss in the encoder. Coarser quantization results in more compression and hence in reducing the reconstruction fidelity of the image because of greater loss of information. Quantization is not performed in case of lossless encoding.

In Part 1 of the standard, the quantization is performed by uniform scalar quantization with dead-zone about the origin. In dead-zone scalar quantizer with step-size &,, the width of the dead-zone (i.e., the central quantization

COMPRESSION 153

bin around the origin) is 2Ab as shown in Figure 6.3. The standard supports separate quantization step sizes for each subband. The quantization step size

(A,)

for a subband (b) is calculated based on the dynamic range of the subband values. The formula of uniform scalar quantization with a dead-zone is

where yb(i,j) is a DWT coefficient in subband b and

&

is the quantization step size for the subband b. All the resulting qunantized DWT coefficients q b ( i , j ) are signed integers.

: -3 j -2 -1 j 0 1 1 2 i 3 1

Fig. 6.3 Dead-zone quantization about the origin.

All the computations up to the quantization step are carried out in two's complement form. After the quantization, the quantized DWT coefficients are converted into sign-magnitude represented prior to entropy coding because of the inherent characteristics of the entropy encoding process, which will be described in greater detail in Chapter 7.

Dans le document Standard for (Page 167-171)