Journal of Computational Information Systems 9: 18 (2013) 7227–7234 Available at http://www.Jofcis.com
Properties of All Phase Biorthogonal Transform Matrix and Its Application in Color Image Compression Chengyou WANG ∗,
Baochen JIANG, Songzhao XIE
School of Mechanical, Electrical and Information Engineering, Shandong University, Weihai 264209, China
Abstract In this paper, the properties of the all phase biorthogonal transform (APBT) matrix are deduced based on the concepts of all phase biorthogonal transform. A novel algorithm is presented to compress color image using the all phase Walsh biorthogonal transform (APWBT), the all phase discrete cosine biorthogonal transform (APDCBT) and the all phase inverse discrete cosine biorthogona transform (APIDCBT), instead of the conventional discrete cosine transform (DCT). Compared with the DCT-based JPEG image compression algorithm, we use the all phase biorthogonal transform matrix to reduce interpixel redundancy and propose uniform quantization to the APBT coefficients aiming at reducing the computation complexity. Experimental results show that the CPSNR of the proposed algorithm performs close to the DCT and outperforms the DCT at low bit rates especially. Keywords: Image Coding; Discrete Cosine Transform (DCT); JPEG; All Phase Biorthogonal Transform (APBT); Composite Peak Signal to Noise Ratio (CPSNR)
1
Introduction
The development of modern communications business requires a lot of storage, recording and transmission of images, which requires image compression and coding, removing the redundant information independent of image quality, reducing the bit rate under the premise of ensuring the quality of the image. In various international standards for image compression, JPEG [1] is the most commonly international standard for continuous tone grayscale or color still image compression. Today the theory of discrete cosine transform (DCT) used in JPEG standard is quite mature, and it has been widely applied in areas of the digital image and video compression [2, 3]. DCT transformation has many advantages, but it is not the optimal choice in image compression yet. One of its shortcomings is the more complex quantization table; in particular, adjusting the bit rate requires more complex multiplications. And at low bit rate, block DCT transform coding exists serious blocking artifacts. ∗
Corresponding author. Email address:
[email protected] (Chengyou WANG).
1553–9105 / Copyright © 2013 Binary Information Press DOI: 10.12733/jcis7086 September 15, 2013
7228
C. Wang et al. /Journal of Computational Information Systems 9: 18 (2013) 7227–7234
To solve the above problem, on the basis of the all phase digital filtering [4], Ref. [5] proposed new concepts of the all phase biorthogonal transform (APBT), which has been applied in the field of still image compression. Ref. [6] deduced the specific forms of APBT matrix based on Walsh-Hadamard, DCT and IDCT orthogonal transforms for subsequent application in still image compression; as a result, better compression performance is achieved than using DCT-JPEG. It is worth mentioning that the research work on APBT and its applications in image coding also attracted the attention of some scholars. Refs. [7, 8] constructed the different all phase biorthogonal transform based on 3-degree U system and discrete Tchebichef transform used in still image coding. The average filter can smooth the block boundary pixels of the reconstructed image, and better results than conventional DCT coding are also achieved at low bit rates. In Ref. [6], APBT is applied to gray image coding, on this basis, this paper applies APBT to color image coding. Since the JPEG algorithm is independent of the color space, firstly, we transform the image from highly correlated RGB color space into the decorrelated YCbCr one, separating the luminance component and chrominance component. In the encoding process, APBT is applied to 8×8 pixel blocks to eliminate the correlation between each pixel of the image block. The uniform quantization interval is adopted according to the analysis of the energy and properties of the APBT matrix. Therefore, the advantage of proposed methods is that the quantization table is simple, and the computation complexity is also reduced. Besides, easier implementation can be achieved by software and hardware. The rest of this paper is organized as follows. Section 2 introduces the properties of the APBT matrix deduced on the basis of the all phase biorthogonal transform. The color space conversion from RGB to YCbCr and modified JPEG image algorithm based on APWBT, APDCBT and APIDCBT [6] are proposed in Section 3. In Section 4, experimental results and comparisons with conventional DCT-JPEG algorithm are presented. Finally, conclusions and remarks on further work are given in Section 5.
2
Properties of All Phase Biorthogonal Transform Matrix
On the basis of the all phase digital filtering, Ref. [6] deduced the specific forms of the all phase biorthogonal transform matrix V based on the Walsh-Hadamard, DCT and IDCT orthogonal transform. Based on the previous work, we study the all phase biorthogonal transform matrix V and deduce some properties of them. Property 1. The all phase biorthogonal transform matrix V is a full rank matrix, therefore, it has the inverse matrix V −1 . Though V is not the orthogonal matrix, i.e. V T ̸= V −1 , it has the following biorthogonal relationships: V V −1 = I, V −1 V = I, (1) where I is the unit matrix with size of N × N . Property 2. The sequency of the all phase biorthogonal transform matrix V increases with the column number increasing, and the amplitude decreases with the sequency increasing. When N = 8, the sequency is down from the order of 0, 1, 2, 3, 4, 5, 6, 7. Property 3. The row vector groups of the all phase biorthogonal transform matrix V are mutually conjugate vectors. V and V −1 are conjugate matrices, i.e. there exists a positive definite symmetric matrix A (A = AT ) with size of N × N , such that V AV T = I, where A satisfies the following properties:
C. Wang et al. /Journal of Computational Information Systems 9: 18 (2013) 7227–7234
7229
(i) The sum of each row and column vectors of matrix A is N . i.e. N −1 ∑
A(i, j) = N, i = 0, 1, · · · , N − 1,
(2)
A(i, j) = N, j = 0, 1, · · · , N − 1.
(3)
j=0
N −1 ∑ i=0
(ii) Elements on the main diagonal of matrix A (from upper-left to lower-right) are all positive. Elements on the diagonal parallel to the main diagonal are the same sign, and the sign of elements between each diagonal is alternating positive and negative. (iii) Elements on the vice diagonal of matrix A (from upper-right to lower-left) are all negative. Elements on the diagonal parallel to the vice diagonal are the same sign, and the sign of elements between each diagonal is alternating positive and negative. (iv) A is a positive definite matrix, and has an eigenvalue of value N . In addition to satisfying (i)-(iv), the matrix V of APDCBT and APIDCBT also satisfies the following properties especially: ] [ P Q be a block matrix, then A satisfies the following block symmetric (v) Suppose A = R S properties: (a) A(i, j) = A(N − 1 − i, N − 1 − j); (b) P = P T , S = S T , P (i, j) = S(N/2 − 1 − i, N/2 − 1 − j); (c) Q = RT , R = QT , Q(i, j) = R(N/2 − 1 − i, N/2 − 1 − j). (vi) Supposed matrix A has the diagonalization matrix Λ, the transform matrix is U , i.e. U T AU = Λ, then A can be transformed into orthogonal sparse matrix through the matrix B = 1 Λ− 2 U V −1 .
3 3.1
Application of APBT in Color Image Compression Color space conversion
JPEG can compress the source color image data (luminance component and chrominance component) from the different color spaces (also referred to as color model or color system) like RGB, YCbCr, etc. Wherein, RGB model almost includes all of the colors perceived by the human eye, and it is widely used in digital color. However this model is not suitable for graphical analysis, since the R, G and B components are highly relevant. When change the brightness, the three components will be amended accordingly [9]. Therefore, most of the color image compression schemes transform the highly correlated RGB color space into a decorrelated color space like YUV, YCbCr, etc [10]. Therefore, redundancies between the color components are reduced, and we can code the decorrelated color components by JPEG image compression schemes. The equation
7230
C. Wang et al. /Journal of Computational Information Systems 9: 18 (2013) 7227–7234
used in color space conversion is given by: Y = 0.299R + 0.587G + 0.114B, Cb = −0.1687R − 0.3313G + 0.5B + 128, Cr = 0.5R − 0.4187G − 0.0813B + 128,
(4)
where R, G, B are the red, green and blue components in RGB color space, and Y, Cb, Cr are the luma component, the blue-difference and red-difference chroma components in YCbCr color space. In this paper, firstly we transform the original data from RGB color space into YCbCr color space with a sampling rate 4:2:0, according to Eq. (4) separating the luminance component and chrominance component. The diagram of the luminance and chrominance separation is shown in Fig. 1.
Data in YCbCr Color Space Data in RGB Color Space
Color Space Conversion
Luminance Component Y
Sperate Luminance and Chrominance
APBT-JPEG Image Compression Chrominance Component Cb,Cr
Fig. 1: Separation of luminance and chrominance
3.2
DCT-based JPEG image compression algorithm (DCT-JPEG)
Conventional JPEG adopts DCT transform. The diagram of DCT-JPEG is shown in Fig. 2. After the DCT, the high-frequency components are concentrated in the lower-right corner of the coefficient matrix, and the low-frequency components are concentrated in the upper-left corner of the coefficient matrix. According to the visual characteristics of human eyes, different quantization intervals are used to transform coefficients. JPEG suggests the luminance and chrominance quantization table respectively [11], where the quantization step size is determined on the basis of a large number of subjective tests. And then the following steps are the zig-zag scan and the entropy encoder to quantized coefficients. In contrast to the encoder, the process of decoder is followed by entropy decoder, inverse zig-zag scan, dequantization, and IDCT. Finally, the reconstructed image is achieved.
3.3
Modified JPEG image compression algorithm based on APBT (APBT-JPEG)
Based on the energy, basis images and spectrum analysis, we know that the APBT has the attenuation characteristics of the high-frequency coefficients. During the transform process, coefficients have different frequency weighted; therefore, instead of the complex quantization table based on the visual characteristics of human eyes in JPEG we adopt the uniform quantization interval to transformed coefficients such that our algorithms are greatly simplified. Experimental results show that it is feasible to do so.
C. Wang et al. /Journal of Computational Information Systems 9: 18 (2013) 7227–7234 Luminance Chrominance
DCT
Quantizer
Quantization Table Reconstructed Image Data
Dequantizer
IDCT
Entropy Encoder
Compressed Image Data
HuffmanTable
Channel
Zig-zag Scan
Inverse Zig-zag Scan
7231
Entropy Decoder
Fig. 2: DCT-JPEG image compression algorithm
In this paper, a novel color image compression algorithm based on APBT is proposed. The diagram of APBT-JPEG is shown in Fig. 3. In APBT steps, three different transform matrices can be used, and we call them APWBT-JPEG, APDCBT-JPEG and APIDCBT-JPEG respectively. Substantially the same as basic steps of the DCT-JPEG image compression algorithm, there are only differences in the transform (DCT or APBT) and quantization process (quantization table or uniform quantization). Wherein, the quantization of each component has the same process, referred to as the same quantization table and quantization factor. Luminance Chrominance
APBT
Quantizer
Uniform Quantization Reconstructed Image Data
IAPBT
Dequantizer
Entropy Encoder
Compressed Image Data
HuffmanTable
Channel
Zig-zag Scan
Inverse Zig-zag Scan
Entropy Decoder
Fig. 3: APBT-JPEG image compression algorithm
4
Experimental Results and Analysis
In order to test the performance of the proposed algorithm, simulation is conducted with MATLAB 7.0 by applying to the image Lena (24bits/pixel, 512×512). In APBT-JPEG algorithm, APWBT-JPEG adopts V5 as the transform matrix and V (when N = 8) is applied to the APDCBT-JPEG and APIDCBT-JPEG [6]. To measure the performance of algorithm proposed in this paper, we choose the Composite Peak Signal to Noise Ratio (CPSNR) [12] defined as: CPSNR = 10log10
(dB), 3 M N ∑∑∑ 2 [Iin (i, j, k) − Iout (i, j, k)] 2552
1 3M N
(5)
k=1 i=1 j=1
where Iin and Iout are the original and reconstructed images respectively, M and N are the
7232
C. Wang et al. /Journal of Computational Information Systems 9: 18 (2013) 7227–7234
Table 1: CPSNR comparison of DCT-JPEG and APBT-JPEG applied to color image Lena Bit rate/bpp
CPSNR/dB DCT-JPEG
APWBT-JPEG
APDCBT-JPEG
APIDCBT-JPEG
0.30
22.79
25.48
25.54
25.56
0.40
28.79
29.34
29.34
29.47
0.50
30.87
30.90
30.93
31.11
0.60
32.14
31.93
31.97
32.21
0.70
33.01
32.68
32.73
33.02
0.80
33.66
33.27
33.34
33.65
0.90
34.20
33.76
33.84
34.19
1.00
34.63
34.19
34.29
34.63
dimensions of each color component array, i and j are the locations of pixels in the color plane, and k represents the color plane. Table 1 shows the experimental results, and we conclude that the CPSNR of the proposed algorithm performs close to DCT-JPEG at the same bit rates, and outperforms the DCT-JPEG at low bit rates especially. In other words, the performance of APBT-JPEG algorithm performs close to the DCT-JPEG algorithm in color image compression. More clear and intuitive, we draw their ratio distortion curves as shown in Fig. 4. The reconstructed images Lena obtained by using DCT-JPEG, APWBT-JPEG, APDCBT-JPEG and APIDCBT-JPEG at 0.30bpp are presented in Figs. 5(a)-(d). We can see that the blocking artifacts in Figs. 5(b)-(d) have been reduced significantly than the DCT-JPEG shown in Fig. 5(a), while better performance in visual quality is achieved in the algorithm we proposed than the DCT-JPEG. 36
34
CPSNR(dB)
32
30
28
26 DCT−JPEG APWBT−JPEG APDCBT−JPEG APIDCBT−JPEG
24
22 0.2
0.3
0.4
0.5
0.6 0.7 bit rate(bpp)
0.8
Fig. 4: Ratio distortion curves
0.9
1
C. Wang et al. /Journal of Computational Information Systems 9: 18 (2013) 7227–7234
(a)
(b)
(c)
7233
(d)
Fig. 5: The reconstructed images Lena (0.30bpp): (a) DCT-JPEG, (b) APWBT-JPEG, (c) APDCBTJPEG, (d) APIDCBT-JPEG
5
Conclusions
On the basis of the above discussion, it can be concluded that the properties of the all phase biorthogonal transform matrix are deduced and better performance in visual quality is achieved by the algorithm APBT-JPEG proposed in this paper. Although the DCT has many advantages, it exists serious blocking artifacts and is more complex in computation, when changing the bit rate. APBT-JPEG shows as good performance as DCT-JPEG and outperforms the DCT-JPEG at low bit rates especially, therefore, it can be widely used in the fields of image and data compression. Although better performance has been achieved in APBT-JPEG, there still exists blocking artifacts at low bit rates. Therefore, the further work can focus on the blocking artifacts reduction and optimize the quantization to achieve better performance.
Acknowledgement This work was supported by the National Natural Science Foundation of China (Grant No. 61201371). The authors would like to thank Xiaoyan Wang, Yuzhen Tian, Chao Cui and Shuixiu Li for their help and valuable suggestions to improve the presentation of the paper.
References [1]
G. K. Wallace, The JPEG still picture compression standard, IEEE Trans. Consumer Electronics, vol. 38, no. 1, pp. 18-34, Feb. 1992.
[2]
W. B. Li, J. Zhang, D. S. Luo, and Y. M. Yu, Importance sampling and interpolation for image compression and decompression, Journal of Computational Information Systems, vol. 8, no. 23, pp. 9921-9932, Dec. 2012.
[3]
J. Li, M. Gabbouj, J. Takala, Zero-quantized inter DCT coefficient prediction for real-time video coding, IEEE Trans. Circuits and Systems for Video Technology, vol. 22, no. 2, pp. 249-259, Feb. 2012.
[4]
Z. X. Hou and X. Yang, The all phase DFT filter, in: Proc. of the 10th IEEE Digital Signal Processing Workshop and the 2nd IEEE Signal Processing Education Workshop, Pine Mountain, Georgia, USA, pp. 221-226, Oct. 2002.
7234
C. Wang et al. /Journal of Computational Information Systems 9: 18 (2013) 7227–7234
[5]
C. Y. Wang, Z. X. Hou, and A. P. Yang, Image coding algorithm based on all phase Walsh biorthogonal transform, in: Proc. of the IEEE Int. Symp. Microwave, Antenna, Propagation and EMC Technologies for Wireless Communications, Hangzhou, China, pp. 1118-1123, Aug. 2007.
[6]
Z. X. Hou, C. Y. Wang, and A. P. Yang, All phase biorthogonal transform and its application in JPEG-like image compression, Signal Processing: Image Communication, vol. 24, no. 10, pp. 791-802, Nov. 2009.
[7]
G. Q. Xiong, D. X. Qi, and F. H. Guo, A new algorithm of all phase biorthogonal U transform based on 3-degree U system, Process in Natural Science, vol. 19, no. 5, pp. 551-564, May 2009.
[8]
F. H. Guo and C. Z. Xiong, New image coding and reconstruction algorithm based on all phase biorthogonal Techebichef transform, Journal on Communications, vol. 31, no. 8A, pp. 17-25, Aug. 2010.
[9]
G. Chen, Application of processing techniques from color image to grey image, in: Proc. of the 2nd Int. Conf. Software Technology and Engineer, San Juan, PR, USA, pp. 372-375, Oct. 2010.
[10] V. K. Nath, D. Hazarika, and A. Mahanta, A novel approach to color image compression using 3-D discrete cosine transform, in: Proc. of the IEEE Int. Workshop on Machine Learning for Signal Processing, Cancn, Mexico, USA, pp. 205-210, Oct. 2008. [11] ISO/IEC, Information Technology-Digital Compression and Coding of Continuous-tone Still ImagesPart 1: Requirements and Guidelines, ISO/IEC 10918-1, Feb. 1994. [12] J. Mukherjee, M. K. Lang, and S. K. Mitra, Demosaicing of images obtained from single-chip imaging sensors in YUV color space, Pattern Recognition Letters, vol. 26, no. 7, pp. 985-997, May 2005.