5
Hybrid Gamut Mapping and Dithering Algorithm for Image Reproduction Chang-Jing Yang Department of Communication Engineering National Central University Jhongli City, Taiwan, ROC. E-mail: [email protected] Yung-Fang Chen Department of Communication Engineering National Central University Jhongli City, Taiwan, ROC. E-mail:[email protected] Abstract—This paper discusses the problems and solutions related to the reproduction of color images on displays. We focus on the problems of false contouring and gamut mismatches. A novel system consisting of a post-dithering algorithm and a hybrid gamut mapping algorithm is proposed to deal with the respective problems. The experimental results show that the proposed system mitigates the false contouring and increases the contrast in images. Keywords-gamut mapping algorithm; halftoning; dithering; I. INTRODUCTION Novel image devices such as electrophoretic displays (EPDs) have been discussed for the display of electronic readers because of several superior features [1]-[4]. The paper- like displays are more comfortable to read on than transmissive displays. Moreover, the bistability of EPDs decreases the power consumption of electronic readers. In previous work, we propose novel driving schemes to speed-up the image updating rate of EPDs [5]-[6]. In [7]-[8], an important result obtained from the prior studies is that the contrast ratios of the optical reflectance of EPDs are less than 10. Moreover, EPDs are only capable of rendering fewer than 16 gray levels because the number of particles on the observation surface of a pixel is difficult to control precisely [9]. In the prior researches, two major problems were disclosed when an image reproduced on EPDs: false contouring and gamut mismatch. Prior studies use halftoning techniques to mitigate the false contouring on the printers or displays. Those can be classified basically into three categories: dithering, error diffusion, and iterative methods [10]-[12]. As the spatial resolution of an EPD is much lower than that of a printer, dithering yields poor image quality—although they have the lowest computation complexity. On the contrary, the other two methods provide a more pleasing image; however, the required more computational resources become a major issue when these methods are used in a hand-held electronic device. Moreover, color gamut mapping algorithms (GMAs) are used to solve the problem of gamut mismatch [13]-[15]. GMAs map the colors in the sRGB color space to those inside the device gamut. Gamut clipping and gamut compression are two common approaches used with GMAs. While gamut clipping obtains a higher lightness, image details are lost. On the other hand, gamut compression preserves details but a darker image is obtained when compared to gamut clipping. To the knowledge of the authors, there are few studies discussing the integration of halftoning and GMA in an image processing system. Therefore, in this paper, we focus on this subject. First, the problems pertaining to the color gamut mismatch and false contouring are analyzed. We propose a novel system consisting of a dithering algorithm and a GMA to deal with the false contouring and the color gamut mismatch, respectively. Moreover, a related algorithm of the proposed system is also illustrated. II. SYSTEM ARCHITECTURE When an image reproduced on a display, a quantizer should be employed to downscale the total number of color images if the amount of colors of a display can render is less than the one of the image. Quantization errors occur and cause false contouring. The pixels whose gray levels are gradually increasing or decreasing show severe false contouring. By using digital halftoning techniques, we adjust the color of pixels to dither the image for blurring human eyes. Moreover, we assume color images are based on the sRGB color space. An image or halftoned image in the sRGB color space may not render its original color on a display when the color gamut of the display is smaller than the one of a color image. We assume that the input of the proposed system is a 24-bit color image in the sRGB color space, and the output is a 12-bit halftoned color image in the device color space of RGB (dRGB). Fig. 1(a) illustrates the proposed system architecture. The 8-bit RGB matrix in x in sRGB will map to the 4-bit ones out x in (dRGB), respectively. First, in x is quantized to q x . Fig. 1(b) shows a simple quantization sequence that is achieved using the higher 4 bits as q x and the lower 4 bits as the quantization error e . The PDA produces a dithering matrix d using e . The dithered image q x is produced by adding d to q x . Then, the HGMA maps the matrix h x in sRGB to the sampling colors in dRGB to construct the matrix out x . 2012 12th International Conference on ITS Telecommunications 978-1-4673-3070-1/12/$31.00 ©2012 IEEE 185

[IEEE 2012 12th International Conference on ITS Telecommunications (ITST) - Taipei, Taiwan (2012.11.5-2012.11.8)] 2012 12th International Conference on ITS Telecommunications - Hybrid

Embed Size (px)

Citation preview

Hybrid Gamut Mapping and Dithering Algorithm for Image Reproduction

Chang-Jing Yang Department of Communication Engineering

National Central University Jhongli City, Taiwan, ROC.

E-mail: [email protected]

Yung-Fang Chen Department of Communication Engineering

National Central University Jhongli City, Taiwan, ROC.

E-mail:[email protected]

Abstract—This paper discusses the problems and solutions related to the reproduction of color images on displays. We focus on the problems of false contouring and gamut mismatches. A novel system consisting of a post-dithering algorithm and a hybrid gamut mapping algorithm is proposed to deal with the respective problems. The experimental results show that the proposed system mitigates the false contouring and increases the contrast in images.

Keywords-gamut mapping algorithm; halftoning; dithering;

I. INTRODUCTION

Novel image devices such as electrophoretic displays (EPDs) have been discussed for the display of electronic readers because of several superior features [1]-[4]. The paper-like displays are more comfortable to read on than transmissive displays. Moreover, the bistability of EPDs decreases the power consumption of electronic readers. In previous work, we propose novel driving schemes to speed-up the image updating rate of EPDs [5]-[6]. In [7]-[8], an important result obtained from the prior studies is that the contrast ratios of the optical reflectance of EPDs are less than 10. Moreover, EPDs are only capable of rendering fewer than 16 gray levels because the number of particles on the observation surface of a pixel is difficult to control precisely [9]. In the prior researches, two major problems were disclosed when an image reproduced on EPDs: false contouring and gamut mismatch.

Prior studies use halftoning techniques to mitigate the false contouring on the printers or displays. Those can be classified basically into three categories: dithering, error diffusion, and iterative methods [10]-[12]. As the spatial resolution of an EPD is much lower than that of a printer, dithering yields poor image quality—although they have the lowest computation complexity. On the contrary, the other two methods provide a more pleasing image; however, the required more computational resources become a major issue when these methods are used in a hand-held electronic device. Moreover, color gamut mapping algorithms (GMAs) are used to solve the problem of gamut mismatch [13]-[15]. GMAs map the colors in the sRGB color space to those inside the device gamut. Gamut clipping and gamut compression are two common approaches used with GMAs. While gamut clipping obtains a higher lightness, image details are lost. On the other hand,

gamut compression preserves details but a darker image is obtained when compared to gamut clipping.

To the knowledge of the authors, there are few studies discussing the integration of halftoning and GMA in an image processing system. Therefore, in this paper, we focus on this subject. First, the problems pertaining to the color gamut mismatch and false contouring are analyzed. We propose a novel system consisting of a dithering algorithm and a GMA to deal with the false contouring and the color gamut mismatch, respectively. Moreover, a related algorithm of the proposed system is also illustrated.

II. SYSTEM ARCHITECTURE

When an image reproduced on a display, a quantizer should be employed to downscale the total number of color images if the amount of colors of a display can render is less than the one of the image. Quantization errors occur and cause false contouring. The pixels whose gray levels are gradually increasing or decreasing show severe false contouring. By using digital halftoning techniques, we adjust the color of pixels to dither the image for blurring human eyes. Moreover, we assume color images are based on the sRGB color space. An image or halftoned image in the sRGB color space may not render its original color on a display when the color gamut of the display is smaller than the one of a color image.

We assume that the input of the proposed system is a 24-bit color image in the sRGB color space, and the output is a 12-bit halftoned color image in the device color space of RGB (dRGB). Fig. 1(a) illustrates the proposed system architecture. The 8-bit R、G、B matrix inx in sRGB will map to the 4-bit

ones outx in (dRGB), respectively. First, inx is quantized to qx .

Fig. 1(b) shows a simple quantization sequence that is achieved using the higher 4 bits as qx and the lower 4 bits as the

quantization error e . The PDA produces a dithering matrix d using e . The dithered image qx is produced by adding d to

qx . Then, the HGMA maps the matrix hx in sRGB to the

sampling colors in dRGB to construct the matrix outx .

2012 12th International Conference on ITS Telecommunications

978-1-4673-3070-1/12/$31.00 ©2012 IEEE 185

III. POST-DITHERING ALGORITHM

A. Objective Function The objective of the PDA is to minimize the visual errors of

an image after quantization. The problem can be described as:

.)),()),(-),(),((( }E{

where, }E{ minimize which findI

1

J

1

2inq

2v

2v

= =

∗+=i j

jijijiji vxdxe

ed

(1)

i and j denote the thi row and thj column of an image with a resolution of JI× , respectively; * denotes convolution. The visual error matrix ve is the convolution value of the modulation transfer function (MTF) v and the difference before and after quantization. We focus on minimizing the mean-square-error of ve . There is an intense and complicated computation if the heuristic method is used to find the optimal solution of (1). A simpler method to find a solution of a dithering matrix d should be achieved. In this paper, we propose a simple algorithm that uses quantization error e to find a suboptimal solution of the dithering matrix d .

The image errors at low frequencies are easier to be noticed perceived by the human eyes than the ones at high frequencies because the MTF of the eyes acts as a low pass filter. For example, the pixels whose gray levels are gradually increasing or decreasing show severe false contouring. Refer to (1), the

visual error }E{ 2ve is increased quickly if the image errors

)),(-),(),(( inq jijiji xdx + are an accumulative errors. In

opposite, if the image errors are dithered, the visual errors may be more difficult to be noticed by the human eyes. Therefore, we propose a suboptimal method to reduce the number of pixels in (1) to find the solution of dithering matrix d . We divide an image with a resolution of JI× into K segments which are considered as local areas whose resolution is NM × , where N)J)/(M(IK ××= . We focus on minimizing the quantization error of the local areas in order to reduce the

quantization errors at low frequencies of an image. By reducing the number of pixels to find the solution of dithering matrix d , (1) can be modified to:

. }T,0{),( subject to

)),(),((}E{

},E{ minimize which find

local

M N

n

2locallocal

2local

2locallocal

=

+= nm

nmnm

km

kkk

kk

d

dee

ed

(2)

klocale denotes the quantization error of the thk local area

and m and n denote the thm row and the thn column of the thk local area. T is a value of a gray level and the component of the local dithering matrix k

locald is given by T. For example, if we

add a level (T=1) to the gray level of the pixel ),( nm , and

}E{2

localke of the thk local area is reduced. The ),(local nmkd

should be employed by the value of T.

B. Proposed Method for the Solution An algorithm is proposed to solve (2) and the flow chart is

shown in Fig. 2. The size of the local area is first determined. After that, the total quantization error }E{ local

ke of the thk local

area is calculated. The local area will be processed if }E{ localke

is larger than T/2. The pixel with the largest quantization error in the local area is considered as the first candidate to be dithered. The value of the pixel will be set to T in the dithering matrix ),(local nmkd . Note that if the gray level of the pixel is equal to the maximum gray level, which cannot be dithered, the candidate will be altered to be the pixel with the second largest quantization error. Repeat the above-mentioned process until the }E{ local

ke is minimized by adding klocald to k

localx . Then, the operation is performed for the next local area. The dithering matrix d can be obtained by processing all local areas in the image. The dithered image hx is produced by adding d to qx .

Consequently, the quantization errors at low frequencies of an image are reduced by adding d and qx .

C. Experimental Results of the Post-dithering algorithm The images used in the experiments have 256 gray levels

and a resolution of 500500× pixels. They are shown in Figs. 3 (a), and (b) at 300 dots per inch (dpi). A uniform quantizer of 16 gray levels is employed. 4-bit quantized images are shown in Fig. 3 (d), and (e). The proposed algorithm uses a

22 × local area for localx . By adding the dithering matrix d

generated by the proposed algorithm, the halftoned images shown in Fig. 3 (g), and (h) are obtained.

The MSE of the visual error in (1) is used to evaluate the image quality. The MTF of the human eye in [6] is used for v in (1), which is represented as:

{ }1.1)114.0(exp)114.00192.0(6.2)( rrr fff −+=v ,

(a)

(b) Fig. 1. (a) Proposed system architecture. (b) Quantized data

and quantized error separation.

186

where rf is the RMS value of the horizontal and vertical frequency in units of cycles per degree (CPD). The experimental results for the visual error with different sizes of local area xs are shown in Table. 1. The proposed algorithm achieves better image quality when a smaller local area is employed. The false contour problem is mitigated.

IV. HYBRID GAMUT MAPPING ALGORITHM (HGMA)

A look-up table (LUT) built in an EPD driver is a set of digital numbers that correspond to the driving waveform. It determines the sampling colors of an EPD. The LUT is defined as the dRGB color space. We can use the spectrometer to measure the color reflectance of each sampling color in the dRGB color space of an EPD. Comparisons of the dRGB color space of an EPD and the sRGB color space show that the sRGB color space is a unit cube and the dRGB color space is a polygon inside the cube.

The colors of an image in the sRGB color space are mostly out of the EPD color gamut since the color gamut is much smaller than that of the sRGB space. We propose an HGMA that combines a compression and a clipping technique to map the input colors in the sRGB color space to the output colors in the dRGB color space. First, we build a cube in the RGB color space using the black and white points of an EPD. Inside the cube of the RGB color space, the R、G、B are uniformly

divided into 16 levels. The 4,096 colors are defined inside the cube referred to as the cubic RGB color space (cRGB). As shown in Fig. 4, we can compress the 4,096 colors in the sRGB color space to those in the cRGB color space. The interval between the colors in the cRGB color space will be smaller than that in the sRGB color space. After compression, the colors in the cRGB color space are mostly inside the color gamut of an EPD.

Next, the colors in the cRGB color space will be mapped to the sampling colors in the dRGB color space. We use the CIELAB color space to predict the lightness (L), chroma (C), and hue (H) of the colors. The necessary color transformations to LCH can be found in [16]. We use the minimum Euclidean distance to formulate the objective function of the mapping algorithm. The objective function can be described as:

Fig. 2. The flow chart of the post-dithering algorithm.

(a) (b)

(c) (d)

(e) (f)

Fig. 3. Original images with 256 gray levels: (a) Building, (b)Beach; quantized images with 16 gray levels: (c) and (d);dithering images obtained using the post-dithering algorithm:(e) and (f).

187

( ) ( ) ( )d c c

2 2 2L L C C H Hc d c d c d

Find ( ) which minimizes E , where E

( ) - ( ) ( ) - ( ) ( ) - ( ) ;

γ

τ γ τ γ τ γ

Δ Δ =

+ +

x

x x x x x x (3)

)(Lc τx , )(C

c τx , and )(Hc τx are the lightness, chroma, and hue,

respectively, of the thτ color )(c τx in the cRGB color space.

)(Ld γx , )(C

d γx , and )(Hd γx are the lightness, chroma, and hue

of the thγ color )(d γx in the dRGB color space. Using (3),

the colors which are inside the color gamut will be mapped to the one with the closest color in the dRGB color space. Moreover, the colors which are out of the color gamut will be mapped to the ones on the boundary of the EPD using (3).

We can modify the LUT in the EPD by combining the

HGMA for the color gamut mapping. By using the LUT, each color in sRGB color space will find a corresponding color in dRGB color space. This can result in accelerated updating of EPD images. The steps of the HGMA are summarized as follows:

Step1: Build a cube in the sRGB color space using the

black and white points of an EPD to produce a cRGB color space.

Step2: Assign the 4,096 colors to the matrix cx in the

cRGB color space. Step3: Compress the 4,096 colors in the sRGB color space

to the ones in the cRGB color space. Step4: Map the 4,096 colors in the cRGB color space to the

ones in the dRGB color space using (3).

V. EXPERIMENTAL RESULTS

We determine the size of a local area to be 4 × 4 pixels for PDA. The sRGB color space defines colors within a unit cube that is produced by the black point (0, 0, 0) and white point (1, 1, 1). The contrast ratio of an EPD is assumed to be 10. The cRGB color space is produced by using the black point (0.07, 0.07, 0.07) and white point (0.7, 0.7, 0.7). The experimental results are shown in Figs. 5. The resolution of the original images is 500 × 500 pixels and 300 dpi. The original 24-bit

image is shown in Figs. 5(a) and 5(b). The 12-bit quantized image of the proposed system is shown in Figs. 5(c) and 5(d), and false contouring occurs in both images. The quantized images are processed by the PDA. The conventional method for gamut clipping in [13] is used for comparison with HGMA. The dithered images in the sRGB color space are mapped to the ones in the cRGB color space using gamut clipping as shown in Figs. 5(e) and 5(f). Some details in the images are lost and false contouring also occurs. Then, the images in the cRGB color space obtained using the HGMA are shown in Figs. 5(g) and 5(h). The false contouring is mitigated and the details in the images are preserved.

VI. CONCLUSION

In this paper, the problems and solutions pertaining to the reproduction of color images on EPDs are discussed. We focus on the problems related to false contouring and gamut mismatches. To solve the problems, we proposed a novel system consisting of PDA and HGMA. As shown by the experimental results, false contouring is mitigated by using PDA, and the color gamut mapping is achieved by using HGMA. When compared to the conventional method of the experimental results, false contouring is mitigated by using PDA, and the color gamut mapping is achieved by using the GMA of RGB compression and gamut clipping.

Fig. 4. RGB compression for mapping the sRGB color space tothe cRGB color space

188

ACKNOWLEDGMENT

The authors would like to thank the National Science Council of the Republic of China, Taiwan, for financially supporting this research under Contract no. NSC 101-2221-E-008-069.

REFERENCES [1] P. F. Evans, H. D. Lee, M. S. Maltz, and J. L. Dailey, U. S. PAT.

3,612,758, 1971.

[2] J. D. Albert, B. Comiskey, U. S. PAT. 6,067,185, 1998.

[3] R. C. Liang, J. Hou, H. Zang, J. Chung, S. Tseng, “Microcup displays: Electronic paper by roll-to-roll manufacturing processes,” J. SID, vol. 11, no. 4, pp. 621-628, Nov. 2003.

[4] Y. Masuda, N. Nihei, R. Sakurai, and R. Hattori, “A reflective-display QR-LPD,” J. SID, vol. 14, no. 5, pp. 443-448, May 2006.

[5] C. J. Yang, and Y. F. Chen, “Programmed driving waveform for quick-response liquid powder displays,” IEEE Trans. Consum. Electron. vol. 56, no. 4, pp. 2043-2046, Nov. 2010.

[6] C. J. Yang, and Y. F. Chen, “Driving waveform based on powder charge for a quick-response liquid powder display,” J. SID. vol. 20, no. 6, pp. 300-303, Jun. 2012.

[7] C. M. Lu, and C. L. Wey, “A Controller Design for Micro-Capsule Active Matrix Electrophoretic Displats,” J. Disp. Technol., vol. 7, no. 8, pp. 434-442, July 2011.

[8] C. M. Lu, and C. L. Wey, “A Controller Design for Color Active-Matrix Displays Using Electrophoretic Inks and Color Filters,” J. Disp. Technol., vol. 7, no. 9, pp. 482-489, July 2011.

[9] W. C. Kao, “Electrophoretic display controller integrated with real-time halftoning and partial region update,” J. Disp. Technol., vol. 6, no. 1, pp. 36-44, Jan. 2010.

[10] R. C. Gonzalez, and R. E. Woods, “Digital Image Processing,” Pearson Education, 2008, pp. 59-65.

[11] R. Ulichney, “Digital halftoning,” The MIT Press, 1987, ch. 5-8.

[12] H. R. Kang, “Digital color halftoning,” SPIE Press, 1999, ch. 10-18.

[13] J. Morovic, “A case study: minimum color difference gamut clipping,” in Color Gamut Mapping, Wiley, 2008, pp. 171-190, 2008.

[14] G. Sharma, “Digital color imaging,” CRC press, 2002, ch. 10.

[15] H. R. Kang, “Computational color technology,” SPIE Press, 2006, ch. 5

(a) (b)

(c) (d)

(e) (f)

(g) (h)

Fig. 5. Original 24-bit images: (a) Building, (b) Beach;quantized images: (c) and (d); images in the cRGB color spaceobtained using gamut clipping: (e) and (f); images in thecRGB color space obtained using HGMA: (g) and (h).

189