color image enhancement kuei-chun chen -...

8
Color Image Enhancement Kuei-Chun Chen College of Computer and Information Sciences University of North Florida, Jacksonville, Florida 32216 kc hen @ sinkhole.unf edu Abstract Color image enhancement is becoming an increasingly important research area. This paper reviews some image enhancement techniques developed specifically for gray- images and presents an extension and application to color images of a method that involves the decomposition of an image into background and texture components. A new image can be produced by applying multiplicative weights to the different components to bring out the texture. Desired color shifts can also be achieved by experimenting with the weights. Keywords: image processing, color image, image enhancement, background and texture components. 1. Introduction Color image processing is becoming an increasingly important research area because of the continuing drop in hardware cost and the wide use of color display devices. However, most of the techniques for image enhancement have been developed and implemented for gray-shade images. Algorithms for bringing out fine details of an image include the "histogram Ih:mniuion to copy without fee all or pan of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice h; given that copying is by pemaissico of the Association for Computing Machinery. To copy otherwise, or to republish, requir~ a fee and/or specific pen~*to~ transformation" [2], the "adaptive histogram equalization" (AHE) [3], the "median and the interquartile distance", and the "sliding histograms" [ 1]. The "histogram transformation" and the AHE techniques make use of easily computed local context features to reassign each pixel's gray level during histogram equalization. On the other hand, the "sliding histograms" and "the median and the interquarti[e distance" involve image decomposition which splits each pixel into texture and background components which are then recombined using different weight factors. The work presented in this paper is an investigation of a family of algorithms for color image enhancement. The enhancement of texture, the contrast of adjacent domains, and color saturation are considered. 2. Color Image Enhancement Algorithm The color image enhancement algorithm proposed here is based on the RGB (red, green, and blue) color model. An image is decomposed into three primary color files (one red, one green, and one blue), and every pixel in each primary color file is further decomposed again into background and texture components. The algorithm for obtaining the background component is the median filtering. After decomposing an image into background and texture components, the new pixel values can be obtained by independently adjusting the texture and the background components. © 1992 ACM 0-89791-506-2/92/0003/00328 $1.50

Upload: others

Post on 13-Jul-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Color Image Enhancement Kuei-Chun Chen - pudn.comread.pudn.com/downloads110/sourcecode/graph/texture... · 2008-04-13 · Color Image Enhancement Kuei-Chun Chen College of Computer

Color Image Enhancement

Kuei-Chun Chen College of Computer and Information Sciences

University of North Florida, Jacksonville, Florida 32216 kc hen @ sinkhole.unf edu

Abstract Color image enhancement is becoming an

increasingly important research area. This paper reviews some image enhancement techniques developed specifically for gray- images and presents an extension and application to color images of a method that involves the decomposition of an image into background and texture components. A new image can be produced by applying multiplicative weights to the different components to bring out the texture. Desired color shifts can also be achieved by experimenting with the weights.

Keywords: image processing, color image, image enhancement, background and texture components.

1. Introduction

Color image processing is becoming an increasingly important research area because of the continuing drop in hardware cost and the wide use of color display devices. However, most of the techniques for image enhancement have been developed and implemented for gray-shade images.

Algorithms for bringing out fine details of an image include the "histogram

Ih:mniuion to copy without fee all or pan of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice h; given that copying is by pemaissico of the Association for Computing Machinery. To copy otherwise, or to republish, requir~ a fee and/or specific pen~*to~

transformation" [2], the "adaptive histogram equalization" (AHE) [3], the "median and the interquartile distance", and the "sliding histograms" [ 1]. The "histogram transformation" and the AHE techniques make use of easily computed local context features to reassign each pixel's gray level during histogram equalization. On the other hand, the "sliding histograms" and "the median and the interquarti[e distance" involve image decomposition which splits each pixel into texture and background components which are then recombined using different weight factors.

The work presented in this paper is an investigation of a family of algorithms for color image enhancement. The enhancement of texture, the contrast of adjacent domains, and color saturation are considered.

2. Color Image Enhancement Algorithm

The color image enhancement algorithm proposed here is based on the RGB (red, green, and blue) color model. An image is decomposed into three primary color files (one red, one green, and one blue), and every pixel in each primary color file is further decomposed again into background and texture components. The algorithm for obtaining the background component is the median filtering. After decomposing an image into background and texture components, the new pixel values can be obtained by independently adjusting the texture and the background components.

© 1992 A C M 0-89791-506-2/92/0003/00328 $1.50

Page 2: Color Image Enhancement Kuei-Chun Chen - pudn.comread.pudn.com/downloads110/sourcecode/graph/texture... · 2008-04-13 · Color Image Enhancement Kuei-Chun Chen College of Computer

2.1 Two Image Components (Gray Images)

The idea behind the "two image components" algorithm is to artificially decompose an image into a background component, s, and a texture component, t. Then the contours and the contrast are manipulated by adjusting the texture component and the background component [ 1] [4]. Equation 1 presents the equation to obtain the new pixel value x.

x = a t + b s + c, where a, b, and c are constants. ( 1 )

The background component of each pixel in the image is defined to be the median value of the pixel's local neighborhood values (usually a 3 by 3 or 5 by 5 neighborhood with the pixel in question at the center). For example, if Pii is the value of a pixel at position (i, j) the background component for Pij based on a 3 by 3 neighborhood is given by:

In other words, the new pixel values are clamped at the boundaries.

2.2 Extension to Color (R, G, B) Images

In this article, each color pixel is represented by a 24-bit color value decomposed into 3 8-bit quantities, namely, red, green, and blue components (It, lg, I~). These three quantities determine the color of the pixel. A color is therefore simply expressed as a 3-element vector in (R, G, B) space. Equation 3 is converted to a vector equation (Equation 4) to allow us to manipulate color images.

T = I - S , where I is the original (R, G, B) vector of the pixel, and S is the background (R, G, B) vector. (4)

Finally, Equation 1 is also extended to vector form (Equation 5) for calculating the new color vector X.

s U = Med( Pi.lj.i,Pi.lj,Pi_l&l, Pij-l, Pij, Pi~-~, Pi+ l,j.l,Pi+l,j,Pi+l,i+l ).

where Med0 is a function calculating the median value of given numbers. (2)

X = A . T + B . S + C, whereA, B, and Care constant vectors, and A .T = (A r, Ag, A b) • (T , T 8, T b)

= (A r T,, Ag T~, A b Tb), similarly for B.S. (5)

The texture component, t, of each pixel is the difference between the original pixel value and the background value as determined by the median filter. Equation 3 shows the formula to obtain the texture component, t, given the original pixel value i and its calculated background component, s.

t = i - s , where i is the original pixel value. (3)

When using Equation 3, the new intensity value of a pixel might exceed the given intensity boundaries. If so, the new value x will be assigned the closest boundary value.

2.3 Influence of Weights

The weights (or weight vectors) are best adjusted interactively since different images require different adjustments. In a gray image, the weight a influences the texture component. The larger the weight a, the more emphasis on the texture component. On the other hand, the weights b and c control the brightness of an image. The histogram of an image is a good guide for changing the weights b and c.

The adjustment of the weight vectors A, B, C is an extension of the above discussion. The experiments discussed in this paper treat

ACM 30th Annual Southeast Conference 329

Page 3: Color Image Enhancement Kuei-Chun Chen - pudn.comread.pudn.com/downloads110/sourcecode/graph/texture... · 2008-04-13 · Color Image Enhancement Kuei-Chun Chen College of Computer

I (24-bit/pixel)

Red,Green,Blue Components

Median Filter

Background Component

Ir

* Ar

crl

f

i Ig~-- i

I

i f Inew (24-bit/pixel)

I

i

I Isb * Ab i

t

Cb

Weight vectors A = [Ar, Ag, Ab] (texture multiplier), B = [Br, Bg, Bb] (background multiplier, and C = [Cr, Cg, Cb] (histogram shifter).

M: Median Filter

Figure 1" Flow Chart of Color Image Enhancement

330 ACM 30th Annual Southeast Conference

Page 4: Color Image Enhancement Kuei-Chun Chen - pudn.comread.pudn.com/downloads110/sourcecode/graph/texture... · 2008-04-13 · Color Image Enhancement Kuei-Chun Chen College of Computer

each element in the weight vector individually, because the change of each primary color affects the hue, saturation, and brightness of an image.

Figure 1 shows the flow chart of the algorithm. The procedure starts from an image decoder converting an image (/) into three raw data files (lr, Ig, and Io). Then the algorithms of obtaining background components (Sr, Sg, and SD, texture components (Tr, Tg, and Tb), weighted adjustments, and clamping are performed on each raw data file. Finally, the resulting image (l,e w) is obtained from an image encoder containing the R, G, B components of each pixel.

3. Testing and Results

The algorithms are applied to gray-shade images first, and then extended to color images.

3.1 Testing on Gray-Shade Image

Figure 2 presents an original gray-shade image, its enhanced version, and their accompanying histograms. The background component was obtained by using median filtering with a window size of 3 by 3. The resulting image shows that edges are sharpened and the contrast of the image is improved, with no objectionable contours appearing. It is noted that the weight of the background component is always set to 1 in the experiments. However, as the constant c changes, the histogram of the image is shifted, and thus the brightness of the image is changed. In other words, the values of background component are changed as the constant c changes. After understanding the functions of these weights, a few observations are in order.

Referring to the resulting image, if the values of the background component are fixed, the larger the weight of

texturecomponent, the clearer the resulting image. However, if too many pixels of the resulting image are close to the boundary values, the resulting image will either be underexposed or overexposed. In summary, to apply the algorithm, the constant b can be fixed while adjusting the constant a and c based on the histogram analysis.

3.2 Testing on Color Images

From Figure 2, the experiment has verified the algorithm for gray-shade images. The following experiments apply Equation 3 and Equation 4 on color images.

Assume that a color is given as three arrays, namely R, G, B. Apply the median filter to each of these three arrays to calculate their corresponding background components. Then, reconstitute the background image using the background R, G, B arrays. The texture component is obtained by applying Equation 3, and the weight vector B is fixed at [1, 1, 1] in all experiments. Figure 3 gives the original and its enhanced image. The enhanced image applies Equation 4, where the constant vectors A is [5, 5, 5] and C is [0, 0, 0].

In the resulting image, the textures are clearer than those of the original image. Furthermore, the colors are more saturated than those in the original image. Figure 4 is another example. The enhanced image appears crisper than the original. Additional experimentation and adjustments of the weights can yield enhancements to suit the particular needs of the user.

4 Discussion

An important question is the following: how does one determine the weights A, B, and C? Because a pixel consists of three primary colors, the algorithm does not only deal with the brightness of the image.

The weights are image dependent. When

ACM 30th Annual Southeast Conference 331

Page 5: Color Image Enhancement Kuei-Chun Chen - pudn.comread.pudn.com/downloads110/sourcecode/graph/texture... · 2008-04-13 · Color Image Enhancement Kuei-Chun Chen College of Computer

Image Processing Display by Kuei-Chun Chert

Original 0 255

• .~. , , .~ . . ,~ , , .~ , . .~ ! , . , . . . . . . , . . . . . . . .

{

. . ~ • : :

.Ill Enhanced Image, Weights:a=8, b=l, c=O 255

Figure 2: Original and its Enhanced Image

332 ACM 30th Annual Southeast Conference

Page 6: Color Image Enhancement Kuei-Chun Chen - pudn.comread.pudn.com/downloads110/sourcecode/graph/texture... · 2008-04-13 · Color Image Enhancement Kuei-Chun Chen College of Computer

(a) Original Image

(b) A = [5, 5, 5]; B = [1, 1, 1]; C = [0, 0, 0]

F igu re 3: P e p p e r s - Or ig ina l and Its E n h a n c e d I m a g e

ACM 30th Annual Southeast Conference 333

Page 7: Color Image Enhancement Kuei-Chun Chen - pudn.comread.pudn.com/downloads110/sourcecode/graph/texture... · 2008-04-13 · Color Image Enhancement Kuei-Chun Chen College of Computer

(a) Original image

(b) A = [4.8, 4.8, 4.8]; B = [1, 1, 1]; C = [0, 0, 0]

F i g u r e 4 : F - 1 6 - Or ig ina l and Its E n h a n c e d I m a g e

334 ACM 30th Annual Southeast Conference

Page 8: Color Image Enhancement Kuei-Chun Chen - pudn.comread.pudn.com/downloads110/sourcecode/graph/texture... · 2008-04-13 · Color Image Enhancement Kuei-Chun Chen College of Computer

applying the algorithm, the histograms of the image will be stretched out, and the contrast

of the image is enhanced. However, according to the boundary intensities consideration, the larger the constant vector A, the more pixels will be at the boundary intensities. If too many pixels are clamped at the boundaries, the result will be an overexposed or underexposed image.

It is difficult to specify what are the best weights for a given color image. However, based on the experience obtained in doing this paper, the following observations are offered. When adjusting texture component, some experimentation is necessary to ensure that the texture is brought out to a satisfactory level without corrupting the original colors to an unsatisfactory degree. The hue and the brightness are changed when adjusting the background component, and the adjustments can be guided by the histograms of an image.

5. Conclusion

The algorithms for color image enhancement are based on the RGB color model. The proposed algorithms apply vector arithmetic and histogram equalization for enhancement.

Several observations are obtained from this paper. First, image smoothing filtering techniques can be used to evaluate the background component. Secondly, when the texture component is weighted, the fine detail of the image will be brought out. This is the basic idea behind the contour enhancement. There is no definitive formula for determining the values of the weights, and experimentation is necessary to ensure the textures of the image have been brought out to a satisfactory level. Finally, if the background component of an image is adjusted, the hue, the saturation, and the brightness of the image will be changed. The histograms of an image provide good guidance for adjusting the background component.

REFERENCES

1. Chochia, P. A., "Image enhancement using sliding histogram," Computer Vision, Graphics and Image Processing, 44, 1988, pp. 211-229.

2. Hummel, R. A., "Image enhancement by histogram transformation," Computer Vision, Graphics and Image Processing, 6, No. 2, 1977, pp. 184-194.

3. Pizer, S. M., Amburn, E. P., Austin, J. D., Cromartie, R., Geselowitz, A., Greer, T., Romeny, B. H., Zimmerman, J. B., and Karel, Z., "Adaptive histogram equalization and its variation," Computer Vision, Graphics and Image Processing, 39, 1987, pp. 355-368.

4. Scollar, I. and Weinder, B., "Image enhancement using the median and the interquartile distance," Computer Vision, Graphics and Image Processing, 25, No. 2, 1984, pp. 236-251.

ACM 30th Annual Southeast Conference 335