<<

QUALITY IMPROVEMENT OF COMPRESSED COLOR IMAGES USING A PROBABILISTIC APPROACH

Nobuteru Takao, Shun Haraguchi, Hideki Noda, Michiharu Niimi

Kyushu Institute of Technology, Dept. of Systems Design and , 680-4 Kawazu, Iizuka, 820-8502 Japan E-mail: {takao, haraguchi, noda, niimi}@mip.ces.kyutech.ac.jp

ABSTRACT method using information on luminance component which is not downsampled. In compressed color images, colors are usually represented by luminance and chrominance (YCbCr) components. Con- The aims to recover only resolution of chromi- sidering characteristics of human vision system, chromi- nance components lost by downsampling. Alternatively, we nance (CbCr) components are generally represented more aim to recover not only resolution lost by downsampling coarsely than luminance component. Aiming at possible re- but also precision lost by a coarser quantization, if possi- covery of chrominance components, we propose a model- ble. Aiming at such recovery of chrominance components, based chrominance estimation where color im- we propose a model-based method where color images are ages are modeled by a Markov random field (MRF). A sim- modeled by a Markov random field (MRF). A simple MRF ple MRF model is here used whose local conditional proba- model is here used whose local conditional den- bility density (pdf) for a color vector of a pixel is a sity function (pdf) for a color vector of a pixel is a Gaussian Gaussian pdf depending on color vectors of its neighboring pdf depending on color vectors of its neighboring pixels. pixels. Chrominance components of a pixel are estimated Chrominance components of a pixel are estimated by max- by maximizing the conditional pdf given its luminance com- imizing the conditional pdf given its luminance component ponent and its neighboring color vectors. Experimental re- and its neighboring color vectors. The estimation is car- sults show that the proposed chrominance estimation algo- ried out iteratively, and chrominance components derived rithm is effective for quality improvement of compressed from a given compressed color image are used as initial color images such as JPEG and JPEG2000. values for the iterative estimation. If chrominance compo- nents are downsampled, interpolated chrominance compo- Keywords: compressed color image, chrominance estima- nents are used as the initial values. The proposed chromi- tion, MRF, JPEG, JPEG2000 nance estimation algorithm has a structure that chrominance components are estimated considering luminance compo- 1. INTRODUCTION nent represented with higher resolution and precision, and therefore we can expect a better recovery of them. In compressed color images, colors are usually represented The rest of this paper is organized as follows. In Sec- by luminance and chrominance (YCbCr) components in- tion 2, after a brief review of MRF, a color image model stead of red, green and blue (RGB) components. Then con- used in this paper is described. In Section 3, the proposed sidering characteristics of human vision system, chromi- chrominance estimation algorithm is described. Then after nance (CbCr) components are generally represented more implementation details are given in Section 4, experimental coarsely than luminance component. For example, in JPEG results are given in Section 5. Conclusions are addressed in compression [1], Cb and Cr components are usually down- Section 6. sampled by a factor of two at its compression stage, and afterward the downsampled chrominance components are 2. COLOR IMAGE MODELING BY MARKOV interpolated at its decompression stage. Furthermore, at RANDOM quantization step of discrete cosine transform (DCT) coef- ficients, DCT coefficients of chrominance components are 2.1 Markov Random Field generally quantized more coarsely than those of luminance components. Let L = {(i, j); 1 ≤ i ≤ N1, 1 ≤ j ≤ N2} denote a For interpolation of downsampled chrominance compo- finite set of sites of an N1 × N2 rectangular lattice. Let nents, several methods such as bi-linear interpolation and ηij ⊂Ldenote the (i, j) pixel’s neighborhood of a random 1 bi-cubic interpolation are usually used. However, such a field XL defined on L.LetCij denote the set of cliques conventional interpolation cannot recover high frequency associated with ηij which contains the (i, j) pixel, i.e., components lost by downsampling and could cause color 1 x f x {x ,...,x } In this paper, A and ( A) denote the set a1 al and blurring in edges of a color image. To prevent such arti- f x ,...,x A the multivariable function ( a1 al ) respectively, where = facts, Sugita et al. [2] proposed a chrominance interpolation {a1,...,al}.

520 (i, j) ∈Cij . For example, in the first-order neighborhood, derived using Besag’s pseudo-likelihood function [5]. Let ηij = {(i, j +1), (i, j − 1), (i +1,j), (i − 1,j)} and Cij = cL = {cij ;(i, j) ∈L}and yL = {yij ;(i, j) ∈L}denote {{(i, j)}, {(i, j), (i, j +1)}, {(i, j), (i, j − 1)}, {(i, j), (i + a chrominance image and a luminance image, respectively, 1,j)}, {(i, j), (i − 1,j)}} which consists of one singleton and both images constitute a color image xL. Our aim is to and four doubleton cliques. Let the random field XL = estimate a chrominance image while keeping a luminance {Xij ;(i, j) ∈L}be a Markov random field (MRF) defined image unchanged and the estimate cˆL can be described as on L with Xijs taking values from a common local state Q cˆL = arg max p(xL). (6) space X . It is well known that an MRF is completely de- cL scribed by a Gibbs distribution Note that it is practically impossible to find cˆL since the 1 search space over all possible configurations of cL is huge. p(xL)= exp{−U(xL)}, (1) ZX To overcome this difficulty, we use the pseudo-likelihood function proposed by Besag [5] and approximate p(xL) as where xL is a realization of XL from the configuration space N1×N2 ΩX = QX and p(xL)  p(xij | xη ). (7) ij (i,j)∈L U(xL)= U(xC ) (2) (i,j)∈L C∈Cij p | Using the local conditional pdf (xij xηij ), the chromi- nance vector cij in xij can be estimated as is the global energy function whereas U(xC ) is the clique energy function and p | . cˆij = arg max (xij xηij ) (8) cij ZX = exp{−U(xL)} (3) Note that only chrominance components are to be estimated xL∈ΩX since they are usually inferior to luminance component in is the partition function. For details on MRFs and related quality. concepts such as the neighborhoods and cliques, see Ref. The solution of (8) for the GMRF is explicitly described [3]. as follows. Let⎛ the covariance ⎞ in the GMRF shown σ σ σ 11 12 13 σ ⎝ σ σ σ ⎠ y Σyc 2.2 A Color Image Model Using Gaussian MRF in YCbCr in (4), Σ = 21 22 23 = , σ σ σ Σcy Σc Space 31 32 33 σ22 σ23 y ,cb ,cr T i, j where σy = σ11, Σc = , and Σyc = Let xij =( ij ij ij ) denote a color vector at ( ) pixel σ32 σ33 in YCbCr space, where yij is a luminance component and T (σ12,σ13)=Σ .TheGMRFp(xij | xη ) in (4) can cb cr cy ij ij and ij are two chrominance components. Let cij = be decomposed as b T (cij ,cij ) be a chrominance vector at (i, j) pixel. A color p | p y | y p | y , , image can be considered as a realization xL = {xij;(i, j) ∈ (xij xηij )= ( ij ηij ) (cij ij xηij ) (9) L} of a random field XL = {Xij;(i, j) ∈L}, where 1 b r T p(yij | yη )= xij =(yij ,c ,c ) . Color images are here assumed to ij 1/2 1/2 ij ij (2π) σy be modeled by a Gaussian MRF (GMRF) characterized by · {− 1 y − y 2}, the following local conditional pdf: exp ( ij ¯ηij ) (10) 2σy p | 1 1 (xij xηij )= p | y , π 3/2| |1/2 (cij ij xηij )= 1/2 (2 ) Σ (2π)|Σc|y| 1 T −1 · exp{− (xij − x¯η ) Σ (xij − x¯η )}, (4) 1 T −1 ij ij · exp{− (cij − mc|y) Σ (cij − mc|y)}, (11) 2 2 c|y 1 x¯η = xij+τ . (5) ij |N | where τ∈N 1 y , y¯ηij = ij+τ (12) Here x¯ηij is the mean of neighboring pixels’ color vectors |N | { ,τ ∈N} N τ∈N xηij = xij+τ , where denotes the neighbor- σ−1 y − y , hood of (0, 0) pixel. For example, N = {(0, 1), (0, −1), mc|y = c¯ηij + Σcy y ( ij ¯ηij ) (13) (1, 0), (−1, 0)} for the first-order neighborhood, and if τ = 1 c¯η = cij+τ , (14) (0, 1), xij+τ = xi,j+1. Σ is the covariance matrix of xij − ij |N | τ∈N η x¯ ij . −1 Σc|y = Σc − Σcyσy Σyc. (15) 3. ESTIMATION OF CHROMINANCE Considering that the maximum of (11) and then the maxi- COMPONENTS mum of (9) is derived at cij = mc|y, the estimate of cij , cˆij in (8) is derived as A chrominance estimation algorithm derived in this section σ−1 y − y . is the same as shown in [4]. However, it is here simply cˆij = c¯ηij + Σcy y ( ij ¯ηij ) (16)

521 Note that in order to obtain cˆij for (i, j) pixel, its neigh- Table 1: PSNR values for JPEG compressed images (qual- boring chrominance vectors cηij should be given. Since ity factor=80) with chrominance downsampling and those such a problem can be solved iteratively as is popular in improved by the proposed method. numerical , we rewrite Eq. (16) as PSNR(dB) (p+1) (p) −1 image bpp JPEG proposed c = c¯η + Σcyσy (yij − y¯η ), (17) ij ij ij Lena 1.65 33.18 33.55 where Milkdrop 1.35 33.06 33.48 Peppers 1.79 32.77 33.13 1 (p) c¯(p) = c , (18) Mandrill 2.71 27.87 27.95 ηij |N | ij+τ τ∈N and p represents the pth iteration. Chrominance components Table 2: PSNR values for JPEG compressed images (quality derived from a given compressed color image are used as factor=80) without chrominance downsampling and those (0) initial values cij s in this iterative estimation. If chromi- improved by the proposed method. nance components are downsampled, interpolated chromi- PSNR(dB) nance components are used as the initial values. image bpp JPEG proposed Lena 2.13 34.79 35.28 4. IMPLEMENTATION DETAILS Milkdrop 1.83 36.31 37.11 Peppers 2.38 35.57 36.12 In the calculation of each component of x¯ηij in (5), i.e., Mandrill 3.56 29.14 29.33 y¯ηij in (12) and c¯ηij in (14), we here used the third-order neighborhood2. However, if at least one of three compo- nents in xij+τ is far from the corresponding component in xij, xij+τ was excluded from the calculation. In the fol- color images. The proposed chrominance estimation algo- lowing experiments, the used conditions for exclusion were rithm was applied to JPEG compressed color images and |yij+τ − yij | > 0.5s (s is the standard deviation of lumi- JPEG2000 compressed ones. b b nance values) for luminance component, or |cij+τ − cij| > Experimental results for JPEG compressed color images r r 10 or |cij+τ − cij | > 10 for chrominance components. with and without chrominance downsampling are shown in Furthermore, to prevent an excessive change by the it- Fig. 1 and Fig. 2, respectively. In these figures, PSNR erative estimation in (17), the following intermediate val- values and CIELAB distances are plotted for four different (p+1)  (p) (p+1) ues (cij ) between successive estimates cij and cij quality factor (qf) images: qf=60, 70, 80, and 90, and the (p+1) leftmost and the rightmost point of each line correspond to were used instead of c : ij qf=60 and qf=90, respectively. Larger quality factor im- age has higher quality, i.e., larger PSNR value and smaller cb(p+1)  wbcb(p+1) − wb cb(p), ( ij ) = ij +(1 ) ij (19) CIELAB distance with larger bit rate (larger file size). From r(p+1)  r r(p+1) r r(p) (cij ) = w cij +(1− w )cij , (20) Fig. 1 and Fig. 2, it is seen that the proposed chromi- nance estimation algorithm is effective to improve quality where of JPEG color images compressed both with and without chrominance downsampling. Additionally, Table 1 and Ta- b(p+1) b(p) |cij − cij | ble 2 show quality improvement in PSNR value for JPEG wb =exp{− }, (21) 10 compressed images (quality factor=80) with and without r(p+1) r(p) chrominance downsampling, respectively. It is seen that |cij − cij | wr =exp{− }. (22) quality improvement for JPEG compressed images without 10 downsampling is more significant than for those with down- In the following experiments, the iterative procedure in sampling. (17) was stopped at only one iteration. The covariance ma- trix Σ in (4) for each image was computed using each given compressed image. Table 3: PSNR values for JPEG2000 compressed images (bpp=1.0) without chrominance downsampling and those improved by the proposed method. 5. EXPERIMENTAL RESULTS PSNR(dB) Experiments were carried out using four standard color im- image JPEG2000 proposed ages (Lena, Milkdrop, Peppers, Mandrill). These images Lena 33.62 33.88 are 256 × 256 pixels in size and 24 bit per pixel (bpp) full Milkdrop 36.49 36.74 Peppers 33.39 33.62 2For the third-order neighborhood, N = {(0, 1), (0, −1), (1, 0), (−1, 0), (1, 1), (−1, −1), (1, −1), (−1, 1), Mandrill 25.54 25.59 (0, 2), (0, −2), (2, 0), (−2, 0)}

522 36 10 Lena

34 Proposed Method Milkdrop JPEG Image Proposed Method 8 32 Peppers JPEG Image Mandrill Milkdrop

30 PSNR (dB) 6

CIELAB distance Peppers 28 Mandrill Lena

26

4 1 2 3 4 1 2 3 4 bit per pixel bit per pixel (a) (b)

Fig. 1: Experimental results for JPEG compressed four color images with chrominance downsampling. Performance is measured by (a) PSNR and (b) CIELAB distance.

8 Proposed Method Peppers 38 JPEG Image Milkdrop

Proposed Method Milkdrop Mandrill 34 JPEG Image 6 Lena

Mandrill

PSNR (dB) 30 Lena CIELAB distance

4 Peppers 26

1 2 3 4 5 1 2 3 4 5 bit per pixel bit per pixel (a) (b)

Fig. 2: Experimental results for JPEG compressed four color images without chrominance downsampling. Performance is measured by (a) PSNR and (b) CIELAB distance.

Experimental results for JPEG2000 compressed color derived from a given compressed color image were used as images without chrominance downsampling are shown in initial values for the iterative estimation. Experimental re- Fig. 3. In this figure, PSNR values and CIELAB distances sults show that the proposed chrominance estimation algo- are plotted for five different bpp images: bpp=0.25, 0.5, rithm is effective to improve quality of JPEG color images 1.0, 1.5 and 2.0. Additionally, Table 3 shows quality im- compressed both with and without chrominance downsam- provement in PSNR value for JPEG2000 compressed im- pling. Furthermore, it is shown that the proposed algorithm ages (bpp=1.0) without chrominance downsampling. It is is effective even for JPEG2000 compressed color images. seen that the proposed method is effective even for JPEG2000 compressed images. Acknowledgements This work was partly supported by the Telecommunications Advancement Foundation. 6. CONCLUSIONS

This paper presented a model-based chrominance estima- 7. REFERENCES tion algorithm in order to recover coarsely represented chromi- nance components in compressed color images. A simple [1] W.B. Pennebaker, J.L. Mitchell, JPEG: Still Image MRF model was here used as a color image model, whose Data Compression Standard, Van Nostrand Reinhold, local conditional pdf for a color vector of a pixel is a Gaus- 1993. sian pdf depending on color vectors of its neighboring pix- els. Chrominance components of a pixel were estimated by [2] H. Sugita, A. Taguchi, “Chrominance signal interpo- maximizing the conditional pdf given its luminance com- lation of YUV 4:2:0 format color images”, Electron- ponent and its neighboring color vectors. The estimation ics and Communications in Japan, vol.J88-A, no.6, was carried out iteratively, and chrominance components pp.751-760, 2005.

523 40 14 Peppers

12 Milkdrop Milkdrop Proposed Method 35 Proposed Method JPEG2000 Image 10 JPEG2000 Image 30 8 Mandrill PSNR (dB) Lena Mandrill Peppers CIELAB distance Lena 6 25

4

20 0 0.5 1 1.5 2 2.5 0.5 1 1.5 2 2.5 bit per pixel bit per pixel (a) (b)

Fig. 3: Experimental results for JPEG2000 compressed four color images without chrominance downsampling. Performance is measured by (a) PSNR and (b) CIELAB distance.

[3] S. Geman, . Geman, “Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of im- ages”, IEEE Trans. Pattern Anal. & Machine Intell., vol.PAMI-6, pp.721-741, 1984. [4] H. Noda, M. Niimi, “Colorization in YCbCr color space and its application to JPEG images”, Pattern Recognition, vol.40, pp.3714-3720, 2007. [5] J.E. Besag, “On the statistical analysis of dirty pic- tures”, J. Roy. Statis., Soc. B, vol.48, no.3, pp. 259- 302, 1986.

524