Quality Improvement of Compressed Color Images Using a Probabilistic Approach
Total Page:16
File Type:pdf, Size:1020Kb
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 Informatics, 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 interpolation 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 algorithm 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 probability den- bility density function (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 FIELD 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 C 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 matrix⎞ 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 r 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 analysis, 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.