Automatic Detection and Correction of Purple Fringing Using the Gradient Information and Desaturation
Total Page:16
File Type:pdf, Size:1020Kb
16th European Signal Processing Conference (EUSIPCO 2008), Lausanne, Switzerland, August 25-29, 2008, copyright by EURASIP AUTOMATIC DETECTION AND CORRECTION OF PURPLE FRINGING USING THE GRADIENT INFORMATION AND DESATURATION Baek-Kyu Kim* and Rae-Hong Park*, ** *Department of Electronic Engineering, Sogang University **Interdisciplinary Program of Integrated Biotechnology, Sogang University C.P.O. Box 1142, Seoul 100-611, Korea phone: + (822) 705-8463, fax: + (822) 706-4216, email: {ohn109, rhpark}@sogang.ac.kr web: http://eevision1.sogang.ac.kr ABSTRACT An existing method (Kang’s method) [6] detects and corrects the color artifacts that have the purple color tone, which are called pur- This paper proposes a method to automatically detect and correct ple fringing. Unfortunately, Kang’s method has a weakness that it purple fringing that is one of the color artifacts due to characteris- may detect and correct even intact pixels because it uses only two tics of charge coupled device sensors in a digital camera. The pro- properties: purple fringed pixels appear near bright regions with posed method consists of two steps. In the first step, we detect pur- color characteristic. In this paper, we aim to detect purple fringe ple fringed regions that satisfy specific properties: hue characteris- artifacts more accurately than Kang’s method [6] by expanding the tics around highlight regions with large gradient magnitudes. In color range for accurate detection of purple fringing using the gradi- the second step, color correction of the purple fringed regions is ent magnitude information of an image. made by desaturating the pixels in the detected regions. The pro- The rest of the paper is organized as follows. In Section 2, we ex- posed method is able to detect purple fringe artifacts more precise- plain causes of purple fringing. Existing and proposed methods for ly than Kang’s method. It can be used as a post processing in a detection and correction of purple fringing are explained in Sections digital camera. 3 and 4, respectively. Then, experimental results and discussions are presented in Section 5, and finally conclusions are given in Section 1. INTRODUCTION 6. Recently digital cameras are widely used, with the technologies rapidly advancing. Functions of a digital camera are applied to other 2. PURPLE FRINGING digital consumer products. It is on the verge of a digital convergence Purple fringing is caused by three factors. Firstly, blooming is pro- era. The digital camera function of a cellular phone is a good exam- duced by inherent characteristics of a charge coupled device (CCD) ple of digital convergence. A big difference between the digital and sensor in a digital camera. CCD sensor converts incident light to an analog cameras lies in a sensor employed. A sensor of an analog electrical signal. For example, in a digital camera an image of an camera is a film whereas that of a digital camera is an image sensor. object is sensed as a form of light through a lens. Photodiodes which An image sensor converts incident light to an electrical signal [1]. are light sensors in a CCD sensor generate charges by light, in Color artifacts not shown in an image obtained from an analog cam- which a single cell of a CCD sensor defines a pixel and each pixel era appear in an image from a digital camera. In a digital camera, has a quantum-well where charges are accumulated [1]. The high- the causes of color artifacts are due to characteristics of an image light in an image makes the pixel intensity distorted. In other words, sensor or an optical device [2] [3] [4] [5]. Purple fringing is one of the high luminance makes charges flooded over the quantum-well. the color artifacts. Because purple fringing is unpleasant to the eye, When charges exceed the storage capacity of the quantum-well, the users are likely to eliminate or correct the purple fringed pixels. For excessive charges move to the adjacent cells through a readout line. example, purple fringing appears at the edge where colors (hue and The moving charges produce an error in the measurement of lumi- intensity) suddenly change because of blooming, demosaicing, and nance, which is called blooming [2]. chromatic aberration. Blooming and demosaicing are characteristics Secondly, the false color effect is caused by demosaicing. CCD’s of an image sensor (i.e., CCD sensor), whereas chromatic aberration configuration is usually known as the Bayer pattern, in which any is a characteristic of an optical device (i.e., lens). In the case of chromatic aberration, which is a problem caused by optical charac- 2×2 photosite group of the color filter array (CFA) consists of two teristics, users can see purple fringing in an image obtained by both green, one blue, and one red photosites. When the signal of an im- the digital and analog (film) cameras. Image quality of digital cam- age is inputted through a single CCD sensor, each photosite receives eras depends on the type of artifacts. Fortunately, artifacts of digital selectively a single signal of the R, G, and B color, where symbols images are corrected easily by post processing in digital image de- R, G, or B denote red, green, and blue, respectively. Because three vice or graphic editor software. Because digital image file format channels (R, G, and B) have empty pixels that do not have specific contains color or intensity information at each pixel, digital images color values, missing colors are to be interpolated for generation of are rectified more easily than analog ones that are obtained by de- a full-color image. However, interpolation gives artifacts due to veloping a film and printing a photograph. At present, most users inconsistency among three color planes. The artifacts appear due to select the regions which contain the purple fringed pixels, and cor- abrupt hue change around color discontinuities, called false colors [3] [4]. ® rect them using software such as Adobe PhotoShop. Conventional Finally, chromatic aberration is due to an optical characteristic of and proposed methods automatically detect and correct the purple a lens. Each specific region of visible light has different wavelength. fringed pixels. Also, they can be used as a post processing in a digi- The longer the wavelength, the higher a refractive index. In the case tal camera, enhancing the image quality. of a digital camera, three (R, G, and B) lights are used. The R, G, 16th European Signal Processing Conference (EUSIPCO 2008), Lausanne, Switzerland, August 25-29, 2008, copyright by EURASIP and B lights have wavelength of about 650nm, 510nm, and 475nm, 4. PROPOSED METHOD respectively. They have wavelength-dependent refractive indices, thus the chromatic aberration occurs in transverse or longitudinal 4.1 Detection of Purple Fringing direction. As a result, each of R, G, and B channels shows a blurred The proposed method similarly detects purple fringed regions by focus at different locations. Especially, purple fringing arises near extracting NSRs and CRs, which is similar to Kang’s method [6]. edges which have large luminance differences [5]. To segment the NSRs and CRs, the proposed method converts an original image into a binary image, which is suitable for a binary 3. KANG’S METHOD morphology operation. The proposed method modifies the condi- tion of CRs in order to detect the purple fringed pixels in a broader 3.1 Detection of Purple Fringing purple color range. In addition, it uses the gradient magnitude in- According to Kang’s method [6], the purple fringed regions are formation of an image. In other words, purple fringed regions are detected by expanded near-saturated regions (NSRs) and candidate determined based on the comparison of NSRs and CRs as well as regions (CRs). In other words, Kang’s method simply compares the gradient magnitude of an image. Figure 1 shows the block dia- boundary of expanded NSRs with CRs. gram of the proposed method for detection and correction of purple fringing, which consists of two parts: detection and correction parts. 3.1.1 NSRs A major cause of purple fringing is a blooming effect caused by an 4.1.1 Binarizatoin of NSRs object having the high luminance [6]. The maximum intensity value The NSRs are binarized, to which a binary morphology is applied. is assumed to be 255 (i.e., quantized to eight bits), then we find the By the way, blooming is a big problem for the sensing of the image pixels that are assumed to be influenced by high luminance. In with highlight regions. Unfortunately, it is interrelated with other Kang’s method, pixels are chosen as near-saturated pixels if the effects, which is common in digital cameras. Spatial averaging re- intensity value of the pixels is greater than or equal to 230 (i.e., the duces the fluctuation of the sensing characteristics in the array, due near-saturation threshold). to which blooming is “smoothed” over the image. As a result, if we set a threshold value to the maximal intensity (i.e., 255), we cannot 3.1.2 CRs detect the highlight regions because of the spatial averaging, which CRs are detected by color analysis of an image. Purple fringe arti- is spread over adjacent pixels. Thus, we assume that the upper 10% facts occur at pixels where purple color is emphasized. Purple is of the intensity value is potentially influenced by blooming [7]. For nonspectral color in chromaticity diagram of the Commission Inter- example, we set a threshold value to 90% of the maximum intensity national de L`Eclairage (CIE) color model. The color can be repre- value, i.e., 230. If a pixel intensity of an image is larger than the sented by mixing red and blue.