Mathematical Problems in Engineering

Volume 2015 (2015), Article ID 265723, 14 pages

http://dx.doi.org/10.1155/2015/265723

## Multipeak Mean Based Optimized Histogram Modification Framework Using Swarm Intelligence for Image Contrast Enhancement

^{1}Department of MCA, PSNA College of Engineering and Technology, Dindigul 624622, India^{2}Vel Tech Multitech Dr. Rangarajan Dr. Sakunthala Engg. College, Vel Tech, Avadi, Chennai 600001, India

Received 6 June 2014; Revised 28 July 2014; Accepted 11 August 2014

Academic Editor: Fang Zong

Copyright © 2015 P. Babu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

A novel approach, Multipeak mean based optimized histogram modification framework (MMOHM) is introduced for the purpose of enhancing the contrast as well as preserving essential details for any given gray scale and colour images. The basic idea of this technique is the calculation of multiple peaks (local maxima) from the original histogram. The mean value of multiple peaks is computed and the input image’s histogram is segmented into two subhistograms based on this multipeak mean () value. Then, a bicriteria optimization problem is formulated and the subhistograms are modified by selecting optimal contrast enhancement parameters. While formulating the enhancement parameters, particle swarm optimization is employed to find optimal values of them. Finally, the union of the modified subhistograms produces a contrast enhanced and details preserved output image. This mechanism enhances the contrast of the input image better than the existing contemporary HE methods. The performance of the proposed method is well supported by the contrast enhancement quantitative metrics such as discrete entropy, natural image quality evaluator, and absolute mean brightness error.

#### 1. Introduction

Contrast enhancement plays an important role in the improvement of visual quality for computer vision, pattern recognition, and the processing of digital images. Poor contrast in digital video or images can result from many circumstances, including lack of operator expertise and inadequacy of the image capture device [1]. Contrast enhancement of an image is achieved through redistribution of intensity values. The resultant contrast enhanced image provides feature extraction in computer vision system. Histogram equalization (HE) is one of the commonly used algorithms for contrast enhancement due to its simplicity and effectiveness. It remaps the gray levels based on the probability distribution of the input gray levels. It flattens and stretches the dynamic range of the images histogram which results in overall contrast improvement [2].

HE methods can be categorized into two methods: improved global HE methods (GHE) and adaptive HE (AHE) methods. The GHE methods improve image quality by extending the dynamic range of intensity using the histogram of the whole image. Since GHE is based on the intensity distribution of the whole image, it causes washed out effect and changes average intensity to middle level [3]. In AHE methods, the equalization is based on the histogram and statistics obtained from neighbourhood around each pixel. These methods can usually provide stronger enhancement effects than global methods. They divide the original image into several nonoverlapped subblocks and perform HE on individual subblocks. The resultant image is produced by merging the subblocks using bilinear interpolation method. However, due to their high computational load, AHE methods are not well suited for real time video applications [4].

The objective of an image enhancement technique is to bring out hidden image details or to increase the contrast of an image with the low dynamic range. Such a technique produces an output image that subjectively looks better than the original image by increasing the gray-level differences among objects and background. Numerous enhancement techniques have been introduced and can be divided into three groups: (1) techniques that decompose an image into high and low frequency signals for manipulation, (2) transform based techniques, and (3) histogram modification techniques. Among the three groups, the third group received the most attention due to their straightforward and intuitive implementation qualities [5]. Some research works have focused on improving HE based contrast enhancement such as brightness preserving bihistogram equalization (BBHE), equal area dualistic subimage histogram equalization (DSIHE), recursive mean separate histogram equalization (RMSHE), weighted thresholded histogram equalization (WTHE), range limited bihistogram equalization (RLBHE), efficient contrast enhancement using adaptive gamma correction with weighting distribution (AGCWD), and contrast enhancement based on layered difference representation of 2D histograms (LDR). Efficient histogram modification using bilateral Bezier curve for the contrast enhancement (BBC) has been proposed in the past years. The aforementioned techniques may create problems when the histogram has spikes or when a natural looking enhanced image is required. The detailed literature of these techniques was given in next section.

This paper uses the particle swarm optimization (PSO) and multipeak mean () value for the segmentation of histogram and hence trying to improve the contrast enhancement with the help of optimal threshold value as the enhancement parameters. The technique, multipeak mean based optimized histogram modification framework using particle swarm optimization (MMOHM) is proposed for the purpose of enhancing the contrast as well as preserving essential details for any given input image. Multiple peaks (local maxima) are identified from the input histogram. Then, the mean value of multipeaks is computed and the input image’s histogram is segmented into two subhistograms based on this multipeak mean value. Then, a bicriteria optimization problem is formulated to satisfy aforementioned requirements and the subhistograms are modified by selecting the optimal contrast enhancement parameters. Finally, the union of the modified subhistograms produces a contrast enhanced and details preserved output image. While formulating the optimization problem, PSO is employed to find the optimal values of contrast enhancement parameters.

The traditional HE and several HE based methods are analyzed in Section 2. Section 3 presents the proposed MMOHM method along with the statistical measurements to measure the image quality. The results are discussed in Section 4. The conclusion is given in Section 5.

#### 2. Review of Histogram Equalization Methods

Consider the input image , where denotes the gray-level of a pixel at . The total number of pixels in the image is and the image intensity is digitized into gray levels that are . If represents the number of times that the level appears in the input image , then the probability density function (PDF) for the level is defined asBased on (1), the cumulative density function (CDF) is defined asHE maps the input image into the entire dynamic range, , by using the CDF as a transform function. The transform function based on the CDF is defined asHE technique is rarely used because it flattens the histogram of an image which results in bringing significant change in brightness and causes undesirable artifacts. Kim has proposed a method known as brightness preserving bihistogram equalization (BBHE) to preserve the brightness [6]. BBHE decomposes the input histogram into two subhistograms based on its input mean . It is clearly proved that BBHE can preserve the original brightness to a certain extent. Wang et al. proposed a method called equal area dualistic subimage histogram equalization (DSIHE) which is an extension of BBHE [7]. DSIHE differs from BBHE only in the segmentation process. The input image is segmented into two subimages based on median rather than mean. This method is well suited for some images but fails to preserve original brightness for most of the images. Chen and Ramli proposed a method called minimum mean brightness error bihistogram equalization (MMBEBHE) which is an extension of BBHE [8]. It performs the separation process based on the threshold level and it preserves the original brightness of the image. Chen and Ramli proposed a method called recursive mean separate histogram equalization (RMSHE) in which histogram of the given image is partitioned recursively [9]. Unlike BBHE which decomposes the input histogram only once, RMSHE decomposes it recursively up to a recursion level and thereby generating subhistograms. The resultant subhistograms are then equalized individually to get the contrast enhanced image. Sim et al. proposed a similar method called recursive subimage histogram equalization (RSIHE) [10]. It shares similar recursive framework with RMSHE except that for histogram segmentation, RSIHE uses the median of subhistograms instead of the mean of subhistograms in RMSHE. But, the fact is that as the recursion level increases, the computational complexity also increases and finding an optimal recursion level is a difficult task for all such methods. A detailed study of various bilevel and multilevel partitioning methods are analyzed in [11]. A fast and effective method for video and image contrast enhancement known as weighted thresholded histogram equalization (WTHE) was presented in [4]. WTHE provides a good tradeoff between the two features, adaptively to different images and ease of control, which is difficult to achieve through GHE based enhancement methods. In recursively separated and weighted HE (RSWHE) and weight clustering HE (WCHE), different weighing principles are applied successfully [12, 13]. But these methods fail to preserve the spatial relationship among the pixels and their surroundings. Ibrahim and Pik Kong proposed subregions histogram equalization (SRHE) for sharpening the images [14]. Zuo et al. developed the range limited bihistogram equalization (RLBHE) for image contrast enhancement in which the input image’s histogram is divided into two independent subhistograms through a threshold that minimizes the intraclass variance [15]. Then the range of the equalized image is calculated to yield minimum absolute mean brightness error between the original and equalized image. Sundaram et al. proposed a method called histogram modified local contrast enhancement for mammogram images in which the contrast enhancement of the mammogram image can be achieved by histogram modification and local contrast enhancement [16]. BBHE is combined with local enhancement to preserve the brightness and improve performance of detail preservation. It combines spatial edge information with gray information to enhance the local details [17]. In thresholded and optimized histogram equalisation (TOHE), histogram modification was carried out based on otsu’s optimality principle. Then, weighing constraints are applied; mean errors are calculated and the error values were added to the original probability density values for contrast enhancement [18]. Lee and Kim proposed a novel contrast enhancement technique based on layered difference representation (LDR) of 2D histograms [19]. They attempt to enhance the contrast by amplifying the gray-level differences between the adjacent pixels. A constrained optimization problem is formulated based on the observation that the gray-level differences, occurring more frequently in the input image, should be more emphasized in the output image. The optimization problem is solved to derive the transformation function at each layer and then combine the transformation functions at all layers to map input gray levels to output gray levels. Huang et al. proposed an automatic histogram transformation technique called efficient contrast enhancement using adaptive gamma correction with weighting distribution (AGCWD) that improves the brightness of dimmed images via gamma correction and probability distribution of luminance pixels [1]. To enhance the video, AGCWD uses temporal information regarding the differences between the discrete entropy values of each frame to reduce the computational complexity. Efficient histogram modification using bilateral Bezier curve for the contrast enhancement (BBC) is proposed to enhance the quality of the input image and reduce the processing time [20]. The control points of the mapping curve are automatically calculated by Bezier curve which performs in dark and bright regions separately. Using the fast and accurate histogram modification allows this method to transform the intensity for both image and video. Ghita et al. introduced a new variational approach for HE which involves the application of the total variation minimization with a L^{1} fidelity (TV-L^{1}) model to achieve cartoon-texture decomposition [21]. The texture information is also employed along with the intensity information to emphasize the contribution of local textural features in the contrast enhancement process. This is achieved by implementing a nonlinear histogram warping strategy that will maximize the information content in the transformed image. Celik and Tjahjadi proposed an algorithm for contrast enhancement which is free from parameter setting [5]. In this method, the pixel values of an input image are modeled using Gaussian mixture model. The intersection points of the Gaussian components are used in partitioning the dynamic range of the image into input gray-level intervals. The gray levels in each input interval are transformed according to the dominant Gaussian component and the CDF of the interval to obtain the contrast equalized image.

#### 3. Multipeak Mean Based Optimized Histogram Modification (MMOHM)

HE is the simple and straightforward method for image contrast enhancement. Several HE based techniques were proposed in the past years and a detailed discussion on it is given in the literature. Most of the contemporary HE based techniques have the common drawback of mean shift, which results in brightness degradation, lack of details preservation, and overenhancement. In addition, computational complexity and controllable contrast enhancement become an important issue when the goal is to design a contrast enhancement algorithm for gray scale and color images. The main objective of this paper is to obtain a visually pleasing brightness preserved enhancement method, which incorporates a provision to have a control over the level of contrast enhancement and works well for all types of images. The proposed MMOHM method is an effective technique to combat with the aforementioned pitfalls. MMOHM produces contrast enhanced as well as details preserved output image with the help of the following steps.

##### 3.1. Identification of Peaks and Mean Computation

The first step of the proposed method finds the local maximum points of the histogram by tracing the histogram of the given input image. Generally, peak in the histogram specifies the highest occurrence of some specific gray valued pixel. The histograms of consumer electronics images in general consist of many peaks and, hence, it is desirable to enhance the image around its peaks, which is of prime importance in order to have controlled contrast enhancement and brightness preservation. A point on the histogram is a peak value (local maximum) if its amplitude is more than its neighbors. In order to obtain the peak point, the signs of the difference between two successive probabilities in the histogram are calculated. Let denote a random variable representing discrete gray levels in the range and let denote the peak value corresponding to the th value of . Then, the value is calculated aswhere represents the total number of peaks in the input image histogram. While doing this, if the histogram value is found lower than the value, then it is made to reach the value by increasing it or if the histogram value is higher than the value, it is made to decrease its value to reach the value. Based on value, the input histogram is segmented into two subhistograms, namely, and , where the lower subhistogram is associated with gray levels ranging from minimum to , that is, and the upper subhistogram is associated with gray-level to maximum gray-level, that is, . This type of histogram partitioning helps to avoid some portions of the histogram from being dominated by other portions. The motivation of computing value is to improve the mean image brightness preserving capability.

##### 3.2. Lower Subhistogram Modification

HE often produces overenhanced, unnatural looking in the output image which leads to loss of information in the original image. Another problem with HE is its large backward difference values of mapping functions. When the input histogram distribution is already uniform, the mapping obtained from cumulative distribution is , which identically maps input to output. In order to find the level of contrast enhancement, the input histogram can be altered so that the modified histogram is closer to uniform histogram of the lower subimage. It also aims to make the difference between the histograms of modified and input image () small, resulting in the increased potentiality of image contrast enhancement. This is a bicriteria optimization problem since the optimization enhances the contrast of the input image while preserving the details of the original image. So, the output image would be more relevant to the input image. The optimization problem for lower subimage can be defined asThe modified histogram for lower subimage can be obtained by finding an analytical solution for (5) as follows:Equation (6) can be rewritten aswhere , , , and are the modified histogram, input histogram, uniform histogram, and the contrast enhancement parameter for lower subhistogram, respectively.

##### 3.3. Upper Subhistogram Modification

The main objective of this method is to find a modified histogram for upper subhistogram that is closer to uniform histogram and to make the difference between histograms of modified image and original image small, which results in increasing the potentiality of image contrast enhancement. Then, the bicriteria optimization problem for upper subimage can be written asThe modified histogram for upper subimage can be obtained by finding an analytical solution for (8) as follows:Equation (9) can be rewritten aswhere , , , and are the modified histogram, input histogram, uniform histogram, and the contrast enhancement parameter for upper subhistogram, respectively.

The value of the contrast enhancement parameters, and , is in the range from 0.0 to 1.0 practically in order to avoid overenhancement. For very low value of these parameters, the mapping function gets saturated leading to overenhancement in the output image. When the value of enhancement parameters is zero, this method tends to behave like a traditional HE. When it is nearer to 1.0, the mapping gradually reaches a maximum value, which preserves the naturalness of the image with increased image quality. When these values are greater than 1.0, the mapping function closely reaches identity mapping which means there is no difference between the original image and output image, resulting in no contrast enhancement. The various changes in the levels of contrast enhancement can be achieved by changing the values of these parameters. The optimal value of and for both subhistograms can be obtained by using PSO. The MMOHM procedure is given in Algorithm 1.