Image Contrast Optimization using Local Color Correction and Fuzzy Intensification

— Global image enhancement techniques are used to enhance contrast in images but these techniques are found to be under-enhanced or over-enhanced in differently illuminated regions of the image. Local color correction methods work on local pixel regions to optimize the color contrast enhancement but they also have been found to show a lag while covering pixel regions which are overexposed, compared to those which are underexposed causing local artifacts. In this work, we overcome the shortcomings of both the local color correction and global color correction. This method uses local color correction in the Hue Saturation Luminance (HSL) domain, and fuzzy intensification operators are used to control the color fidelity of the local color corrected images. Thus, is able to sort out the problem of overexposed and underexposed regions and provide optimized contrast enhancement in colored images. Several experiments have been performed to analyze the performance of the proposed method and feasibility as compared to existing techniques. Performance parameters such as Mean Square Error (MSE), Peak Signal to Noise Ratio (PSNR), Structural Similarity Index Measurement (SSIM) and Naturalness Image Quality Evaluator (NIQE) is evaluated and the comparison with some existing techniques of contrast enhancement of color images is performed. The obtained result have good contrast and approve the better performance of the proposed method in support of the quantitative measure of perceptual appearance of the processed images and low computational time.


I. INTRODUCTION
Image enhancement is one of the most important steps in any image processing algorithm whether it is pattern detection, image classification or biometric recognition. Most of the computer vision based algorithms consist of image quality enhancement steps at some stages. The image quality is also strongly affected by the image acquisition device's quality. A higher-resolution camera is needed for better image quality, which can significantly increase the system's cost. Several methods of image enhancement exist which can improve the characteristics of the images to acceptable level even if they have been acquired with low quality cameras. Considering the factors like domain, environment, quality of images etc. different mathematical arbitrations can be applied on the images to improve their characteristics. Image correction may include various steps such as saturation, sharpness, denotation, tonal shift, tonal equilibrium and contrast correction. Even from the perspective of humans, the perceptibility of images is dependent on the contrast of the images. Contrast generally refers to the difference between different pixel levels based on their intensity. Compared to the other objects and the context, the difference between visual properties makes the parts of images distinctive. The sensitivity to human contrast depends on the spatial frequency; thus, when determining the contrast the spatial content of the picture should be considered. Local contrast is defined in accordance with the local luminance and background lights as a function of every point in the image as well as in every frequency band [1]. The variation in color and brightness of the element and other items within the same field of view is calculated to provide the visual perception of the real world.
The techniques of contrast enhancement can usually be divided into two categories: direct and indirect. Direct methods define a function based on the contrast whereas indirect methods don't define a specific contrast function. The direct and indirect methods are categorized further as spatial methods in which pixel level operations are performed and frequency domain methods operating in transformation of images [1]. Color image enhancement poses more challenges as compared to a grayscale image enhancement because of the presence of three color intensity levels viz. red, green and blue as compared to a single intensity level in case of grayscale images. Thus techniques like histogram equalization (HE) which gives a fast image enhancement with a grayscale image cannot be directly used for color image enhancement. Histogram Equalization, however, is not widely used in consumer electronics because it can lead to irregularities such as changes in excessive brightness, vibration and saturation of light [2]. One of the popular techniques from the family of general histogram modification techniques are gamma correction techniques accomplished by using a particular adaptive parameter "γ", defined as below [3]: where "l max " is the maximum intensity of the input.
The gamma curves illustrated in Fig. 1 show that " γ >1" has exactly the opposite effect as those generated with "γ < 1". Global correction methods like gamma correction suffer from this problem of uneven distribution of pixel color intensity.
Many algorithms concentrate on improving the image quality, but usually lead to an unnatural appearance such as confusion and objects with light sources. Many others therefore seek to reduce over-improvement at the cost of accuracy [4]. Since traditional histogram algorithms can result 115 | P a g e www.ijacsa.thesai.org in over-enhancement, several algorithms have been suggested, including limitation of brightness and contrast. Maintaining efficiency in applications requires the preservation of light. The preservation of luminosity in areas of diminished intensity, such as dark regions, is disadvantageous to detailed enhancement in uniform illumination images [4]. An improvement over the traditional HE is the brightness preserving dynamic histogram equalization (BPDHE) algorithm, which maintains mean brightness of the image by taking the same mean brightness of the output image as that of the input image [5].
In local enhancement techniques, transformation of image pixels is dependent on neighboring pixel information. A small window is moved over every pixel of the image and only those blocks of images are enhanced, whose pixel falls under the window. Local information is preserved and brightness is improved for future use. Therefore contrast ratio can be smoothly improved in all parts of the image. Global knowledge about luminosity is missing and local objects can be created. Compared to the global enhancement methods, code complexities of these methods are high. Hybrid strategies provide global and local strategies for development. Here, adjacent pixels and global image information are taken into account during the transformation [6].
The need to improve the image visual quality that is produced under intense lighting conditions resulted in the development of an overexposure and underexposure fusion of blurred enhanced images. This can be done with the Gaussian membership function by means of a smooth image creation process. For further optimization, Discrete Wavelet Transform (DWT) based fusion of these fuzzy enhanced images is possible. The improved Fuzzy algorithm reduces noise, preserves information and improves image contrast [7]. Nonlinear and knowledge-based fuzzy techniques are feasible, creating a new technique for the enhancement of contrast.
In a dehazing based enhancement model suggested by Dong et. al [8], a photometric negative of the input image resembling hazy image has been obtained. The enhancement is then achieved by dehazing the hazy image effects, but this approach had issues with blocking artefacts, and the images produced seemed artificial or sketchy. Retinex based methods have been developed which model human vision of color and luminance. Adaptive Multi Scale Retinex (AMSR) achieves better illumination and tone fluency by adding weights on the single scale retinex of the input image [9] over the various retinex methods such as Single Scale Retinex and, multi scale retinex.
Differential grey level histogram for Color images (DHECI) [10], generates two differential grey level histograms one for the intensity and the other for saturation level. The enhanced image is obtained as a weighted sum of these two levels controlled by a human color perception parameter.
Retinex based methods do not consider the noise factor while increasing the luminosity of the images. The joint denoising and enhancement(JED) technique [11], is an integrated approach providing both enhancement and denoising by combining both the luminance map estimation and the reflectance map in sequential steps, thus able to remove noise and obtain better enhancement.
In this work, a novel framework for an optimized image enhancement has been presented, which is modeled to include both the properties of local enhancement as well as global enhancement. Local color correction provides the local contrast enhancement and then fuzzy intensification operators are used to provide global color enhancement. The upcoming sections consist of literature review of previous work done in the field of color image enhancement in Section 2, description of proposed methodology and algorithms is presented in Section 3, results and discussion is presented in Section 4 and conclusion is presented in Section 5.
II. LITERATURE REVIEW Chun-Tsai et al. [12] suggested to use the fuzzy logic concept and illumination analysis to correct color images of face. The images are divided by a fuzzy logic classification scheme into back lit, normal lit and front lit images. Lighting has been evaluated for the distributions of image illumination, over the input image. There are a growing array of peaks and valleys. The properties of this piecewise linear transformation are these peaks and valleys. The results showed that in comparison with other available methods, the method is efficient and effective.
The automated self-contained method for determining contrast gain function for automatic contrast improvement was suggested by Iyad F. Jafar et al. [13]. Contrast gain functions abbreviated by FACE(fuzzy adaptive contrast enhancement) adapted and modified smoothly in conjunction with the neighbourhood characteristics of the pixels, resulting into low, medium, and high activity gain. The Gain Function is defined by local image statistics, Fuzzy C-means (FCM) clustering and a Fuzzy Inference System (FIS) based on rule-based processing on a wide spectrum of pictures. In comparison with other methods, the process produced significantly improved contrast images and less artifacts.
A novel fusion-based technique was introduced by Amina Saleem et al. [14], to improve both grayscale and color 116 | P a g e www.ijacsa.thesai.org images. The results show that the proposed algorithm is effective in strengthening local and global contrasts, reducing saturation and over-improvement while retaining the original imagery. The fusion-based enhancement method is ideal for non-real -time image processing applications that require high-quality images.
Mohan Liu et al [15] introduced a new conceptual contrast metric which follows the traditional background and foreground energy model and the energy used to calculate the technological luminance contrast instead of the maximum, minimum, and average luminance intensities. The authors also demonstrate that the chrominance information can also be used to assess the contrast quality of images. The technical measure of the luminance contrast is mapped onto a perceptual-based measure using a human attention model. This method yields massive enhancements relative to the state-of-the art, but at the expense of increased complexity.
A new improvement approach to both images and videos was introduced by Shih-Chia Huang et al [16]. In addition to probability and statistical inferences, the histogram analysis gives the special knowledge of a single image. The weighting distribution in the second step is used to smooth the fluctuating tendency and thereby avoid the creation of objects which are unfavorable. The picture contrast automatically improved by a smoothing curve in the third step. For multiple frames in a video set, writers used temporal information to reduce the computation time. The entropy model was used to decide if the transformation curve would be modified or not depending on the variation in the information material.
V. Magudeeswaran et al. [17] proposed the Fuzzy logical histogram equalization method which provided, the enhanced image contrast with the inaccuracy of gray-level values by the use of numerically produced fuzzy data. It is an efficient way to improve performance in comparison with classic flat histograms. The color quality, brightness and image contrast can also be enhanced automated. The approach suggested, efficiently removes the washed-out and adverse objects caused by many current approaches.
Jeyong Shin et al. [18] proposed a new histogram-based approach of enhancing contrast, to maintain the position of the initial histogram and to improve global contrast. The question of optimization is introduced where the histogram incorporates possible local conditions in order to increase the contrast to the location. The method makes a smooth change in comparison to different histogram profile images by creating clearer comparing images of local histograms.
Chin Yeow Wong et al. [19] used optimized chosen hyperbolic tangent profiles to eliminate unnecessary artifacts. A series of experiments were conducted to improve color image quality using qualitative evaluations and quantifiable measures such as entropy, gradients, colorfulness and saturation. The pipeline approach has been stressed as increasing image quality, enhancing contrast and sharpening color images, without losing color and saturation. The method is easy to use and sufficient for systematic color image preprocessing.
Zohair Al Ameen [20] developed a system using tuned blurred intensification operators to rapidly filter bad photographs taken in a dusty weather. The processing of images was effective in producing appropriate colors and fine details, as has been showed by tests on different images.
A new method to enhance image contrast based on local histogram equalization was implemented by M. Shakeri et al [21]. Originally, the image was divided into several subimages with a clustering of the brightness values, where clusters are calculated using an automatic method based on histogram analysis of the two images. Every cluster of the image brilliance levels represented a spectrum in the histogram which was added to each histogram segment with the transfer feature introduced; the improved image obtained across the segments.
Zohair Al-Ameen [22] introduced a new, flexible stretching technique based on the concept of linear contrast to increase the color image contrast with few calculations. The method is tested with a variety of real low-contrast color images compared to four technical improvement techniques and three prominent IQA (Image quality Analysis) measures, measure the quality of the results collected. Technique received satisfactory results by obtaining results, as it produced natural contrasting pictures without visible features and by rating the highest precision, it outperformed comparative techniques.
The perceptively controlled enhancement of contrast and color in photographs using JND transform and color continuity was proposed by Long Yu et al. [23]. The JND (Just Noticeable Difference) transformation was done to obtain a JND map representing HVS response. Perceptual GEMs have been paired with JND transform to enhance contrast, color reproduction and images. Experimental results showed that the method effectively improves color and darktone low-contrast images.
The new technique of fugitive contrast enhancement, which A. A. Salih et al. [24] suggested, is designed to improve individual regions that use the Gaussian membership function (GMF) as their main tool in their fluxation processes. Their method has successfully improved low-contrast and uniform picture lighting with the highest performing and quantitative picture analysis.
Magudeeswaran Veluchamy et al. [25] used improved adaptive gamma correction and histogram equalization based image enhancement on benchmark test images with subjective and objective measures. The method represents natural colors more accurately and outperformed the other existing enhancement methods in terms of entropy, colorfulness and histogram utilization efficiency and having least annoying artefacts.
Syed Zaheeruddin et al. [26] proposed an improvement in contrast in uniform illumination images by the means of homographic decomposition. The proposed method results in better luminosity, contrast and detail, compared to other common methods.
To reduce over enhancement and detail preservation, Subramani, B., et al. [27] proposed quadrant dynamic clipped 117 | P a g e www.ijacsa.thesai.org HE method with gamma correction. Author partitioned the histogram of the input image into four sections using its mean value and applied histogram clipping and gamma correction to control the color enhancement rate. All clipped sub histogram is equalized independently and then combined together which produces an enhanced image. Experimental results shows that proposed method performed well in terms of preserving entropy, colorfulness, saturation, and obtaining uniform degree enhancement.
In order to improve the lightness and contrast in colored images G., Hazim et al. [28] introduced the Fuzzy Logic Based-on Sigmoid Membership Function (FLBSMF). The lightness component was covered by the algorithm only using the YIQ color space without changing colors. The results of the experiment showed a better color image and good average entropy value, mean square saturation error, and lightness order error.

Magudeeswaran Veluchamy et. al. [29] presented a Fuzzy Dissimilarity Adaptive Histogram Equalization with Gamma Correction (FDAHE-GC) algorithm in which a Fuzzy
Dissimilarity Histogram (FDH) is obtained from the neighbourhood characteristics forming intensity mapping function. Different methods for evaluating the performance of the presented method include entropy, Colorfulness, Hue Deviation Index, Saturating, Contrast Enhancement Factor, and Gradient which show improved color enhancement.
Another intensity based enhancement was presented by Krishnamurthy Mayathevar et al. [30], using fuzzy histogram constructed using intensity of neighbourhood regions and further improved by gamma correction in dark regions. Fading effect is mitigated by limiting maximum saturation range as well.
We find that contrast stretching loses some of the detail information of the images during enhancement, Histogram Equalization and its variations gives better results but it cannot preserve the brightness of the original image. Homomorphic filtering techniques have better response but suffers from bleaching effects and multiplicative noise. Retinex is the advance technique for the color image but it still suffers from Gray level violation problem, washed out appearances and unnatural color rendition.
Proposed model is simple, effective and solve the key shortcomings of current models. The main concept behind the proposed method is local color correction in the Hue Saturation Luminance (HSL) domain and fuzzy intensification. The RGB colorspace is first converted to the Hue, Saturation and Luminance colorspace. Local color correction is applied to the luminance component to optimize the color enhancement based on neighboring pixel. Fuzzy intensification operators are used to control the color fidelity of the local color corrected images and thus is able to sort out the problem of overexposed and underexposed regions and provide optimized contrast enhancement in colored images. Several experiments have been performed to analyze the performance of the proposed method and feasibility as compared to existing techniques.
III. PROPOSED METHOD The proposed framework has been shown in the block diagram in Fig. 2. Step 1: RGB image values is converted to the range 0-1.
Step 2: Obtain the maximum and minimum values from the R,G,B values.
Step 3: Calculate the Luminance (L) value by adding the max and min values and divide by 2. Step where I max & I min are respectively maximum and minimum image pixel value.
Step 5: The Hue(H) formula is depending on what RGB color channel is the max value.

If Red is max, then H = (G-B)/(I max -I min )
If Green is max, then

H = 2.0 + (B-R)/(I max -I min )
If Blue is max, then Where R,G,B represents the respective color intensity value in the RGB space.
The Hue values are converted to degree values.
The next step is to apply Local Color Correction on the Luminance component. A mask of luminance metric is computed from the original luminance and a Gaussian kernel, which guarantees that image contrast, will not be excessively reduced along the edges is calculated. The resulting mask indicates the corresponding regions of the image which will become dark or light than the original image. The algorithm for color correction is as shown below.

Algorithm 2: Local Color Correction
Step 1: Extract Luminance Component, L L←HSL Step 2: Apply Fast Fourier Transform(FFT) on Luminance component, L dft ← L Step 3: Calculate Gaussian Mask on L, G L ← L Gaussian Mask can be defined as: where "ξ" is the frequency of the k th sample given by, ξ=k/N, for k= -N/2,.. N/2-1, where N is the total number of samples and is the standard deviation.
Step 4: Apply Discrete Fourier Transform (DFT) on Gaussian Mask (calculated using equation 5) of Luminance, Step 5: Perform Convolution of L dft &G LDFT , L conv Step 6: Apply Inverse Fast Fourier Transform (IFFT) on luminance convolution value L conv and calculate output color corrected luminance, as per equation 6: Equation (6) represents the Output Luminance L out where x and y indicate the coordinates.
The color corrected luminance is combined with the original hue and saturation to obtain the color corrected image matrix. The fuzzy intensification operators are then applied on this image to obtain an optimized enhancement.
In order to measure fuzzy intensification operators, two variables are necessary. Firstly, tau(τ) is a parameter that describes the operators threshold limits. The second parameter is a membership function, which is necessary since the default range between zero and one is fixed by pixels of a given channel. Using "τ" allows the operators to filter image pixels.
where "ξ" is the intensification tuning parameter which controls the trueness of colors in the image. The complete RGB image is obrtained by combining outputs.

IV. RESULTS AND DISCUSSION
The proposed framework has been tested on CEED dataset for contrast enhancement. The archive consists of 30 images, which consists of collected images and other popular images used by the other experts [31]. All images in the database are truecolor RGB images with pixel size 512x512 height and width respectively. The images contain various scenes of different illuminations, taken both inside and outside as well several benchmark images like peppers, barbara. Thus this dataset covers an exhaustive range of different image types and the proposed frameworks evaluation is carried on this dataset to cover different image types. For comparison, various existing methods have been selected viz. Histogram Equalization [4], BPDHE [5] DHECI [10], Dong [8], AMSR [9], and JED [11] algorithms. The visual appearnce of the enhanced images gives a qualitative approximation of the proposed framework. For an objective analysis of any image processing technique, quantitative parameters have been used in majority of research works. Some of the common performance measures which give a quantitaive approximation of any image processing methods are Mean Square Error(MSE), Peak Signal Noise Ratio(PSNR), Structural Similarity Index Measurement(SSIM) and Natural Image Quality Evaluation(NIQE).
MSE can be defined as difference between the original image and the output image. This difference must be very low for a better performance.
Where I(x,y) and I'(x,y) represent input and output image pixels respectively. PSNR can be defined as the ratio between peak signal power and noise power. The PSNR gives a measure of the quality of reconstruction in the final image with respect to the original image. PSNR=10 log 10 � 255 2 � (17) Another parameter to measure perceived quality is SSIM, which considers image degradation as perceived change in "structural information" in contrast to MSE and PSNR which estimate the absolute errors only ehich is an important perceptual phenomena which include both contrast and luminance masking terms.
NIQE is an image quality assessment method which uses measurable deviations from statistical regularities observed in natural images.
The experiment were carried out in MATLAB R2018a on original images dataset obtained form CEED 2016 databse of of images. Fig. 3 shows the result images which have obtained by implementing the various existing methods and proposed method for 'img1' image of CEED dataset. Table 1 shows the experimental results of comparision of different techniques on the basis of MSE, PSNR, SSIM and NIQE parameter and the related graphs in Fig. 4(a), 4(b), 4(c) and 4(c), respectively. 120 | P a g e www.ijacsa.thesai.org  The proposed method has been compared with the existing techniques in terms of various quality metrics as shown in Table I. The Mean Square Error values for the proposed technique is lowest indicating higher correlation with the original image. PSNR values for the img1 is also better as compared to all other methods except the BPDHE [5], which gives better PSNR value than the proposed method. SSIM values obtained for the proposed method is better than AMSR [9], HE [4] and JED [11], while lower than BPDHE [5], DHECI [10], Dong [8] and JED [11]. NIQE values obtained are better than all other methods except the AMSR [9]. Though, if we analyze the visual perceptibility as a qualitative measure, we can see that the methods having better quantitative values i.e. PSNR, SSIM or NIQE doesn't have a good visual perceptibility as compared to the proposed method. Thus, it can be said that there is a tradeoff between the performance measures and qualitative visual perceptibility as well, as is evident from this research. Thus, based on this, it can be said that the proposed technique achieves better performance in terms of both qualitative measures and quantitative metrics. Fig. 5 to Fig. 7 shows some more results for different images. Table II shows the computational cost by proposed and existing methods, in terms of execution time. The execution time of the proposed method is slightly more as compared to AMSE, Dong and BPDHE but it is many times lower than DHECI and ZED methods. Although HE takes much less time to execute but its many drawbacks force to ignore the method. The proposed algorithm thus gives an acceptable performance in contrast optimization and performs well in terms of execution time as well.

V. CONCLUSION
In this research, a technique is proposed which takes into account both the local minima and global maxima problems.
To overcome the problems and to present an optimal enancment approach, the RGB colorspace is first converted to the Hue, Saturation and Luminance colorspace. Local color correction is applied to the HSL colorspace to optimize the contrast of image based on neighboring pixel. Fuzzy intensification methods is used to control the color fidelity of the local color corrected pixels and thus the overexposed and underexposed regions have been optimally illuminated and obtained images are having good contrast. The methods were implemented and tested on CEED database images, along with the existing techniques. Proposed method provides satisfactory results as it produced natural contrast images with no artifacts and outperformed the other existing contrast enhancement methods in terms of MSE, PSNR, SSIM and NIQE image evaluation parameters.