An Edge-Sensing Predictor in Wavelet Lifting Structures for Lossless Image Coding

The introduction of lifting implementations for image wavelet decomposition generated possibilities of several applications and several adaptive decomposition variations. The prediction step of a lifting stage constitutes the interesting part of the decomposition since it aims to reduce the energy of one of the decomposition bands by making predictions using the other decomposition band. In that aspect, more successful predictions yield better e ﬃ ciency in terms of reduced energy in the lower band. In this work, we present a prediction ﬁlter whose prediction domain pixels are selected adaptively according to the local edge characteristics of the image. By judicuously selecting the prediction domain from pixels that are expected to have closer relation to the estimated pixel, the prediction error signal energy is reduced. In order to keep the adaptation rule symmetric for the encoder and the decoder sides, lossless compression applications are examined. Experimental results show that the proposed algorithm provides good compression results. Furthermore, the edge calculation is computationally inexpensive and comparable to the famous Daubechies 5/3 lifting implementation.


INTRODUCTION
In [1], it has been shown that any DWT filter bank can be decomposed into series of lifting/dual-lifting steps. The work of [2] extends the idea of linear filters in the lifting style to nonlinear filters. In [3][4][5], the lifting prediction filter was made adaptive according to the local signal properties, and in [6], the importance of coder-nonlinear transform strategy was emphasized. The idea of lifting adaptation was also applied to video processing [7,8]. Finally, in [9][10][11], 2D extensions of the lifting structures were examined, which fundamentally resembles the idea of this work.
Many successful wavelets have efficient lifting implementations. However, the lifting implementation of Daubechies 5/3 wavelet has attracted a wide range of interest in various applications due to its rational filter tap coefficients which are particularly useful in real-time implementations. The lifting implementation of this wavelet contains filters with coefficients that can be written as dyadic rationals of two leading to a multiplication free realization of the filter bank [1,12]. As a result, this implementation was adopted by the JPEG2000 standard in its lossless mode [13,14]. Although many linear, nonlinear, or adaptive decompositions are reported to outperform this wavelet for certain cases, the simplicity and intuitive lifting implementation causes the Daubechies 5/3 wavelet to keep its importance [2-4, 6, 9].
The subband filter coefficients of the 5/3 wavelet are h 0 = [−1/8, 1/4, 3/4, 1/4, −1 /8] and h 1 = [−1/2, 1, −1/2]. Its lifting implementation is very efficient and can be realized using binary shifting operations due to coefficients with dyadic rationals of 2 as follows: as illustrated in Figure 1. Notice that prediction filter is very short, consisting of an averaging operation performed over the left and right neighboring samples in a row (or column) 2 EURASIP Journal on Image and Video Processing in two-dimensional image processing. Since the left and right neighbors of a pixel are naturally closely related to the center pixel, the average of these neighbors constitutes a good estimation for the estimated pixel. Although this implementation is mostly used for image decomposition, it is purely one dimensional. In other words, the image is processed line by line during implementation. Therefore, a two-dimensional separable implementation is performed where the image is first processed horizontally (or vertically) and then processed vertically (or horizontally) to obtain four subband decomposition images. Without any loss of generality, we will consider horizontal processing of the image around a pixel x[m, 2n]. Clearly, the vertical process would consist in applying the same operation over the transpose of the first pass. Since the right and left neighbor pixel values are naturally related with the pixel value between them, x 0 [m, 2n] = (x[m, 2n − 1] + x[m, 2n + 1])/2 will be an accurate estimate of x[m, 2n]. Hence, by subtracting this prediction value from the true value of x[m, 2n], a small residue is obtained. This residual signal automatically corresponds to the detail signal obtained after the single-stage Daubechies 5/3 wavelet transformation. We will assume that x[m, 2n − k] for odd k belongs to polyphase 1 which constitutes the domain pixels for the estimation, and x[m, 2n − l] for even l belongs to polyphase 2 which constitutes the pixels to be estimated.
The idea of this paper comes from the fact that, the center pixel, x[m, 2n], is not only related with the left and right pixels, that is, x[m, 2n − 1] and x[m, 2n + 1], but also with many other near-by pixels within the domain of the polyphase 1. Clearly, the closest such pixels are x[m, , and x[m + 1, 2n + 1], which are within the 8-connected neighborhood of x[m, 2n]. Consequently, there are other predictions than x 0 [m, 2n] which may utilize the many other directionally related pixels including the above list of neighbors. Several orientation adaptive decomposition systems were proposed in the literature [15][16][17][18][19][20][21][22]. Among them, some were assuming knowledge of the quantization noise at the encoder [2], some were obtaining rather limited adaptation gain [3,10], and more frequently, some were signaling a side information related to the orientation of the decomposition wavelet to the decoder side selected for a group of encoded pixels [16-18, 21, 22]. The later method of selecting the decomposition direction for a cluster of pixels enables safe lossy compression at the compromise of sending side information, and not being able to select the decomposition direction for each pixel, separately. In this paper, we will describe a method to efficiently select prediction domain pixels from polyphase 1 that does not necessarily correspond to 1D processing. The method is based on the decomposition described in [20], however, by applying the decomposition in a lossless coder, the safety of codec asymmetry and possible divergence at coarser quantization levels are avoided. In other words, the decomposition in [3] is utilized in a more appropriate coder application. It is illustrated that the proposed edge-adapted decomposition method yields better estimation results with reduced prediction error energy, yielding to better lossless compression.

AN EDGE-SENSING ADAPTIVE PREDICTOR
The edge-adapted predictor constitutes the core of the contribution, and the main reason of obtaining better compression results. Consider a portion of an image which will be decomposed horizontally as in Figure 2. In this figure, the pixel to be estimated is the center pixel, denoted by x[m, 2n]. The dashed pixels along the columns to the right and to the left of x[m, 2n] belong to polyphase 1. From the analysis in Section 1, for horizontal decomposition, the prediction domain must only include pixels from polyphase 1.
To proceed with the selection of prediction domain pixels, we first define four gradient approximations around x[m, 2n] along angles of 135, 0, 45, and 90 degrees with the horizontal axis as follows: It is possible to extend the gradient approximations using pixels beyond the eight neighbors, however that spoils the low computational complexity property and the prediction filter structure without yielding any visible compression gain. In the next step, we define four possible prediction values for x[m, 2n] using its eight neighbors: Obviously, Δ 90 and x 90 cannot be used for prediction in horizontal decomposition since they do not belong to polyphase 1. Conversely, Δ 0 and x 0 cannot be used for prediction in vertical decomposition due to the same reason. In either decomposition direction, only three gradient directions are possible. As a notation, we will use h 0 as the lowpass analysis filter and h 1 as the highpass analysis filter in a subband decomposition structure. Consequently, for a 1D input signal x[n], y 0 [n] and y 1 [n] correspond to the approximation and detail signals generated at the output of the decomposition. In order to distinguish between the directional delay elements in 2D processing, we will use z −1 h and z −1 v as the horizontal and vertical delay elements. Our edge adaptive predictor is obtained by relaxing the condition that the predictor should be in the form In the example shown in Figure 2, the largest gradient is in the south-east direction. As a result, Δ 45 is the minimum difference. Therefore, the value of x[m, 2n] must be predicted as x 45 [m, 2n]. It must be noted that such a tilted prediction (P(z)) does not require transmission of any side information, because the pixels used in prediction and the pixel to be predicted belong to different polyphase components. The overall scheme makes possible a symmetric decoding process of Figure 1. In case of no quantization, these columns are automatically reconstructed and the decoder uses the same directional choice method that was used in encoder.
This rule gives a good approximation of a possibly missing color sensor output, so it improves both the variance of the prediction error spaces which correspond to decomposition images. The above rule was inspired from a work describing CCD imaging systems and missing the pixel value interpolation in color filter arrays (CFAs) [23]. The CFA interpolator in [23] estimates the missing pixel x[m, 2n] using its immediate 4-neighbors according to the selection of minimum of Δ 0 and Δ 90 . This algorithm gives the impression that the intermediate pixels along smooth transition angles are better related to the neighboring pixels along that direction.
The proposed analysis filterbank can be implemented without any multiplication due to having scales of dyadic rationals of 2. Furthermore, the lifting filter structure solely depends on the domain pixels so transmission of side information is not necessary in case of lossless transmission. Due to its locally adaptive nature, this work may be categorized in a class of works reported in [5,7,8,10,11,[15][16][17][18][19][20][21][22]. It was also reported in [10] that such multiline lifting realizations can be performed in a memory-efficient manner.

UPDATE AND STABILITY ISSUES
The edge sensitive prediction described above requires careful adjustment of the update filter which is necessary for multiple-level decomposition with anti-aliased low-low subimages. To emphasize the unavailability of an update filter which comes after the prediction stage in our case, we will start by analyzing the regular lifting stage consisting of a prediction followed by update stages. In one-dimensional singleline processing, the regular lifting implementation which relates the subsignals y 0 [n] and y 1 In case of Daubechies 5/3 wavelet, the polyphase transform matrix becomes This matrix provides the coefficient information to generate the analysis filters in a filter bank structure and H i (z) = H i,ev (z 2 ) + z −1 H i,odd (z 2 ), for i = 0, 1. Naturally, the 2D processing is obtained by performing the 1D lifting horizontally and vertically. For the analysis of the edge-adapted prediction filter and its polyphase transform, multiline processing is necessary and the delay elements z −1 v and z −1 h must be used simultaneously. For example, for the 45 • prediction direction, the polyphase transform matrix becomes The lowpass and highpass filters of the filter bank corresponding to the matrix in (5) are directional 2D filters in the spatial domain. When this matrix is multiplied by the, say, horizontal update matrix, the prediction domain stays the same: [ −P(z) 1 ], however, the update domain is completely messed with horizontal and vertical samples. This can be interpreted as a sample leakage from upper and lower rows. As a result, it is apparent that an update following the edgeadapted prediction is not possible for obtaining anti-aliased approximation samples. This problem can be solved by changing the order of the update U(z) and the prediction P(z) stages of Figure 1. With the proper choice of the lowpass filter, the new U(z) can be performed prior to the prediction, and its implementation still requires no multiplications, so the computational efficiency is retained. In this way, high-quality low-low images can be obtained.
It was observed that a halfband lowpass filter can be put into an isolated update lifting stage as in [3]. In order to achieve a multiplierless structure, we consider the simple length-3 Lagrangian halfband lowpass filter h l3 = {1/4, 1/2, 1/4}. The z-transform of this filter is where U(z) = (1/2)z −1 + 1/2. This lowpass filter followed by downsampling can be implemented in a lifting structure due to the relation known as noble identity. The resulting structure is shown in Figure 3. Since U(z) is a very simple update filter consisting of dyadic rationals of 2, it can be implemented using bitwise shift operations. The overall proposed lifting structure is illustrated in Figure 4. In this figure, horizontal processing is assumed and P(z) contains an edgeadapted prediction including a multidirectional delay vector defined as z = [ zv zh ] T . The overall structure including the lowpass filter is still computationally comparable to the original implementation of the Daubechies 5/3 wavelet in terms of calculations per lifting operation.

EXPERIMENTAL RESULTS
The practical application for the proposed decomposition scheme was selected as image compression. It can be noted that symmetric reconstruction of the update part is possible with or without the quantization, however, synthesis of the prediction part is problematic once the domain pixels (approximation signal) get quantized. There is a possibility that the prediction rules in the encoder and the decoder may vary with quantized coefficients which may spoil the reconstruction beyond the quantization level due to the nonlinearity. As a result, lossless compression is applied and the results are presented. In [20], it is reported that the algorithm combined with zerotree-type coders are fairly robust to avoid the described divergence at relatively high bitrates for lossy compression. However, complete safety to avoid divergence is only possible with lossless compression as indicated in this paper.
Before presenting the direct experimental compression results, it is beneficial to analyze the effect of the edgeadapted prediction in the reduction of signal energy in decomposition images. As an example, it was experimentally observed that the possibility of the horizontal process ( , and x 45 [m, 2n] is 30.1%. This value is slightly less than about one thirds of the possible predictions. As a result, persistently using horizontal prediction loses chances of making better prediction decisions. On the other hand, our directionally sensitive prediction decision rule catches about 52% of the best predictions as described above. This improvement also reflects to practical compression results. In Figures 5 and 6, (a) the original 5/3 wavelet decomposition, and (b) directionally modified prediction lifting decomposition images of two test images are shown, respectively. Visually, the detail images obtained by the directionally adaptive 5/3 wavelet exhibit less signal energy at several decomposition levels in general. For the example in Figure 6, the highpass coefficients in part (a) have a variance = 94.06, and a sample entropy = 3.4536, whereas the highpass coefficients in part (b) have variance = 30.57, and sample entropy = 3.4412. Similar results are observed in other test images as well. This energy reduction indicates that better compression results can be obtained using our method, as compared to the 5/3 wavelet in high-band subimages.
The following compression results are based on the image wavelet tree bitplane coding, similar to the one that is used in JPEG2000 [13]. No particular interest was given to the optimization of the encoder. Instead, the results are presented comparing the Daubechies 9/7 and Daubechies 5/3 wavelet performances with the method described here using  the same lossless coder. The coder uses the integer-to-integer versions of the classical filters to achieve lossless coding. Since it was observed that transform entropy and variance are lower for each of the test images, similar compression results are expected with other lossless wavelet coders as well. A decomposition level of 4 was selected for 8-bit gray-scale images with size 512×512. The bitrate values in terms of bits per pixel (bpp) for a set of test images shown in Table 1 are generated using Daubechies 9/7 wavelet, Daubechies 5/3 wavelet, and our directionally adaptive method using the halfband anti-aliasing update filter. In general, smaller bitrates are obtained.
In spite of the edge adaptation of the prediction, the overall proposed method gives only marginally better or similar 6 EURASIP Journal on Image and Video Processing compression values as compared to the 5/3 wavelet. The reason for this situation is supposed to be due to the lowpass filtering prior to the prediction. This update filter naturally reduces some amount of signal information in the upper polyphase component that should be useful in the prediction. It was observed that a combination of the given lowpass update filter followed by the 1D prediction filter (as used in the 5/3 wavelet) gives worse compression results than the original 5/3 wavelet. It can, therefore, be concluded that by incorporating the 2D edge adaptations, the compression results improve to rates that are better than or comparable with the 5/3 wavelet. It may be argued that the lowpass update part could be completely eliminated. However, the use of that update for the upper polyphase is essential to obtain antialiased low-low subimages. Without the anti-aliased low-low subimages, further decomposition of the images to levels more than 1 becomes useless. As a result, the update-first strategy is adopted.
As a final analysis, the computational complexity of the proposed adaptive filterbank is investiaged. It can be seen that the computational complexity is close to the Daubechies 5/3 lifting implementation, hence very low. Our directionally adaptive lifting strategy contains an additional (1) three difference operations to obtain Δ 135 , Δ 0 , and Δ 45 , and (2) three comparison operations to choose the minimum of Δ 135 , Δ 0 , and Δ 45 compared to Daubechies 5/3 wavelet decomposition. The rest of the operations, including the anti-aliasing filtering have identical complexity figures as the original 5/3 lifting implementation. The above operations can be summarized as an additional complexity of 6 subtractions per lifting (including prediction and update) operation. For an N × N image, there are approximately N 2 lifting operations, so the additional computational cost is 6N 2 subtractions. There is neither any integer nor floating-point multiplications in the new structure. As a result, our directionally adaptive algorithm keeps the low complexity property of the 5/3 Daubechies wavelet decomposition, and provides slightly better image compression results in images containing sharp edges and artificial characters and drawings.

CONCLUSIONS
In this paper, a novel prediction filter that directionally adapts its domain according to the local edge characteristics and its application to lossless image coding are presented. The proposed edge adaptive structure is inserted inside a lifting stage that resembles the lifting implementation of Daubechies 5/3 wavelet. Unlike other orientation adaptive systems that utilize the same gradient direction to a cluster of pixels in an image, the proposed system applies individual gradient selection for each pixel in the image. In order to avoid transmission of gradient information for each pixel, the symmetry between the encoder and decoder is assured by the application of a lossless coder. The proposed decomposition algorithm is computationally efficient and it avoids multiplications. It was observed that the prediction of the lower polyphase branch in a lifting stage using edge adaptation produces lower energy highpass coefficients. The new structure uses the same polyphase domains as used by classical lifting implementations therefore no side information is needed for reconstruction. The reduced decomposition energy reflects to real life compression results using wavelet tree-based coders in lossless mode.