Color Image Enhancement Based on Modified Contrast Limited Adaptive Histogram Equalization

DOI : 10.17577/IJERTV2IS120928

Download Full-Text PDF Cite this Publication

Text Only Version

Color Image Enhancement Based on Modified Contrast Limited Adaptive Histogram Equalization

Murtaza Saadique Basha 1 and M. Ramakrishnan 2

1 Research Scholar, Computer Science & Engg., Manonmaniam Sundaranar University, Tirunelveli, Tamil Nadu, India

2 Professor & Head, Department of IT, Velammal Engg. College, Chennai, Tamil Nadu, India

Abstract

Poor contrast is the main problem for color images. Contrast of an image often gets degraded due to faults in image acquisition devices, transmission errors, poor lightning conditions, power interference, etc. Hence these images need enhancement. Contrast enhancement using Histogram Equalization is well suited for grey level images whereas for color images, it is a tedious one as color image contains more than one channel. In this paper, enhancing contrast of color images using modified contrast limited adaptive histogram equalization method is proposed. First the image is decomposed into R, G and B components. G component of the color image alone is taken for enhancement. By calculating Local Contrast Modification (LCM) function and objective function, a decision is made whether to increase or not the value of G value for a pixel in an image. Little amount of contrast stretching is also performed on the image. It is observed that modified CLAHE preserves brightness, enhances the contrast of the input image and produces natural looking output images.

  1. Introduction

    Image enhancement is the process of improving the visual fidelity of an image. This process does not increase the inherent information. But it does increase the dynamic range of the chosen features so that they can be detected easily. This process includes those techniques that enhance the recognizability of objects in an image. The goal is to enhance the view for the humans[1]

    It accentuates or sharpens image features such as edges, boundaries or contrast to make a graphic display more helpful for display and analysis. This topic remains very important because of its usefulness in virtually all image

    processing applications. Gray scale histogram equalization is the simplest and most effective way of contrast enhancement. For a given gray scale image, its histogram is defined as a relative frequency of an intensity of the range 0 to 1. The gray scale histogram equalization can be performed easily by using cumulative histogram.

    Jiang Duan and Guoping Qiu [2] proposed a color image enhancement method based on histogram processing. Given a grey scale image I with grey levels in the range [0, L], its normalized histogram is a discrete function H(l)=nl / n, where l is the lth grey level, nl is the frequency of occurrence of the corresponding grey level and n is the total pixel population in the image. P.Kanna et al [3] proposed a contrast enhancement method of sports images using two approaches viz. histogram equalization and enhancement based on fuzzy rule. Modified sigmoid function is also used in their work to enhance contrast. Chitwong et al [4] proposed a contrast enhancement method for minimum mean brightness error from histogram partitioning. First the image is separated by class by calculating threshold value and each class histogram is equalized. Blair Silver et al [5] proposed an image enhancement method using logarithmic transform of coefficient histogram shifting. In this method, first the image is transformed using DCT, Fourier or other transformations and the logarithmic value of magnitude coefficients are calculated. Soonger- Der et al [6] proposed a contrast enhancement method based on minimum mean brightness error bi-histogram equalization. In this method, AMBE for each of the threshold level is calculated. The ultimate goal of this method is to allow maximum level of brightness preservation in bi-histogram equalization to avoid unpleasant artifacts and unnatural enhancement.

    In this paper, a new method for enhancing contrast of the color image is proposed. The proposed method is an extension of adaptive histogram equalization method. Generally images would be in RGB color space and the image is

    decomposed into three color components. R and B components are kept as such whereas G component alone is enhanced. The enhancement is based on calculated LCM and objective function. Little amount of contrast stretching is also performed. Finally the image is reconstructed with unchanged R, B components and enhanced G components. The paper is organized as follows : section describes introduction and literature survey about image enhancement process. Section 2 describes various histogram equalization based image enhancement techniques. Section 3 provides proposed method, section 4 with results and discussion and section 5 with conclusion.

  2. Histogram based Image Enhancement

    Few problems of image are related to the type of capturing device where as other problems are dependent on the environment conditions under which the image was captured. For the later problem, the time required to correct the effected pictures is a big issue. Several methods have been developed to enhance the contrast of an image. One of the most popular methods is histogram equalization. The basic idea of HE is to find the intensity transformation such that histogram of transformed image is uniform. Suppose for an image f(x,y) and its histogram h(i), we have accumulative function of h(i) as

    i

    i

    c(i) o h(t) dt

    It can be proved that such a transform makes the variable y=(ci) follows a uniform distribution. Thus for a 256 gray level image, histogram equalization can be performed by the

    Histogram Equalization method works fine and it also preserves brightness to some extent, the output images does not look natural [8]. Images of consumer electronic products are unacceptable if they are unnatural [9].

    Regarding color image enhancement, the methods are also based on HE. However, color images are not enhanced in the same way the gray- level images are enhanced as the former contains various properties. These properties include luminance or intensity, saturation and hue[12]. Color spaces such as HSV, HIS, CIELUV and CIELAB were conceived based on these three properties. Moreover working on these color spaces, especially in LHS needs a solution to handle gamut problem [12].

    Many histogram based methods have been proposed to decompose an image into sub images by using statistical measures [11]. These methods aim to preserve the brightness in the sub-images. There are certain methods where the focus is not to maintain brightness, to have natural appearance in sub images[8]. This can be seen as the minimization of within-histogram class variance where this variance is the total squared error of each histogram class[14].

  3. Modified Contrast Limited Adaptive Histogram Equalization

    The noise problem which is prevailing in the traditional adaptive histogram equalization can be reduced by limiting the contrast enhancement in homogenous areas. This improved version of adaptive histogram equalization is said to be Contrast Limited Adaptive Histogram Equalization (CLAHE). This method works by adjusting the

    equation

    f 256 * c( f (x, y)) m

    where n is the

    intensity values of the image. CLAHE divides the image into small portions and each portion is said

    to be one tile.

    total number of pixels in the image.

    For gray-level image enhancement, several methods based on HE have been proposed. Apart from various advantages, HE does not maintain the brightness of the input image on to the output image. This drawback makes HE techniques ot suitable for enhancing consumer electronic products such as TV[7]. For consumer products, maintaining original brightness is the essential one to avoid the production of artifacts in the output image [8][9].

    To vanquish the above problem, various classical HE techniques have been proposed. Such techniques first decompose the input image into two sub images and then perform HE on each sub image independently. This method is said to be Bi- Histogram Equalization [10]. Though Bi-

    Color images are often represented in RBG color space and CLAHE is applied to each component of the RGB color space such as r, g and b individually. For the resultant image, all the components are combined. It is observed from the experimental results that the output image is corrupted and it lacks in human sense of color. Since adaptive histogram equalization is applied to all the channels, the results get corrupted.

    where n is the size of the image, f(x,y) indicates the product of reflectance and intensity values and m is the mean for the whole image. The standard deviation is calculated using

    1

    1

    n1 n1

    m ( f (x, y) m(x, y))2 n n x0 y0

    Fig. 1 Original Image Fig. 2 CLAHE- All channels

    3.1 Applying CLAHE to only G Component

    To avoid the above problem, we applied CLAHE to only green component and other two components, viz. R and B are kept unchanged. Since modified CLAHE method is using adaptive histogram equalization technique, number of small regions (tiles) of an image is considered. Two element vectors of positive integers represent the number of tiles, M and N. The minimum tiles should be atleast two and the total number of tiles of an image is equal to M * N.

    The overall procedure is as follows : The input image is read first. Two parameters viz. Enhancement Parameter (Ep) and Best parameter (Bp) is used. Bp is the best value for the enhancement parameter EP. Then enhancement function for Bp and its fitness function are called. The enhancement function for the enhancement parameters Ep and its fitness function is calculated using LCM and objective function. Then the enhancement function for p and its fitness function are calculated. If Ep is greater than Epbest, then p is assigned to pbest and its fitness value. Then enhancement parameter is incremented and again the whole process is repeated till Ep become 1. The image is reconstructed with old R, B components and new G components. Finally the adaptive histogram equalization is applied with contrast threshold value and the resultant image is enhanced image.

    The transformation function is calculated using the equation

    T E.M

    where E is the enhancement parameter and its value is between 0 and 1 and M is the global mean of the image.

      1. Objective Function

        This function is based on entropy of the image, sum of edge intensities and number of edge pixels. It is observed that enhanced image has more number of edge pixels and higher intensity value at edges than the original image.

        F (I ) log(log( E(l ))) n _ edgels (Is ) H (I )

        g s M N s

        where I g is the green component enhanced image.

        The edges and edgels are determined by using

        I

        I

        Sobel edge detector. E(ls ) represents the sum of M x N pixel intensities of Sobel image edge ,

        s

        n_edgels indicates the number of pixels whose

        intensity value is higher than threshold value used in Sobel edge image.

      2. Contrast Stretching

        Finally we apply contrast stretching to the output image so that overall visibility of the image is improved. This process depends on the intensity value of an image [15]. For gray level images, contrast stretching for each pixel is calculated using the equation

        3.3 Local Contrast Modification (LCM)

        For local contrast modification, mean and

        Pout

        (Pin

        c) (b a) a

        (d c)

        standard deviation of the whole image is used. The mean value is calculated using the expression

        1

        1

        n1 n1

        m f (x, y)

        n n x0 y0

        where Pout is the normalized pixel value, Pin is the current pixel value, a is the lower pixel value, b is the upper pixel value, c is the lowest pixel value in the input image and d is the highest pixel value in the input image. The above equation is modified for G component.

    1. Experimental Results

    The input images used are girl, building and industry. The appropriateness of the proposed method is assessed using PSNR for each input image. PSNR is used to evaluate and compare compression and segmentation algorithms [13]. As the first step towards our method, the given input images are decomposed and only G component alone is taken for experiment. The following figure represents the G component of three input images.

    And also white color of the output image has been modified to light pink color. The experiment is conducted by modifying the clip limit to 0.002. The resulting image looks as below.

    Fig. 4 Output image with 0.005 clip limit

    Fig.5 Output image with 0.002 clip limit

    Fig. 3 G component of three input images

    Modified CLAHE is applied to these three sub images, one after another, with varying mean and standard deviation values. The mean for the girl image is calculated with n values as 423 and 1683. The standard deviation of the girl image is

    117.099. With these input values, the enhancement process is initiated. For each of the step, objective function values are used to determine whether enhancement is needed or not.

    CLAHE works by using adaptive histogram equalization which enhances the contrast of the gray scale image. Here we are using G component instead of gray level values for adaptive histogram equalization. Implementation of CLAHE is done by tiles (small parts of the image) and not on whole image. Hence it is important to mention the number of tiles for the input image and the minimum value is [8 8] which indicates rows and columns. Here we are using [20 20] for better enhancement. The next parameter that needs to be assigned is clip limit. This is a real scalar value in the range 0 to 1. This value specifies a contrast enhancement limit.

    A positive integer is used to specify the number of bins of histogram which is to be used for

    Contrast enhancement of the output image is moderate. It is also soft and vivid. Again the output image is greenish but not like the image with 0.005 as clip limit. There is no modification in white color and it is same like input image. But grey color has been modified to pink color. The experiment is continued with clip limit as 0.001. The purpose of modifying clip limit is that it is the important parameter for image enhancement using adaptive histogram equalization. The figure 6 is good interms of visibility and brightness. The image is also very natural. Enhancement is also good. White color of the image has not been modified and it is same like input image. The shadow area is grey as like the normal image. The experiment is continued with 0.0001 as clip limit and the output image is shown in figure 7.

    building a contrast enhancing transformation. The higher values will result in greater dynamic range at the cost of lower processing speed. The default value for this parameter is 256 and for our experimentation, we are using the default value. So we have taken No. of tiles as [20 20], clip limit as

    Fig. 6 Output

    image [0.001] clip limit

    Fig. 7 Output image [0.0001 clip limit

    0.005 and number of bins are 256. The contrast level of the output image is very high and it is very bright. Since the green component of the image dominating, the output image is little bit greenish.

    This clip limit (0.0001) is the best limit for contrast

    enhancement of color images. By keeping the clip limit same, the experiment is continued by maximizing the number of tiles of the image. In all

    our abov experiments, the No. of tiles is [20 20]. This has been modified by adding value 20 for each iteration and the resulting output images are presented below.

    Fig. 8 Output images with [40 40], [60 60] and [80 80]

    It is observed from the above images that number of tiles with [20 20] produces natural, soft looking, contrast enhanced images whereas the output images get corrupted when the tiles limit increases. Moreover, output image with [60 60] as tiles limit produces green artifacts in the neck region of the girl image which is not available in the actual image. Tiles limit with [40 40] is over enhanced and the contrast is too high. Tiles limit with [80 80] produces unrealistic and blurred like image. Hence it is concluded that the tiles limit [20 20] is the best one for image enhancement. The same experiment is continued for other two images viz. industry and building. The output images with [20 20] as tiles limit are further enhanced by using contrast stretching process. It is a common operation for slight enhancement of images. Again, contrast stretching is applied only to the G component of the resultant image and finally the enhanced image is produced by combining enhanced G component and old R and B components.

    For each image green pixel value, new normalized value is obtained by using the current green pixel value, lower green pixel value in the image, upper green pixel value in the image, lowest green pixel value and highest green pixel value in the image. For our girl image, the parameters contains the following values. 0 is the lower green value and 255 is the higher green value. The following images are the output of contrast stretching process. The images are enhanced one with good natural look and soft. The effectiveness

    of this modified enhancement process is evaluated using PSNR (Peak Signal to Noise Ration) values.

    PSNR Values

    HE

    DSIHE

    BBHE

    Modified CLAHE

    Girl

    13.66

    18.34

    18.52

    24.01

    Industry

    11.39

    14.98

    16.76

    18.99

    Building

    11.63

    14.88

    15.08

    19.34

    Table 1 PSNR values of three images

    From the above table, it is clear that this method works fine as the PSNR value is high. If the PSNR value is high, the method is best. After analyzing the data in the table and visually observing the processed images, it is concluded that modified CLAHE produce images with good quality than other methods with respect to PSNR calculation. It is also concluded that for modified CLAHE preserves brightness and produces natural looking images.

    1. Conclusion

      In this paper, modified Contrast Limited Adaptive Histogram Equalization technique for image enhancement and brightness preserving is proposed and tested. The experimental results are tabulated and it shows that HE method enhances contrast with lesser amount. On the other hand, DSIHE and BBHE methods perform better in enhancing contrast and preserving brightness. But PSNR values of modified CLAHE is high when compared to HE, DSIHE and BBHE. Modified CLAHE is not directly applied to RGB components. RGB Image is decomposed to three separate components and only G component is taken for enhancement. The time and space complexity of our method comply with real time application requirements.

    2. References

  1. Cetin, M.; Karl, W.C.; Castanon, D.A., "Feature enhancement and ATR performance using nonquadratic optimization-based SAR imaging," Aerospace and Electronic Systems, IEEE

    Transactions on , vol.39, no.4, pp.1375,1395, Oct. 2003

  2. Jiang Duan and Guoping Qiu, Novel Histogram Processing for Colour Image Enhancement, Proceedings of the Third International Conference on Image and Graphics (ICIG04) 0-7695-2244- 0/04

[3]P. Kannan, S. Deepa and R. Ramakrishnan, Contrast Enhancement of Sports Images Using Two Comparative Approaches, American Journal of Intelligent Systems 2012

[4]N. Phanthuna, F. Cheevasuvit and S. Chitwong, Contrast Enhancement for Minimum Mean Brightness Error From Histogram Partitioning, Proceedings of Annual Conference ASPRS,

Baltimore, 2007

  1. Blair Silver, Sos Agaian and Karen Panetta, Contrast Entropy Based Image Enhancement And Logarithmic Transform Coefficient Histogram Shifting

  2. Soong-Der Chen and Abd. Rahman Ramli, Contrast Enhancement using Recursive Mean- Separate Histogram Equalization for Scalable Brightness Preservation, IEEE Transactions on Consumer Electronics, Vol. 49, No. 4,

NOVEMBER 2003

[7]R.C. Gonzalez, B.A. Fittes, Gray-level transformations for interactive image enhancement, Proceedings of the Second Conference on Remotely Manned Systems

[8]David Menotti and Arnaldo de A. Araujo and Gisele L. Pappa, Contrast Enhancement in Digital Imaging using Histogram Equalization,

[9]D. Menotti. Contrast Enhancement in Digital Imaging using Histogram Equalization. Phd thesis, UFMG, Apr. 2008.

[10]Y.-T Kim, Contrast Enhancement Using Brightness Preserving BiHistogram Equalization, IEEE Transactions on Consumer Electronics,

Vol.43, No.1, pp:1-8, 1997

[11]Y.Wang, Q.Chen and B.M.Zhang, Image Enhancement based on Equal Area Dualistic Sub-

image Histogram Equalization Method, IEEE Transactions on Consumer Electronics, Vol.45,

No.1, pp:68-75, 1999

[12]N.Sarif Kumar and C.A.Murthy, Hue- Preserving Color Image Enhancement Without Gamut Problem IEEE Transactions On Image Processing, VOL.12, December 2003

[13]Majid Rabbani and Paul W.Jones, Image Compression Techniques for Medical Diagnostic Imaging Systems, Journal of Digital Imaging Volume 4, Issue 2, pp 65-78

[14]T.Kurita, N.Otsu, N.Abdelmalek, Maximum likelihood thresholding based on population mixture models, Pattern Recognition, Volume 25,

Issue 10, October 1992

[15]Amine Mahiddine, Julien Seinturier, Jean-Marc Boi, Pierre Drap and Djmal Merad, Performances Analysis of Underwater Image Preprocessing Techniques on the Repeatability of SIFT and SURF Descriptors, WSCG 2012 Communication Proceedings

Leave a Reply