A Novel Hybrid Linear Predictive Coding - Discrete Cosine Transform Based Compression
A Novel Hybrid Linear Predictive Coding - Discrete Cosine Transform Based Compression
A Novel Hybrid Linear Predictive Coding - Discrete Cosine Transform Based Compression
Sandip Mehta
Department of Electrical and Electronics Engineering
JIET Group of Institutions
Jodhpur, Rajasthan, India
sandip.mehta@jietjodhpur.ac.in
Abstract—Image compression is a type of data compression applied to digital images, for reducing the cost for their storage and transmission.
Algorithms may take advantage of Algorithms may take advantage of visual perception and the statistical properties of image data to provide
superior results compared with generic compression methods. Image compression may be lossy or lossless. Lossless compression is preferred for
archival purposes and often for medical imaging, technical drawings, clip art, or comics. Lossy compression methods, especially when used at
low bit rates, introduce compression artifacts. Lossy methods are especially suitable for natural images such as photographs in applications
where minor (sometimes imperceptible) loss of fidelity is acceptable to achieve a substantial reduction in bit rate. Lossy compression that
produces negligible differences may be called visually lossless. On useful technique used for lossy compression is the discrete cosine transform
(DCT) that helps separate the image into parts (or spectral sub-bands) of differing importance (with respect to the image's visual quality). The
DCT is similar to the discrete Fourier transform in the sense that it transforms a signal or image from the spatial domain to the frequency
domain. This paper proposes a hybrid lossy compression technique using Linear Predictive Coding (LPC) and Discrete Cosine Transform (DCT)
to provide superior compression ratios.
Keywords- Lossless Predictive Coding , Compression, Discrete Cosine Transform, Inverse Discrete Cosine Transform, PSNR
__________________________________________________*****_________________________________________________
155
IJFRCSCE | October 2017, Available @ http://www.ijfrcsce.org
_______________________________________________________________________________________
International Journal on Future Revolution in Computer Science & Communication Engineering ISSN: 2454-4248
Volume: 3 Issue: 10 155 – 159
_______________________________________________________________________________________________
(a)
(b)
Fig. 1. Block Diagram of Hybrid LPC-DCT Compression Method (a) Encoder (b) Decoder
Stage 3: Level shifting of the image for better coding: As each
As shown in Fig. 1, the proposed compression method has
8x8 block or subimage is processed, its 64 pixels are level
been organized in two parts: the coding part and the decoding shifted by subtracting 2N-1 where 2Nis the number of gray
part. The steps involved in the HLPCDCT method for both levels in the image. Level shifting is done in order to make the
coding and decoding are as follows: data fit the discrete cosine transform. This results in the 8-bit
pixels falling in the range of -127 to 128 thereby making the
A. CODING data symmetric across zero. This is useful for DCT as any
Stage 1: Application of the modified Lossless Prediction symmetry that is exposed will lead towards better entropy
coding. In the normal method, the first column was taken as compression. Effectively, this shifts the DC coefficients to fall
reference and the differences were along the horizontal more in line with value of the AC coefficients. It should
direction. In the modified case, after processing in the however be noted that the AC coefficients produced by the
horizontal direction, the first column is itself predictive coded DCT are not affected in any way by this his level shifting.
which further improves the performance of the system.
Stage 4: Computation of the 2-D DCT of the level-shifted
Stage 2: Sub-division of the input image into non-overlapping image: The 2D DCT of the input image X(i j) is taken to get
pixel blocks of size of 8x8, which are then subsequently G(k, l). The DCT matrix of order 8 is given as follows:
processed left to right, top to bottom. The reason for selecting
8x8 block size can be understood from Fig.6. 4 which 0.3536 0.3536 0.3536 0.3536 0.3536 0.3536 0.3536
0.3536
illustrates graphically the impact of subimage size on DCT
coding reconstruction error. The data plotted are obtained by 0.4904 0.2778 0.0975 -0.0975 -0.2778 -0.4157 -0.4904
0.4157
dividing the 512x512, 8-bit monochrome image ‗Lena‘ into
subimages of size n x n, for n= 2,4,8, 16,…, 256,512, 0.4619 0.1913 -0.1913 -0.4619 -0.4619 -0.1913 0.1913 0.4619
computing the transform of each subimage, truncating 75% of
the resulting coefficients, and taking the inverse transform of 0.4157 -0.0975 -0.4904 -0.2778 0.2778 0.4904 0.0975 -0.4157
the truncated arrays. It can be seen that the cosine curve
flattens as the size of the subimage becomes greater than 8 x 8. 0.3536 -0.3536 -0.3536 0.3536 0.3536 -0.3536 -0.3536 0.3536
Therefore, the optimum size of the subimage is 8 x 8.
0.2778 -0.4904 0.0975 0.4157 -0.4157 -0.0975 0.4904 -0.2778
(2)
Fig. 2. Reconstruction Error versus Subimage Size for DCT
where the quantization matrix q(u,v) is given as
156
IJFRCSCE | October 2017, Available @ http://www.ijfrcsce.org
_______________________________________________________________________________________
International Journal on Future Revolution in Computer Science & Communication Engineering ISSN: 2454-4248
Volume: 3 Issue: 10 155 – 159
_______________________________________________________________________________________________
may be adapted to the characteristics of the image being
16 11 10 16 24 40 51 61 compressed.
12 12 14 19 26 58 60 55 B. DECODING
24 35 55 64 81 104 113 92 Stage 2: The obtained array is now denormalized by using the
following equation:
49 64 78 87 103 121 12 101
* q(u,v) (3)
72 92 95 98 112 100 103 99 Stage 3: The partial reconstructed subimage is obtained by
taking the inverse DCT of the denormalized array in
Fig. 3. A Typical Normalization Matrix accordance with equation 2 and 3 and then level shifting each
inverse transformed pixel by 2N.
and Q (u, v) for u,v = 0, 1, 2, 3,….7 are the resulting
normalized and quantized coefficients , G(k,l) is the DCT of Stage 4: Finally the inverse LPC operation is applied to obtain
an 8x8 block of image f(x,y), and q(u,v) is a transform the complete reconstructed image.
normalization array. By scaling q(u,v) , a variety of
compression ratios and reconstructed image qualities can be IV. EXPERIMENTAL RESULTS
achieved.
The performance of this technique is measured using
Stage 6: Pattern directed reordering of the normalized compression ratio (CR), Peak-signal-noise-ratio (PSNR) and
coefficients: After each block‘s DCT coefficients are root-mean- square error (RMSE). Visual inspection is also
quantized, the elements of are reordered in carried out on the compressed images as to judge the
accordance with the zigzag pattern of Fig. 4. effectiveness of the compression method. A wide range of
quality factor ranging from 1 to 12 was taken for the six
0 1 5 6 14 15 27 28 images and the results tabulated and compared with the
standard JPEG results and shown in Table 1.
2 4 7 13 16 26 29 42 TABLE 1
Compression Results for ‗Lena‘ Image
3 8 12 17 25 30 41 43
Proposed Proposed
JPEG JPEG
Quality Method Method
9 11 18 24 31 40 44 53
Compression Ratio(CR) PSNR
10 19 23 32 39 45 52 54 1 9.8729 10.5195 41.3594 39.9417
REFERENCES
[1] R. C. Gonzalez and R. E. Woods, ―Digital Image Processing‖, 2nd
edition, Prentice Hall, 2002.
[2] R. C. Gonzalez, R. E. Woods and S. L. Eddins, ―Digital Image
Processing Using MATLAB‖, Pearson, 2004.
[3] K. R. Castleman, ―Digitial Image Processing‖, Pearson, 1996.
[4] M. Petrou and C. Petrou, ―Image Processing –The Fundamentals‖, 2nd
edition, Wiley, 2010.
[5] A. Bovik, ―Handbook of Image and Video Processing‖, Academic
Press, 2000.
Quality = 1 Quality =3
[6] O. Marques, ―Practical Image and Video Processing Using MATLAB‖,
(a) (b) IEEE Press, Wiley, 2011.
[7] S. Jayaraman, S. Esakkirajan and T Veerakumar, ―Digital Image
Processing‖, Tata McGraw Hill, 2009.
[8] K. Sayood, ―Introduction to Data Compression‖, Elsevier, 2006.
[9] J. M. Blackledge and M. J. Turner, ―Image Processing II- Mathematical
Methods, Algorithms and Applications‖, Horwood Publishing Series:
Mathematics and Applications, 2000.
[10] J. M. Blackledge and M. J. Turner, ―Image Processing III-
Mathematical Methods, Algorithms and Applications‘, Horwood
Publishing Series: Mathematics and Applications, 2001.
[11] S. W. Golomb, "Run-length encodings", IEEE Transactions on
Information Theory, Vol. IT-12, pp. 399401, July 1966.
Quality = 5 Quality = 7
[12] G. Motta, J. A. Storer, and B. Carpentieri, "Lossless image coding via
(c) (d)
adaptive linear prediction and classification", Proceedings of the IEEE,
Vol. 88, No.11, pp. 1790-1796, 2000.
[13] Aleksej Avramovic and Salvica Savic,"Lossless Predictive
Compression of Medical Images", Serbian Journal of Electrical
Engineering, Vol. 8, no.1, pp. 27-36, Feb. 2011.
[14] I. H. Witten, R. Neal, and J. M. Cleary, "Arithmetic Coding for Data
Compression", Communications of the ACM, Vol. 30, no. 6, pp.
520540, June 1987.
[15] D. A. Huffman, "A method for the construction of minimum
redundancy codes", Proceedings of the IRE, Vol. 40, no. 9, pp.
10981101, September 1952.
[16] R. Hashemian , ―High Speed Search and Memory Efficient Huffman
Quality = 9 Quality = 11 Coding," IEEE Inter. Symp. Circuit Syst. May 3-6, 1993.
(e) (f) [17] R. Hashemian,"Design and Hardware Implementation of a Memory
Fig. 5. Restoration Results of HLPC-DCTC for ‘Lena’ Image for efficient Huffman Decoding", EEE Consumer Elec. August Vol. 40,
Different Values of Quality (a) Quality = 1 (b) Quality =3 No.3, 1994, pp. 345-352.
(c) Quality =5 (d) Quality =7 (e) Quality =9 (f) Quality = 11 [18] S. B. Choi, Moon Ho Lee "A Fast Huffman Decoder via Pattem
Matching", 1994 IEEE Intemational Workshop on ISPACS, 1994, PP
The hybrid Linear Predictive Coding –Discrete Cosine 134-138.
Transform compression technique proposed in this section is [19] P. C. Cosman, E. A. Riskin, R. M. Gray, "Combining vector
competitively better than the JPEG algorithm at all levels of quantization and histogram equalization", Informal. Processing Manag.,
quality. However, like the JPEG algorithm, it also suffers vol. 28, no. 6, pp. 681-686, Nov.—Dec. 1992.
from blocking artifacts as the value of quality increases. [20] P. A. Chou, T. Lookabaugh, R. M. Gray, "Entropy-constrained vector
quantization", IEEE Trans. Acoust. Speech Signal Processing, vol. 37,
pp. 31-42, Jan. 1989.
IV. CONCLUSION [21] A. J. Ahumada, H. A. Peterson, "Luminance-model-based DCT
A Novel Hybrid lossy compression technique has been quantization for color image compression", Human Vision Visual
Processing and Digital Display III, vol. 1666, pp. 365-374, 1992.
proposed in this technique which incorporates the Linear
[22] H. A. Peterson, A. J. Ahumada, A. B. Watson, "An improved detection
Predictive Coding and the Discrete Cosine Transform. The model for DCT coefficient quantization", SPIE Proceeding, vol. 1913,
simulations were carried out for a number of benchmark pp. 191-201, 1993.
images including Lena, Peppers, Barbara, Lighthouse, [23] A. K. Jain, "A fast Karhunen-Loeve transform for a class of random
Mandrill and Grass. In each of these cases, it was found that processes", IEEE Trans. Comm., vol. COM-24, pp. 1023-1029, Sept.
the results obtained from this technique were superior to that 1976.
obtained from JPEG at various levels of quality factor. [24] I. Daubechies, ―Ten Lectures on Wavelets‖, Society for Industrial and
Applied Mathematics, Philadelphia, 1992.
However, like the JPEG algorithm, it also suffers from [25] S. Mallat, ―A Wavelet Tour of Signal Processing‖, 2nd edition,
artefacts. Future work may be directed at removing these Academic Press, 1999.
artifacts and reducing the processing time. [26] S. Mallat, ―A Theory for Multiresolution Signal Decomposition: The
Wavelet Representation,‖ IEEE Trans. Pattern Anal. Mach. Intell.,
Vol. 11, No. 7, pp. 674–693, Jul. 1989.
158
IJFRCSCE | October 2017, Available @ http://www.ijfrcsce.org
_______________________________________________________________________________________
International Journal on Future Revolution in Computer Science & Communication Engineering ISSN: 2454-4248
Volume: 3 Issue: 10 155 – 159
_______________________________________________________________________________________________
159
IJFRCSCE | October 2017, Available @ http://www.ijfrcsce.org
_______________________________________________________________________________________