The Discrete Quincunx Wavelet Packet Transform

This chapter aims to present an efficient compression algorithm based on quin-cunx wavelet packet transform that can be applied on any image of size 128 (cid:1) 128 or bigger. Therefore, a division process into sub-images of size 128 (cid:1) 128 was applied on three gray-scale image databases, then pass each sub-image through the wavelet transform and a bit-level encoder, to finally compress the sub-image with respect to a fixed bit rate. The quality of the reconstructed image is evaluated using several parameters at a given bit rate. In order to improve the quality in sense of the evaluation quality, an exhaustive search has led to the best packet decomposition base. Two versions of the proposed compression scheme were performed; the optimal version is able to decrease the effect of block boundary artifacts (caused by the image division process) by 27 : 70% considering a natural image. This optimal version of the compression scheme was compared with JPEG standard using the quality evaluation parameters and visual observation. As a result, the proposed compression scheme presents a competitive performance to JPEG standard; where the proposed scheme performs a peak signal to noise ratio of 0 : 88 dB over JPEG standard at a bit rate of 0 : 50 bpp for a satellite image.


Introduction
Wavelet is defined as a small wave that can be the base of all physical phenomena; which means that a time and/or space variation of a phenomenon is a sum of multiple wavelets. As examples, the wavelet transform was applied on an electrocardiogram (ECG) signal in order to extract the QRS complex [1] (time variation), on a video sequence in order to implement a hidden watermark [2] (time and space variation) and on a 2D image in order to reduce its size (compression) [3,4] (space variation). In this chapter, one considers the application of the wavelet on 2D image compression.
An image is one of the most important sources of information; it provides a visual comprehension of a phenomenon. The image can take several natures as medical, natural, textural or satellite image, each nature is characterized by a proper amount of details. For a digital image, the size in bytes is as bigger as the amount of details; this applies the use of image compression process.
In other words, if one considers a gray-scale image of size 512 Â 512, that means a bit rate of 8 bits per pixel (R c ¼ 8 bpp) and a file size of 512 Â 512 Â 8 bits (256 Kbytes). Compressing this image leads to reduce its file size (without changing the image size); for example, to reduce the file size by a factor of 10 (25.6 Kbytes), one have to consider a bit rate of R c ¼ 25:6Â1024Â8 Because of the conservation of all details in the image after decompression, the lossless 1 compression algorithms, as Run Length Coding (RLE), Lempel-Ziv-Welch (LZW) and Huffman [5,6], are by far the ideal methods. However, such a compression algorithms does not provide a significant reduction of image's file size, and therefore the lossy 2 compression algorithms may be more appropriate.
The most known lossy compression algorithm is the standard JPEG (Joint Photographic Experts Group) [7]; it is based, as lossy algorithm, on a discrete transform (Cosine Discrete Transform, DCT in this case). The Discrete Wavelet Transform (DWT) and Quincunx Wavelet transform (QWT) are two other discrete transforms that can be found in the literature [8,9]; they apply a progressive transformation on the image followed by an encoding process (like Embedded Zerotree Wavelet, EZW or Set Partitioning In Hierarchical Trees, SPIHT [10]) to give the image a bit-level representation.
This chapter aims to propose a QWT-based compression algorithm that can be applied on any image of size 128 Â 128 or bigger. Therefore, the following structure is adopted: In Section 2, the discrete wavelet transform is introduced and the progressive presentation of an image is exposed. Section 3 is dedicated to the quincunx wavelet transform, the QWT extension to wavelet packet (PQWT) and the encoding process employing SPIHT algorithm. The PQWT-based compression algorithm is presented in Section 4, and the results and discussions in Section 5.

Definition
As discrete sine and cosine, the DWT is used to represent a digital signal (as an image) with sum of projections over orthogonal functions; these functions are called "wavelet". Several wavelets are described in the literature; among them, one can find dyadic Daubechies family (represented with scaling and wavelet functions in Figure 1 for four examples [8]).
In order to improve JPEG compression performances (in sense of evaluation parameters presented in Section 4), the researchers have proposed the JPEG 2000 compression algorithm based on a wavelet called CDF 9/7 (Cohen-Daubechies-Feauveau 9-tap/7-tap) [11,12]. The scaling and wavelet functions, and decomposition and reconstruction low and high filters are shown in Figure 2.

Wavelet decomposition
As it is mentioned above, a wavelet applies a progressive transformation on the image. This process (called filter bank analysis) is realized by passing an image with coefficients a 0 k ½ , at time k, through a decomposition low filter h 0 , a decomposition high filter h 1 and a decimation function (↓2). As a result of level 1 decomposition, one obtain an approximation image of coefficients a 1 k ½ and a detail image of coefficients d 1 k ½ . The same process is applied, at level j, on the approximation 1 The term "lossless" refers to the conservation of all details in the image after reconstruction, which means that the original and reconstructed images are identical. 2 The term "lossy" refers to the loss of details in the image after reconstruction by quantification or truncation, which means that the original image differs from the reconstructed one. a jÀ1 k ½ to get an approximation a j k ½ and a detail d j k ½ . Figure 3 shows a wavelet 3-level decomposition.

Wavelet reconstruction
The reconstruction process (called filter bank synthesis) follows the inverse order of decomposition process, which means that, at level j and time k, an approximation a j k ½ and a detail d j k ½ are oversampled (↑2) and passed, respectively, through reconstruction low filter h 0 and reconstruction high filter h 1 to  generate an approximation image of coefficients a jÀ1 k ½ . Figure 4 shows a wavelet 3-level reconstruction.
A perfect reconstruction satisfies the following criteria: where, f is a normolised frequency, H i f ð Þ and H i f ð Þ (i ¼ 0, 1) are, respectively, the Fourier transform of impulse responses h i k ð Þ and h i k ð Þ.

Definition
The decomposition and reconstruction processes using QWT remain the same as DWT; however, there are some differences: • The diamond McClellan transform [13] is applied to map a 1-D design onto the quincunx structure.
• The decimation factor is ffiffi ffi 2 p for each direction.
The 2D quincunx refinement and wavelet filters are given respectively by: is the discrete Fourier transform parameter and λ is filter order. All simulations in this chapter were performed considering λ ¼ 5.
The QWT 6-level decomposition of image 'Lena' is given in Figure 6.

Quincunx wavelet packet transform
The Wavelet Packet Transform (WP) [14] consists on generalizing the decomposition over all parts of the decomposed images (approximations and details) considering the following condition: a detail image is decomposed if its entropy decreases after decomposition. The literature has shown that this technique is more efficient on textural images.  Employing the packet transform on QWT (PQWT) implies that only dyadic parts of QWT decomposition are concerned, which means that the analysis time decreases. Figure 7 shows the entropy-based PQWT 6-level decomposition of image 'Lena'.

Set partitioning in hierarchical trees encoder
In order to compress an image employing wavelet-based transform, an encoding step is used to give a bit-level representation to the image. This chapter employs the SPIHT encoder as bit-level representation encoder. Figure 8 summarizes the relationship between decomposition levels. The authors of [15] had proposed a modified version of SPIHT for the wavelet packet transform; this version is adopted for the PQW transform.

Compression scheme
The JPEG standard is based on dividing an image into sub-images of size 8 Â 8, then applying the DC transform on each image. In the proposed approach, one adopts 8-level PQWT as transform algorithm and a size of m 2 ¼ 128 Â 128 for the dividing process. An example of dividing process is given in Figure 9.
The proposed compression scheme is summarized in Figure 10. It consists on applying, on each image (I l , l ¼ 1, 2, … ) constituting the original image, the QW or PQW transform then the SPIHT algorithm with respect of a compression bit rate. The resulting bit streams are gathered to construct the compressed image.
In order to test the proposed compression algorithm, three gray-scale image databases were employed. The first database consists of 60 images (20 satellite images, 20 natural images and 20 medical images) of size 512 Â 512 [16], the second database consists of 114 textural images of size 512 Â 512 [17] and the third database consists of Shivang Patel 168 fingerprint images of size 256 Â 256. Each image from databases is divided into sub-images of size 128 Â 128 (16 sub-images in case of 512 Â 512 image and 4 sub-images in case of 256 Â 256 image).
Considering packet quincunx wavelet transform, one has tested the 260 possible 8-level decompositions (called decomposition bases) on the sub-images, in order to select the optimal packet decomposition base (in sense of evaluation parameters). The performance of PQWT is compared with QWT and entropy-based PQWT decomposition base (called proper base).

Reconstruction scheme
The proposed reconstruction scheme is shown in Figure 11. The compressed image is divided into bit streams according to the number of sub-images. Each bit stream is decoded and transformed using Inverse QW or Inverse PQW transform, to finally obtain the reconstructed sub-image I l , (l ¼ 1, 2, … ). All sub-images are then gathered to construct the reconstructed image.

Evaluation parameters of compressed image quality
Choosing a compression bit rate R c < 8 bpp for gray-level image, leads to a degradation on the original image. This degradation can be measured using the evaluation parameters of compressed image quality. In this chapter, three evaluation parameters are adopted [10]: • Peak Signal to Noise Ratio: the PSNR parameter is given by the Mean Square Error, I is the original image,Î is the reconstructed image and R designates the resolution of a gray-scale image.
• Mean Structural SIMilarity index: the MSSIM index is the average over all local windows of the product of three functions as follow where, l, c and s are the luminance, contrast and structure comparison functions.
• Visual Information Fidelity: the VIF parameter is a ratio of conditional mutual information measured over all decomposition parts of the image.

Results and discussion
The main purpose of this study is to establish a compression strategy using packet quincunx wavelet transform, whatever the type or the size of an image. Therefore, one has begun with applying on the 20 satellite images an exhaustive search among the 260 PQWT decomposition bases. To evaluate the compression quality employing PQWT (for a given bit rate), the relative errors (ε PSNR , ε VIF and ε MSSIM ) are used to distinguish between the different performance curves. These parameters are expressed as follow: where, X designates an evaluation parameter (PSNR, VIF or MSSIM) and m X is the average of X over all database images. For a negative value of ε X , the PQWT outperforms the QWT. Figure 12 illustrates the best 17 decomposition bases that achieve minimum values of ε X . Base 0 refers to QWT decomposition.
The second step consists on applying these 17 decomposition bases on the other databases, and then evaluates the compressed images quality using the relative errors given in Eq. (5). Table 1 shows for each database, the top 10 decomposition bases; and in green the five common decomposition bases between all databases.
The evaluation curves in sense of relative error are shown in Figure 13.   Table 1.

Top 10 decomposition bases of each database
Considering the performance curves of fingerprint images (Figure 13.e), negative values of relative errors are observed at low bit rate region; which means that the chosen decomposition bases achieve better performance than base 0 (QWT).
Regarding the five common decomposition bases (marked in green in Table 1), the curves of Figure 13 show that the decomposition base 3 achieves slightly better performance; therefore, in the rest of the chapter, one adopts this decomposition base.
In order to illustrate the compression effect on the database images, one has chosen from each database the image that satisfies the minimum ε PSNR . The chosen images are given in Figure 14.

The evaluation curves vs. bit rate in sense of relative error. (a) Satellite images, (b) natural images, (c) medical images, (d) textural images, (e) fingerprint images
In Table 2, it is given the performance in sense of peak SNR of the five adopted images, for two values of bit rate (0:25 and 2:00 bpp). These results show a tiny superiority of decomposition base 3 in comparison with base 0 and the proper decomposition; except for the medical image, where a difference of 9:35 dB is observed between base 3 and base 0 at a bit rate of 2:00 bpp.
As observed in JPEG compression scheme, the image division into sub-images causes block boundary artifacts; these artifacts are visible at low bit rates values. This phenomenon is clearer for natural, medical and fingerprint image at a bit rate of 0:25 bpp.
To remedy to the problem of block boundary artifacts, one propose to add two processes to the compression scheme (as shown in Figure 15): • The two sub-images I 1 and I 2 overlap and have d common pixels (an example of image division with overlapping is given in Figure 16), • Each sub-image is weighted by a 2D Gaussian window defined by the subimage size m and the minimum amplitude a (as shown in Figure 17).
To avoid the pixel redundancy causes by the overlapping, the pixel may have ½ value in case of two overlapped sub-image, and ¼ value in case of four overlapped sub-images. Therefore, as summarized in Figure 18, the total size M of a sub-image may be expressed as follow: • In case of two overlaps, the size of the sub-image equals • In case of three overlaps, the size of the sub-image equals  • In case of four overlaps, the size of the sub-image equals These new sub-image sizes permit to define a bit rate for each sub-image according to the number of overlaps. In other words, the bit rate of an overlapped sub-image equals: where, R c denotes the bit rate without overlapping and F r ¼ M m 2 is called the reduction factor of bit rate. The bit rate of the overall image is the average over sub-images bit rates.
In order to demonstrate the effect of the overlapping pixels (d) on bit rates, one has plotted in Figure 19 the reduction factor curves for m ¼ 128. It is clear from these curves that a higher order of reduction factor leads to lower compression performance; therefore, a reduction factor threshold of 0:9 has to be respected. The proposed reconstruction scheme, given in Figure 20, divides the output of the inverse QWT or the inverse PQWT by the same 2D Gaussian windows define in the compression process. The reconstructed sub-images are overlapped with the same manner as the compression process, to construct the reconstructed image.
The evaluation curves in sense of PSNR and VIF parameters are shown in

15
The Discrete Quincunx Wavelet Packet Transform DOI: http://dx.doi.org /10.5772/intechopen.94970 • in case of satellite and fingerprint images (Figure 21.a and Figure 21.e), the proposed PQWT compression scheme presents better performance than JPEG, • in case of natural and textural images (Figure 21.b and Figure 21.d), JPEG standard outperforms the proposed compression scheme, • in case of medical image (Figure 21.c), both schemes present slightly the same performance.
In Table 3, it is given the performance in sense of PSNR and VIF parameters of the five adopted images, at a bit rate of 0:54 bpp for textural image and 0:50 bpp for  the others. To compare the performance of the proposed scheme (PQWT with a and d parameters), two other schemes are involved: the PQWT with a ¼ 1 and d ¼ 0 (referring to the first proposed scheme) and JPEG standard.
To fix a and d parameters of PQWTbase 3 and PQWTproper decomposition, an exhaustive search (with respect of the reduction factor threshold) has been performed to get the maximal value of PSNR parameter. It can be observed in Table 3 that the a and d parameters differ from an image to another; therefore, these parameters have to be included in the compressed file, as well as the size of the overall image.
The obtained results show a tiny superiority of PQWTbase 3 in comparison with JPEG and PQWTproper decomposition; except for natural and medical images, where the JPEG standard is slightly better. Figure 22 compares the visual side of the five adopted compressed images, where details of size 128 Â 128 from original, PQWTbase 3 and JPEG images are magnified. From these figures, it can be observed that PQWT compressed images present lower block boundary artifacts effect in comparison with JPEG images (especially for satellite and textural images), and preserve the continuity of their detail shapes.     Table 3.
Performance in sense of PSNR and VIF parameters of the five adopted images column around these regions are extracted in order to measure the effect of block boundary artifacts in sense of PSNR. By denoting PSNR 1 and PSNR 2 the measured PSNRs of the extracted regions employing, respectively, the first and second proposed schemes, the average block boundary artifacts effect is measured by where, R values of the bit rate (R c ) from 0:1 bpp up to 8:1 bpp are employed to evaluate the PSNRs.
In Table 4, the values of E bba are given for the five adopted images. From these results, it can be concluded that, in comparison with the first compression scheme, the second proposed compression scheme presents a significant reduction of 27.70% and 22.87% of the effect of block boundary artifacts for, respectively, natural and medical images. However, a tiny reduction of E bba for fingerprint image is observed, which means that further processing on sub-images boundaries is necessary for such an image using local 2D filters [18].

Conclusion
This chapter introduces an image compression scheme that employs quincunx wavelet decomposition improved by wavelet packet. This process permits to focus on both approximation and detail parts of the image decomposition.
Using the concept of image division into sub-images (employed in JPEG standard compression algorithm), the effect of block boundary artifacts has occurred especially at low range of compression bit rates. To overcome this problem, the subimages are weighted by a 2D Gaussian window and overlapped with respect to the reduction factor of compression bit rate. This means that, in addition of the overall image size, two parameters have to be included in the compressed file: the minimum amplitude of 2D window and the number of overlapped pixels.
To present the proposed compression algorithm as a standard, its performances were compared, in sense of evaluation parameters, to those of JPEG standard. The main improvement was seen in the capacity of the proposed scheme to provide better image visual quality (detail shapes continuity). This means that, in the first hand, it can be possible to reduce the image file sizes without reducing the image visual quality, and increase the storage capacity in photographic devices in the other hand.
As a result, this compression technique permits to create benchmarks and databases with low capacity whatever its nature (satellite, medical, natural or textural image).
In this work, one have focused on gray-scale images in order to present the proposed compression scheme. It is necessary, in future works, to investigate its efficiency on video and color images compression.

Conflict of interest
The author declare that there is no conflict of interest.

Author details
Abdesselam Bassou Information processing and telecommunication laboratory (LTIT), University of Tahri Mohammed Bechar, Algeria *Address all correspondence to: bassou.abdesselam@univ-bechar.dz © 2020 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.