A lossless image compression algorithm using wavelets and fractional Fourier transform
 153 Downloads
Abstract
The necessity of data transfer at a high speed, in fastgrowing information technology, depends on compression algorithms. Maintaining quality of data reconstructed at high compression rate is a very difficult part of the data compression technique. In this paper, a new lossless image compression algorithm is proposed, which uses both wavelet and fractional transforms for image compression. Even though wavelets are the best choice for feature extraction from the source image at different frequency resolutions, the lowfrequency subbands of wavelet decomposition are the untouched part in compression method in most of the existing methods. On the other hand, fractional Fourier transform is a convenient form of generalized Fourier transform that helps in the compact lossless coding of the source image with optimal fractional orders. Hence, we have used discrete fractional Fourier transform to compress those sensitive subbands of the wavelet transform, carefully. In this method, an image is split into low and highfrequency subbands by using Daubechies wavelet filter and level 1 quantization is applied for both lowfrequency and highfrequency subbands. The lowfrequency subbands are compressed by using fractional Fourier transform with optimal fractional orders, and at the same time, highfrequency subbands are compressed by eliminating zeroes and storing only nonzero blocks and its position. The compressed wavelet coefficients are further compressed by the application of level 2 quantization and stored as a reduced array. This reduced array is encoded by using arithmetic encoder followed by runlength coding. The experimental results of the proposed algorithm with a different set of test images are compared with some of the existing image compression algorithms. The results show that the proposed method has significant improvement in image reconstruction quality.
Keywords
Discrete wavelet transform (DWT) Onedimensional discrete fractional Fourier transform (DFrFT) Image compression Quantization Subbands1 Introduction
The image compression technology in the past decade has revolutionized the field of data communication. Today’s highdefinition photograph accessing/editing, live video display and multimedia messaging are easy and instantaneous because of compression techniques [1, 2]. The compression technique helps in representing the source image with a reduced number of bits. Time–frequencybased compression algorithms have the property of multiscale characterization, which gives high quality of image reconstruction [3, 4, 5]. Popular compression algorithm JPEG 2000 [6] uses discrete wavelet transform that splits the image into a small number of tiles. The wavelet transform is applied to each tile individually to enhance the quality of the reconstructed image. However, the increase in the number of tiles leads to aliasing effect [7, 8], which is a limitation of this technique. However, discrete fractional Fourier transform (DFrFT) is a simple coding technique which elucidates the characteristics of signals, gradually by changing them from a time domain to the frequency domain with an order from 0 to 1. The fractional part in DFrFT provides the extra degree of freedom in computations of coefficients and also assists in a compact coding of information with the reduced number of discrete Fourier transform (DFT) coefficients [9]. Several compression algorithms [10, 11, 12] use wavelets, and a lossless image compression algorithm [13] uses a combination of wavelet transform and singular value decomposition to yield highresolution image reconstruction quality. A combination of wavelet with a discrete cosine transform (DCT) [14] shows an increase in compression performance with a large computational time.
This paper is structured as follows: Sect. 2 explains the use of wavelet transform and DFrFT in image compression. Section 3 presents a proposed lossless image compression algorithm. The simulated results and analysis are discussed in Sect. 4, followed by the conclusion in Sect. 5.
2 Use of discrete wavelet transform and discrete fractional Fourier transform
2.1 Discrete wavelet transform
In wavelet decomposition, for each level of decomposition, wavelet coefficients are decimated by a factor two, which helps in achieving good compression ratio. In wavelet decomposition, lowfrequency wavelet coefficients are distributed towards top left corner and highfrequency detailed coefficients are distributed towards the bottom right corner as shown in Fig. 1b. As decomposition level increases, the detailed coefficients are enriched by less significant wavelet coefficients for the reconstruction process, and hence, by neglecting the very first level of detailed coefficients may produce the highest compression percentage [17]. Daubechies (Db) mother wavelet is the most widely used wavelet in an image compression application, as is orthogonal wavelets of compact support. The Db wavelets used overlapping window function, and hence, the decomposed wavelet coefficients imitate all variations between pixel intensities, which are helpful in the coding of significant coefficients for image compression. The Daubechies 5 (Db5) mother wavelet, which is used in this work, has five wavelet and scaling coefficients [18].
2.2 Onedimensional discrete fractional Fourier transform
Eigenvalues multiplicity of DFT matrix to get DFrFT kernel matrix
N  1  − j  − 1  J 
4m  m + 1  M  M  m − 1 
4m + 1  m + 1  M  M  M 
4m + 2  m + 1  M  m + 1  M 
4m + 3  m + 1  m + 1  m + 1  M 
As shown in Table 1, DFrFT is computed for each column of LL subbands which have an order ranging from 0.1 to 0.4. The processed matrix is stored as a single array along with its positions.
3 The proposed lossless compression algorithm

Step 1 First, calculate the size of a test image and apply the twodimensional discrete wavelet transform for decomposition (mother wavelet Daubechies of scale 5). The source image is split into LL and nonLL subbands.
 Step 2 Apply level 1 quantization for decomposed subbands to increase the correlation. For level 1 quantization, the factor ‘M1’ is to be calculated by using Eq. (4). It is the product of defined quantization scale*(0.01 for LL and 0.1 for nonLL subbands) and the median value of the quantized subband ‘S’ (either LL or nonLL subbands).$$M1 = {\text{Quantization}}\_{\text{Scale}} \times {\text{median}}\;(S)$$(4)New quantized subband ‘Sub_band_q1’ is obtained by dividing the decomposed subbands ‘S’ with the factor ‘M1’$$Sub\_band\_q1 = {\text{round}}(S/M1)$$(5)
*Quantization scale 0.01 means computing 1% from median value in LL subband to be divided by all values of LL subband. Quantization scale for nonLL subband is taken largely because these subbands are less significant and need coarse quantization.
 Step 3 Coding of LL subband Onedimensional DFrFT with the optimal fractional order (\(\alpha_{\text{opt}}\)) is applied to each column of level 1 quantized LL subband. After DFrFT compression, coefficients are arranged in twodimensional arrays (Fig. 3).Further, level 2 quantization is applied for the transformed matrix to divide them by ‘M2’ using Eq. 6 and to store the values in a reduced array of size of LL subband,where ‘m’ and ‘n’ are the row and column index of compressed DFrFT matrix (4 × 4) and ‘R’ is the quantization scale defined during level 1 quantization.$$M2(m,n) = \left\{ {\begin{array}{*{20}l} {1,} \hfill & {{\text{if}}\;(m = 1,n = 1)} \hfill \\ {m + n + R,} \hfill & {{\text{if}}\;(m \ne 1,n \ne 1)} \hfill \\ \end{array} } \right.$$(6)

Step 4 Coding of nonLL subband Level 1 quantized nonLL subbands are partitioned into nonoverlapped blocks of standard size (\(4 \times 4,8 \times 8\), etc.). Create a window of standard size (4 × 4), sliding from left to right and up to an end of the subband. If nonzero value is found in the block, it will be stored along with its position. Blocks with zeros are neglected and are not stored. Apply the quantization level 2 for nonzero blocks and then store them as a reduced array.
In Fig. 4, a window of size 4X4 is used to find the nonzero block and is found at position 2. Here, the block values along with position are stored. 
Step 5 All reduced arrays are encoded by an arithmetic encoder into a compressed bitstream, since reduced array contains both positive and negative values and is encoded by the arithmetic encoder. This encoding scheme also adopts runlength encoder (RLE) to kill repeatedly occurring encoding values.

Step 6 The decompression process is the reverse of the compression process, where reduced arrays are decoded by the arithmetic decoder. The LL subbands recovered by inverse DFrFT with fractional order \((  \alpha_{\text{opt}} )\) and by multiplying level 2 quantization factor M2. Similarly, nonLL subbands recovered to their original position, and remaining blocks are padded by zero. Again multiply the quantization factor M1 for each nonLL subband and apply an inverse discrete wavelet transform to reconstruct the original image.
4 Results and discussion
 1.
Selection of suitable mother wavelet This algorithm uses ‘Daubechies’ tap5 (DB5) mother wavelet filters for decomposition process. It has five vanishing moments, which are enough to kill the insignificant wavelet coefficients by using the set of quadrature mirror filters.
 2.
Optimization of fractional orders This algorithm uses onedimensional DFrFT kernel with optimal fractional order to compress LL subband. The wavelet coefficients in LL subbands are highly correlated and need specific fractional orders for compression. Thus, fractional orders are manually calculated and select the one specific value where maximum CP is obtained. For the purpose of discussion, we use LL subbands of ‘peppers’, ‘Barbara’ and ‘aerial’ images for computation of optimal fractional orders.
From Fig. 5, it is observed that the CP of three images is not so linear with respect to fractional orders and it is saturated above 0.77 up to 0.99. (*highlighted in block box in Fig. 5 has maximum CP.) Hence, this range is used as an optimum fractional order throughout this compression process. For each test image, this procedure is repeatedly performed with suitable (α_{opt}) values and overall compression performance is analysed. The quantization scale used in this algorithm (fixed 0.01 and 0.1 for LL and nonLL subbands) will not affect information as it can be reconstructed during decoder stage and leads to a reconstruction of the approximate original image.
PRD and PSNR calculation of the proposed method at different compression percentages for Barbara image
Compression percentage  \(\alpha_{\text{opt}}\)  PRD  PSNR 

50  0.94  9.52  28.24 
55  0.89  9.65  27.24 
60  0.96  10.04  26.03 
65  0.92  10.14  25.94 
70  0.98  10.28  25.77 
75  0.96  10.36  25.73 
80  0.92  10.44  25.70 
85  0.97  10.59  25.62 
90  0.98  10.62  25.24 
PRD and PSNR comparison of the proposed method with DWTDFrST and DWTDFrCT
Test image (size)  CP  DWTDFrST  DWTDFrCT  JAC  DWTDFrFT  

\(\alpha_{\text{opt}}\)  PRD  PSNR  \(\alpha_{\text{opt}}\)  PRD  PSNR  PSNR  \(\alpha_{\text{opt}}\)  PRD  PSNR  
Airplane (258 KB)  80  0.90  4.12  29.95  0.88  3.47  31.4  32.63  0.85  2.70  33.5 
House (196 KB)  80  0.98  5.08  31.04  0.98  4.84  31.1  31.74  0.94  4.20  32.2 
Boat (257 KB)  80  0.97  5.58  30.41  0.92  5.88  32.4  32.56  0.86  5.69  30.0 
Aerial (298 KB)  80  0.96  8.76  25.65  0.90  8.42  26.9  26.6  0.90  7.92  26.7 
Peppers (257 KB)  80  0.99  10.12  26.47  0.97  9.82  27.7  27.95  0.97  7.84  28.9 
Barbara (265 KB)  80  0.94  11.43  24.48  0.92  10.32  25.64  25.49  0.91  10.02  25.7 
Mandrill (278 KB)  80  0.96  9.21  25.50  0.94  8.86  26.42  26.55  0.94  8.64  26.8 
5 Conclusion
This paper introduces a lossless image compression algorithm using a combination of twodimensional DWT and onedimensional DFrFT. The use of wavelet decomposition in the extraction of subbands at different frequencies and compact coding of the lowfrequency subband by DFrFT contributes to the efficiency of the algorithm. Even though the algorithm has some limitations of dependency on the encoded bitstream for the decoder and on fractional order ranging from 0.85 to 0.99 to reconstruct the original image, the simulated results and comparative study with other algorithms show that the proposed method is efficiently operated at high compression percentage. Also at this compression percentage, the reconstruction quality is better and has potential advantages for multimedia image compression applications.
Notes
Compliance with ethical standards
Conflict of interest
The authors declare that they have no conflict of interest.
References
 1.Sakhdari M, Hajizadegan M, Li Y, Cheng MM, Hung JCH, Chen P (2018) Ultrasensitive, paritytimesymmetric wireless reactive and resistive sensors. IEEE Sens J 18(23):9548–9555CrossRefGoogle Scholar
 2.Fukushima Y, Fukuma M, Yoshino K, Kishida S, Lee S (2018) A KOH solution electrolytetype electric doublelayer super capacitor for a wireless sensor network system. IEEE Sens Lett 2(3):1–4CrossRefGoogle Scholar
 3.MühlbacherKarrer S et al (2017) A driver state detection system—combining a capacitive hand detection sensor with physiological sensors. IEEE Trans Instrum Meas 66(4):624–636CrossRefGoogle Scholar
 4.Karunarathne Maddumage S, Li S, Pathirana P, Williams G (2018) Entropybased method to quantify limb length discrepancy using inertial sensors. IET Wirel Sens Syst 8(1):10–16CrossRefGoogle Scholar
 5.Jiang X, Ding H, Zhang H, Li C (2017) Study on compressed sensing reconstruction algorithm of medical image based on curvelet transform of the image block. J NeuroComput 220:191–198Google Scholar
 6.Rabbani M, Joshi R (2002) An overview of JPEG2000 still image compression standard. J Signal Process Image Commun 17:3–48CrossRefGoogle Scholar
 7.Yang X, Sun Q, Wang T (2018) Image quality assessment improvement via local grayscale fluctuation measurement. J Multimedia Tools Appl 77:14–32Google Scholar
 8.Ma T (2018) Lowcomplexity and efficient image coder/decoder with quadtree search model for embedded computing platforms. IET Image Proc 12(2):235–242CrossRefGoogle Scholar
 9.Zhang X, Ling BW, Dam HH, Teo K, Wu C (2018) Optimal joint design of discrete fractional Fourier transform matrices and mask coefficients for multichannel filtering in fractional Fourier domains. IEEE Trans Signal Process 66(22):6016–6030MathSciNetCrossRefGoogle Scholar
 10.Bruylants T, Munteanu A, Schickens P (2015) Waveletbased volumetric medical image compression. J Signal Process Image Commun 31:112–133CrossRefGoogle Scholar
 11.Liu N, Tao R, Wang R, Deng Y, Li N, Zhao S (2017) Signal reconstruction from recurrent samples in fractional Fourier domain and its application in multichannel SAR. J Signal Process 131:288–299CrossRefGoogle Scholar
 12.Shi J, Liu X, Sha X, Zhang Q, Zhang N (2017) A sampling theorem for fractional wavelet transform with error estimates. IEEE Trans Signal Process 65(18):4797–4811MathSciNetCrossRefGoogle Scholar
 13.Rufai AM, Anbarjafari G, Demirel H (2014) Lossy image compression using singular value decomposition and wavelet difference reduction. J Digit Signal Process 24:117–123CrossRefGoogle Scholar
 14.Siddeq MM, Rodrigues MA (2015) A Novel 2D Image compression algorithm based on two level DWT and DCT Transforms with an enhanced minimizationmatrixsize algorithm for high resolution structured light 3D surface reconstruction. 3DR Express 26:6–26Google Scholar
 15.Gonzalez RC, Woods RE (2001) Digital image processing. AddisonWesley Publishers, BostonGoogle Scholar
 16.Strang G, Nguyen T (1996) Wavelets and filter banks. WellesleyCambridge Press, WellesleyzbMATHGoogle Scholar
 17.Solemon D (2007) Data compression: the complete reference, 4th edn. Springer, LondonGoogle Scholar
 18.Shi J, Zhang N, Liub X (2012) A novel fractional wavelet transform and its applications. Sci China Inf Sci 55(6):1270–1279MathSciNetCrossRefGoogle Scholar
 19.Wang S et al (2015) Texture analysis method based on fractional Fourier entropy and fitnessscaling adaptive genetic algorithm for detecting leftsided and rightsided sensor in neural hearing loss. J Fundam Inform 151(4):505–521Google Scholar
 20.Serbes A, Dakota L (2011) The discrete fractional Fourier transform based on the DFT matrix. J Signal Process 91:571–581CrossRefGoogle Scholar
 21.Wilkinson JH (1998) The algebraic eigenvalue problem. Clarendon Press, OxfordGoogle Scholar
 22.Lakhani G (2013) Modifying JPEG binary arithmetic codec for exploiting inner/intrablock and DCT coefficient sign redundancies. IEEE Trans Image Process 22(4):1326–1339MathSciNetCrossRefGoogle Scholar