SN Applied Sciences

, 1:266 | Cite as

A lossless image compression algorithm using wavelets and fractional Fourier transform

  • R. Naveen KumarEmail author
  • B. N. Jagadale
  • J. S. Bhat
Research Article
Part of the following topical collections:
  1. 3. Engineering (general)


The necessity of data transfer at a high speed, in fast-growing 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 low-frequency sub-bands 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 sub-bands of the wavelet transform, carefully. In this method, an image is split into low- and high-frequency sub-bands by using Daubechies wavelet filter and level 1 quantization is applied for both low-frequency and high-frequency sub-bands. The low-frequency sub-bands are compressed by using fractional Fourier transform with optimal fractional orders, and at the same time, high-frequency sub-bands 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 run-length 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.


Discrete wavelet transform (DWT) One-dimensional discrete fractional Fourier transform (DFrFT) Image compression Quantization Sub-bands 

1 Introduction

The image compression technology in the past decade has revolutionized the field of data communication. Today’s high-definition 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–frequency-based 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 high-resolution 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

The multiresolution features of wavelet transform offer the hierarchical set of scaling and mother wavelet functions to represent an original signal with less number of frequency samples. For each decomposition level, it generates two classes of wavelet coefficients (approximate and detailed) [15, 16]. In two-dimensional wavelet decomposition, for each level, it produces approximate (LL), horizontal detail (HL), vertical detail (LH) and diagonal detail (HH) sub-bands as shown in Fig. 1a.
Fig. 1

Wavelet decomposition coefficients for the first level

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, low-frequency wavelet coefficients are distributed towards top left corner and high-frequency 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 One-dimensional discrete fractional Fourier transform

The development of continuous fractional Fourier transform (CFrFT) for signal analysis made many researchers develop a discrete complimentary part for it. The rotational property of DFrFT is quite similar to that of CFrFT. There are several methods to compute the DFrFT matrix; however, time-constraint eigenvector-based computational method is preferable [19]. The DFrFT defined in [20] uses a set of eigenvectors of the DFT matrix as a counterpart to the Hermite–Gaussian function which resembles the CFrFT. The mathematical unitary definition of DFrFT matrix \(S^{\alpha } [m,n]\) is given by:
$$S^{\alpha } [m,n] = \sum\limits_{K = 0}^{N - 1} {Q_{K} [m](\lambda_{K} )^{\alpha } } Q_{K} [n]$$
where \(Q_{K} [n]\) are orthonormal eigenvectors set of the \(N \times N\) DFT matrix and \(\lambda_{K}\) are coupled with eigenvalues. \(S^{\alpha }\) matrix is computed by using the following steps. First, the matrix \(Z\) decomposes the arbitrary vector \(x(n)\) into even and odd parts. The Z matrix maps even part of N-dimensional vector \(x[n]\) onto first \(\left[ {{\raise0.7ex\hbox{$N$} \!\mathord{\left/ {\vphantom {N 2}}\right.\kern-0pt} \!\lower0.7ex\hbox{$2$}} + 1} \right]\) components and odd part onto the remaining components [21]. The matrix \(Z\) is unitary and symmetry, that is \(Z = Z^{T} = Z^{ - 1}\), and \(W\) is real symmetric with tridiagonal structure. Hence, the resultant similarity transform is given by diagonal elements of even and odd matrix with eigenvectors \(e_{k} ,o_{k}\).
$$ZWZ^{ - 1} = \left[ {\begin{array}{*{20}c} {E_{v} } & 0 \\ 0 & {O_{d} } \\ \end{array} } \right]$$
Even though an eigenvector of the transformed matrix has either even or odd vectors, the common set of eigenvectors of \(W\) and DFT matrix are determined irrespective of the dimension of \(W\). Order of the eigenvectors is set by using zero-crossing values of discrete Hermite–Gaussian function [9], where eigenvectors of \(E_{v}\) and \(O_{d}\) matrix with the highest eigenvalues do not have any zero crossing but second highest has one and so on. An even eigenvector of \(Z\) is calculated by \(e = Z\left[ {e_{k}^{{\hat{T}}} |0 \ldots 0} \right]^{T}\) and \(e = Z\left[ {0 \ldots 0|o_{k}^{{\hat{T}}} } \right]^{T}\) through \(\hat{e}_{k} ,\hat{o}_{k}\) where ‘\(k\)’ is zero crossing \((0 \le k \le [N/2])\) and \((0 \le k \le \left[ {(N - 3)/2} \right])\), respectively. Finally, Eq. 1 becomes
$$S^{\alpha } [m,n] = \sum\limits_{{K = 0,k \ne (N - 1 + N_{2} )}}^{N - 1} {u_{K} [m]} e^{{ - j\frac{\pi }{2}k\alpha }} u_{K} [n],$$
whereas \(u_{k} (n)\) is a discrete Hermite–Gaussian function at the \(k\)th order. It is observed that \(N\) is either even or odd and that there are no eigenvectors with \(N - 1\) or \(N\) zero crossings. Hence, eigenvalue multiplicity of DFT matrix to get DFrFT kernel matrix is given in Table 1.
Table 1

Eigenvalues multiplicity of DFT matrix to get DFrFT kernel matrix



− j

− 1



m + 1



m − 1

4m + 1

m + 1




4m + 2

m + 1


m + 1


4m + 3

m + 1

m + 1

m + 1


As shown in Table 1, DFrFT is computed for each column of LL sub-bands 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

This paper uses the best properties of transforms to enhance the compression performance. The wavelet transform is used to extract the spectrum of a source image from low-frequency (LL) and high-frequency (non-LL) sub-bands. The steps involved in the proposed method (Fig. 2) are shown below:
Fig. 2

Block view of a proposed method

  • Step 1 First, calculate the size of a test image and apply the two-dimensional discrete wavelet transform for decomposition (mother wavelet Daubechies of scale 5). The source image is split into LL and non-LL sub-bands.

  • Step 2 Apply level 1 quantization for decomposed sub-bands 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 non-LL sub-bands) and the median value of the quantized sub-band ‘S’ (either LL or non-LL sub-bands).
    $$M1 = {\text{Quantization}}\_{\text{Scale}} \times {\text{median}}\;(S)$$
    New quantized sub-band ‘Sub_band_q1’ is obtained by dividing the decomposed sub-bands ‘S’ with the factor ‘M1’
    $$Sub\_band\_q1 = {\text{round}}(S/M1)$$

    *Quantization scale 0.01 means computing 1% from median value in LL sub-band to be divided by all values of LL sub-band. Quantization scale for non-LL sub-band is taken largely because these sub-bands are less significant and need coarse quantization.

  • Step 3 Coding of LL sub-band One-dimensional DFrFT with the optimal fractional order (\(\alpha_{\text{opt}}\)) is applied to each column of level 1 quantized LL sub-band. After DFrFT compression, coefficients are arranged in two-dimensional arrays (Fig. 3).
    Fig. 3

    Coding of LL sub-band

    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 sub-band,
    $$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.$$
    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.
  • Step 4 Coding of non-LL sub-band Level 1 quantized non-LL sub-bands are partitioned into non-overlapped 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 sub-band. 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.
    Fig. 4

    Nonzero blocks storing technique for non-LL sub-band compression

  • 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 run-length 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 sub-bands recovered by inverse DFrFT with fractional order \(( - \alpha_{\text{opt}} )\) and by multiplying level 2 quantization factor M2. Similarly, non-LL sub-bands recovered to their original position, and remaining blocks are padded by zero. Again multiply the quantization factor M1 for each non-LL sub-band and apply an inverse discrete wavelet transform to reconstruct the original image.

There are several parameters available to evaluate the compression algorithms: the parameter percentage, root-mean-square difference (PRD), mean square error (MSE), peak signal-to-noise ratio (PSNR) and compression percentage (CP) which are given in Eqs. 7, 8, 9 and 10, respectively.
$${\text{PRD}} = \sqrt {\frac{{\sum\limits_{M,N} {\left[ {I_{1} \left( {m,n} \right) - I_{2} (m,n)} \right]^{2} } }}{{\sum\limits_{M,N} {\left[ {I_{1} \left( {m,n} \right)} \right]^{2} } }} \times 100}$$
$${\text{MSE}} = \frac{{\sum\limits_{M,N} {\left[ {I_{1} (m,n) - I_{2} (m,n)} \right]}^{2} }}{M \times N}$$
$${\text{PSNR}} = 10\log_{10} \left( {\frac{255 \times 255}{\text{MSE}}} \right)$$
$${\text{Compression}}\_{\text{percentage}} = \frac{{\left[ {I_{1} (m,n) - I_{2} (m,n)} \right]}}{{I_{2} (m,n)}} \times 100$$
where \(I_{1}\) and \(I_{2}\) are original and reconstructed images with \(m,n\) rows and columns, respectively. The simulation has been carried out repeatedly for optimal fractional orders to reduce the PRD and to maximize the PSNR value of the image for defined compression percentages.

4 Results and discussion

Original test images such as airplane, house, boat, aerial, peppers, Barbara and Mandrill of dimension 512 × 512 are chosen to evaluate our compression algorithm. This algorithm uses two optimization measures to increase lossless compression performance.
  1. 1.

    Selection of suitable mother wavelet This algorithm uses ‘Daubechies’ tap-5 (DB-5) 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. 2.

    Optimization of fractional orders This algorithm uses one-dimensional DFrFT kernel with optimal fractional order to compress LL sub-band. The wavelet coefficients in LL sub-bands 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 sub-bands 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 non-LL sub-bands) will not affect information as it can be reconstructed during decoder stage and leads to a reconstruction of the approximate original image.
    Fig. 5

    Fractional orders over CP for LL sub-bands of peppers, Barbara and aerial imagery

By adopting all the above optimization techniques, the compression algorithm is implemented and evaluated as follows: Table 2 tabulates PRD and PSNR values of the proposed method at a high compression percentage from 50%, 55, 60, 70 to 90% with optimal fractional orders (αopt) for Barbara image. In order to reduce the PRD and to increase the PSNR values (Table 2), the fractional orders are varied from 0.94 to 0.98. The value αopt for compression of the original image and for decomposed wavelet coefficients is quite different. Since wavelet coefficients in LL sub-bands are much correlated, it is difficult to differentiate the significant and non-significant coefficients in it. Even PSNR value of the reconstructed image is high even with some loss in the reconstructed image. But measuring PRD is beneficial for developing this algorithm as lossless compression by computing the pixel-to-pixel error between original and reconstructed images.
Table 2

PRD and PSNR calculation of the proposed method at different compression percentages for Barbara image

Compression percentage








































The simulated Barbara image from Fig. 6, at different CPs, reveals that, even at CP with 80%, the reconstructed image does not seem to be different from its original image.
Fig. 6

a Original Barbara image compressed using by DWT-DFrFT at compression ratio; b 20%; c 40%; d 60%; e 70%; e 80%

Figure 7 shows the graphical deviation of PRD on PSNR of the proposed method for Barbara image. It is observed that PRD and PSNR are inverse in relation, and in order to make our algorithm more stable in terms of lossless, we need to reduce the PRD as much as possible.
Fig. 7

Graphical comparison of PRD and PSNR for Barbara image

Table 3 gives PRD, PSNR comparative tabulation of the proposed method with JPEG using binary arithmetic coding (JAC) proposed by Lakhani et al. [22] and other combination of wavelet transform with DFrCT and DFrST at compression percentage (80%). PSNR value of the proposed method for boat image at 80% is 2 db, 0.41 db and 2.56 db lesser than remaining three methods, respectively. PRD also varied in the same manner, as the proposed method is less efficient in reconstructing the images with a large number of edges.
Table 3

PRD and PSNR comparison of the proposed method with DWT-DFrST and DWT-DFrCT

Test image (size)
















Airplane (258 KB)












House (196 KB)












Boat (257 KB)












Aerial (298 KB)












Peppers (257 KB)












Barbara (265 KB)












Mandrill (278 KB)












Figure 8 shows the graphical representation of a comparison of the proposed method with other methods. The overall results show that the proposed algorithm is significantly improved from its primitive algorithms and also competes with some of the best algorithms in the reconstruction process.
Fig. 8

Comparison of the proposed method with DFrCT and DFrST for Barbara image at different compression percentages (50% to 90%)

5 Conclusion

This paper introduces a lossless image compression algorithm using a combination of two-dimensional DWT and one-dimensional DFrFT. The use of wavelet decomposition in the extraction of sub-bands at different frequencies and compact coding of the low-frequency sub-band 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.


Compliance with ethical standards

Conflict of interest

The authors declare that they have no conflict of interest.


  1. 1.
    Sakhdari M, Hajizadegan M, Li Y, Cheng MM, Hung JCH, Chen P (2018) Ultrasensitive, parity-time-symmetric wireless reactive and resistive sensors. IEEE Sens J 18(23):9548–9555CrossRefGoogle Scholar
  2. 2.
    Fukushima Y, Fukuma M, Yoshino K, Kishida S, Lee S (2018) A KOH solution electrolyte-type electric double-layer super capacitor for a wireless sensor network system. IEEE Sens Lett 2(3):1–4CrossRefGoogle Scholar
  3. 3.
    Mühlbacher-Karrer 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. 4.
    Karunarathne Maddumage S, Li S, Pathirana P, Williams G (2018) Entropy-based method to quantify limb length discrepancy using inertial sensors. IET Wirel Sens Syst 8(1):10–16CrossRefGoogle Scholar
  5. 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 Neuro-Comput 220:191–198Google Scholar
  6. 6.
    Rabbani M, Joshi R (2002) An overview of JPEG2000 still image compression standard. J Signal Process Image Commun 17:3–48CrossRefGoogle Scholar
  7. 7.
    Yang X, Sun Q, Wang T (2018) Image quality assessment improvement via local gray-scale fluctuation measurement. J Multimedia Tools Appl 77:14–32Google Scholar
  8. 8.
    Ma T (2018) Low-complexity and efficient image coder/decoder with quad-tree search model for embedded computing platforms. IET Image Proc 12(2):235–242CrossRefGoogle Scholar
  9. 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. 10.
    Bruylants T, Munteanu A, Schickens P (2015) Wavelet-based volumetric medical image compression. J Signal Process Image Commun 31:112–133CrossRefGoogle Scholar
  11. 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. 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. 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. 14.
    Siddeq MM, Rodrigues MA (2015) A Novel 2D Image compression algorithm based on two level DWT and DCT Transforms with an enhanced minimization-matrix-size algorithm for high resolution structured light 3D surface reconstruction. 3DR Express 26:6–26Google Scholar
  15. 15.
    Gonzalez RC, Woods RE (2001) Digital image processing. Addison-Wesley Publishers, BostonGoogle Scholar
  16. 16.
    Strang G, Nguyen T (1996) Wavelets and filter banks. Wellesley-Cambridge Press, WellesleyzbMATHGoogle Scholar
  17. 17.
    Solemon D (2007) Data compression: the complete reference, 4th edn. Springer, LondonGoogle Scholar
  18. 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. 19.
    Wang S et al (2015) Texture analysis method based on fractional Fourier entropy and fitness-scaling adaptive genetic algorithm for detecting left-sided and right-sided sensor in neural hearing loss. J Fundam Inform 151(4):505–521Google Scholar
  20. 20.
    Serbes A, Dakota L (2011) The discrete fractional Fourier transform based on the DFT matrix. J Signal Process 91:571–581CrossRefGoogle Scholar
  21. 21.
    Wilkinson JH (1998) The algebraic eigenvalue problem. Clarendon Press, OxfordGoogle Scholar
  22. 22.
    Lakhani G (2013) Modifying JPEG binary arithmetic codec for exploiting inner/intra-block and DCT coefficient sign redundancies. IEEE Trans Image Process 22(4):1326–1339MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Department of ElectronicsKuvempu UniversityShivamoggaIndia
  2. 2.Department of ElectronicsIIITSurathIndia

Personalised recommendations