A Novel Approach for Contrast Enhancement using Image Classification and Subdivision based Histogram Equalization

In the field of image processing, contrast enhancement is a vital area to enhance contrast of images which are having poor contrast. Histogram Equalization (HE) is the method used to increase contrast in images. To improve contrast in images several HE methods persist. By determining the Probability Density Function (PDF) and Cumulative Density Function (CDF), HE expands the distribution of pixels. The overall brightness would be altered while the histogram equalization is being applied is a one kind of disadvantage. The drawback which is mentioned here can be avoided by, classifying the image based on intensity exposure and is divided into sub images based on the median value. To minimize the over enhancement, the sub images are clipped using the threshold value. Equalization can be done separately for each sub images, and the equalized sub images are combined to form a single image. Thus, to keep the brightness and to bring limitation in enhancement rate the classification and subdivision based HE method was proposed which equalizes the image. For color images, this method of equalization performs better than gray scale images. The simulation results for several test images are obtained using Matlab software tool. The results show that the entropy of the proposed method is compared with the standard HE method and it determines the amount of information available in the image. The proposed method provides better enhancement than other methods of equalization by controlling the enhancement rate. Improvements can be done by selecting the threshold values for clipping and intensity exposure. Contrast enhancement is applied in the areas of photography, medical imaging and video surveillance systems to enhance quality in images and the image


Introduction
In image processing, different devices such as cameras, electron microscopes, scanners, X-ray devices and ultrasound are used for taking images indifferent fields like medical, industrial, military, civil and security. Image processing deals to bring the enhancement in the visual aspect of image for human perception. Image processing is used in the certain areas of image enhancement, image sharpening, pattern recognition, noise removal etc.
Image enhancement is one of the important techniques in image processing which improves the contrast of low quality images. There are two methods for enhancing contrast in images. By finding out the contrast parameter directly, the enhancement is done for the direct enhancement method. The technique by which the pixels are distributed is being referred to as indirect method of enhancement. Most of the indirect methods make use of histogram modification techniques 1 .
The main aim of contrast enhancement is to bring improvement in the perceptual quality of images Keywords: Classifcation, Clipping, Contrast Enhancement, Entropy, Exposure, Histogram Equalization depending on the application 2 . Contrast enhancement refers to the amount of gray or color differentiation in digital images. Contrast of images is defined as the ratio between the brighter and the darker pixel intensities 3 .
Contrast enhancement plays an effective role in the enhancement of perceptual quality for computer vision, pattern recognition and in the processing of images. Depends on the light exposure, the contrast of an image would be poor or bright. Due to the atmosphere lighting conditions, the aperture size and the shutter speed, the contrast changes may be happened 4 . By enhancing contrast this can be avoided. In some scenario, the requirement would be to adjust the overall brightness of an image. The pertinent method to adjust contrast suitably is the histogram equalization technique. Histogram equalization are applied in many areas such as medical image processing, texture analysis and synthesis, and in speech recognition 5 . However, this HE changes the overall contrast and making the images seems unnatural. This can be eliminated by utilizing different methods of histogram equalization which enhance the brightness level of an image 6 .
A method called Brightness preserving Bi-Histogram Equalization (BBHE) preserves the average brightness by increasing the contrast. In BBHE, the histogram of image can be segmented into sub histograms by calculating mean value. One of the sub image having values less than or equal to mean and the other one having values greater than the mean value. The two sub images are equalized separately and combined to form single image 7 .
The other method named Dualistic Sub Image Histogram Equalization (DSIHE) is same as BBHE but in some way it is better than BBHE in the way of maintaining the brightness in images. In this equalization, it also divides the histogram into two sub histograms based on median value and then equalization is done independently 8 . The image enhancement by adjusting the contrast mechanism facilities are not possible with these method and thereby the new technique of histogram subdivision is introduced which maintain the brightness level by limits the enhancement rate. Contrast enhancement finds application in medical imaging system, video surveillance system and digital photography 9 .
This paper is organized as follows. Section 2 describes image classification based on intensity exposure. Section 3 describes the image subdivision and Equalization. Section 4 describes the simulation results and Section 5 gives the conclusion.

Image Classification based on
Intensity Exposure

Definition of Histogram
The allocation of the pixel intensity value of an image depicts the histogram of the given image. It can be plotted by taking into account the pixel intensity and the absolute number of pixels in an image. This is also expressed 1 as in the Equation (1), Where j is the gray level distributed and n j is the number of pixels in the image 3 .

Exposure Threshold Calculation
Thresholding is the simplest way of dividing an image. This can be done by using a measure of intensity known as exposure. If the light exposure is poor, the images are being referred as under exposed images. If the light exposure is good, then the images are being classified as over exposed images. Low contrast images which are having low gray levels are named as under exposure. Images with maximum contrast and having higher gray levels are named as over exposed images. For the given image, the normalized exposure value will be in the range between 0 to 1. The under exposed images are having this value in the range between 0 to 0.5. The over exposed images are having this value in the range between 0.5 to 1. The equation (2) conveys the way to calculate the exposure of a given image as, Where Levels is the total number of gray levels and h(j) is the histogram of image 10 .
Another parameter denoted as Xa which splits the image as over and under exposed sub images is obtained from (3).

Computing Median
After calculating X a the two sub images are divided into four sub images based on median value. The median can be calculated using

Clipping the Image Histogram
Clipping the histogram of an image avoids excessive enhancement by restricting the enhancement rate. This process of clipping is achieved by choosing an appropriate clipping threshold. The larger values in the histogram are to be clipped. Threshold can be computed as the mean of gray level occurrences in the image 10,11 . The formula for clipping threshold is

Histogram Subdivision and Equalization
Histogram subdivision splits the histogram of an image into two sub images named I lower and I upper based on intensity. The two sub images in the range 0 to X a and X a +1 to Levels-1 are divided into four sub images. The PDF of these four sub images are P Ll (j), P Lu (j), P Ul (j), P Uu (j) respectively 11 .
Where N Ll , N Lu , N Ul , N Uu are the total number of pixels in the four sub images 11 . After calculating the probability density function, CDF can be calculated separately for four sub images from 0 to L-1. C Ll (j), C Lu (j), C Ul (j), C Uu (j) are the corresponding CDF of the four sub images 11 .
Next step is to perform equalization for all the four histograms of sub images individually. For equalization there is a need to compute transfer functions for these sub images. F Ll , F Lu , F Ul , F Uu . F Ll is are the transfer functions of four sub-images which are obtained by multiplying the lower median and the CDF C Ll . F Lu is calculated by adding the lower median and the exposure and multiplying by the CDF C Lu . In the same way F Ul and F Uu are calculated by taking upper median and upper CDF 11 . Finally the four sub images are combined to form a single image.

Image Classification and Subdivision based HE
The steps involved in image classification and subdivision based HE is as follows • Compute the histogram h(j) of an image.
• Calculate exposure and threshold parameter X a .
• Calculate the median value X ml and X mu based on the parameter X a . • Compute the clipping threshold T c and segment the histogram. • The given image histogram is divided into four subhistograms depends upon the exposure value. • Equalize the four histograms independently using the transfer function determined. • Finally combine the four sub images into one image.

Simulation Results
The determination of the rate of image enhancement is being calculated by correlating the histogram equalization method with the classification based HE. A standard cameraman as test image is shown in Figure 1(a) along with the histogram as in Figure 1 The color conversion models are being used to perform histogram equalization with the color images. The simple model for converting a color to gray scale image is R = G = B = (R+G+B)/3. The other standard models such as YCbCr, NTSC, YUV can also be used to convert a color to gray scale image. The enhancement task can be applied to only luminance part, since the majority of the information would be available in the luminance part rather than Cb and Cr. These channels are not modified and can be used as it is to produce a color image again with better enhancement. The proposed method also using this approach to enhance color images. For color images, the test image, image after HE and the Classification based HE are shown in Figure 4 and 5. The simulation results are correlated by using a quality measure called entropy. The average amount of information content in an image can be defined by a measure of entropy. The determination of entropy gives the average information present in the image in bits per pixel 12 . In this section, the entropy results of HE and the classification based HE are correlated and the results are tabulated. Entropy is determined using (12) as Where P(u) is the PDF of a image at particular intensity u and L is the total number of gray intensity levels in the image 10,11 . Maximum value of entropy indicates that maximum information content is there in the image. The entropy results of HE and classification based HE are compared and is shown in Table 1.

Conclusions
In this study, an image can be classified as less and highly exposed images based on the value of exposure. Exposure and median calculation subdivides and equalize the sub images which enhance contrast in images and limits over enhancement. The entropy results show that proposed method provides maximum information which is closer to the original image. Compared with HE, the proposed method provides better enhancement and the image looks natural. Image classification and subdivision based HE method shows that it performs better than other HE methods in the way of maintaining brightness.