1 Introduction

Encouraged by the performance of DE for image segmentation (Kumar et al. 2011; Aslantas and Tunckanat 2007), in the present paper, it is studied for Image Enhancement; another important aspect of image processing. Since DE gave good results for color image segmentation (Aslantas and Tunckanat 2007), in the present paper it is used for enhancement of colored images only.

One of the problems with color images is that, these are not ready to provide a desired value of information because of illumination or some other conditions like settings of the captured instrument. Therefore, for improving the quality of color images and making them a good source of information an improvement of quality is desired sometimes. To improve the quality of an existing image or in order to extract some features from a degraded image; image enhancement techniques are used. There are several methods available in literature for image enhancement for example: Some vector median filters were proposed by Astola et al. (1990) for color contrast enhancement. A color contrast enhancement algorithm proposed by Starck et al. (2000). Zaharescu et al. (2003) proposed a color contrast enhancement algorithm. Cohen-Or et al. (2006) proposed a method based on color harmonization for color image enhancement. A structured color light can form a 3-D shape for a 3-D object; for cameras this technique was proposed by Chen et al. (2008). Chiu et al. (2011); Huang and Yeh (2013) and proposed image correction affects from various factors.

In this paper a new variant inspired from DE called Differential Evolution for Image Enhancement (DE-IE) is proposed. Though, the proposed DE-IE is inspired from DE, there are certain features making it different from the basic DE. In DE-IE, the initial population is the probability density function of the input pixels. Secondly, DE-IE uses only the mutation operator in an adaptive manner. Due to robustness and performance of the algorithm it is very easy to select the best pixel value for the image.

A literature review for color image enhancement is as follows:

Author (publication year)

Brief description

Shyu and Leou (1998)

Color image enhancement is formulated as an optimization problem and evaluation is done by genetic algorithm approach

Tao et al. (2003)

Proposed a GA based three level thresholding methods for image segmentation. They portioned the image in three basic parts as: dark, gray and white and then implemented fuzzy region as Z-function, P-function and S-function respectively. GA are used to find an optimal solution for all the fuzzy parameters

Zahara et al. (2005)

Proposed a hybrid optimization technique called NM–PSO–Otsu method (Otsu’s method with Nelder–Mead simplex search and PSO) and NM–PSO-curve method (Gaussian curve fitting by Nelder–Mead simplex search and PSO)

Feng et al. (2005)

Applied PSO for 2-D maximum entropy method to optimize the fitness function developed with the help of 2-D histogram. PSO provides the threshold values as local average intensity of pixels

Huang et al. (2006)

Natural color image enhancement and evaluation algorithm based on human visual system

Jiang et al. (2007)

Proposed a method for micro calcification of clusters in digital mammograms based on GA. In this method a window of size 9 × 9 compute mean and standard deviation for each pixel. These computed values of pixels behave like chromosomes for initial population GA detect micro calcification clusters with an optimized way. This method outperforms in comparison of traditional methods

Nakib et al. (2007)

Considered Gaussian distribution’s parameter selection as a nonlinear optimization problem and solved it with new variant of DE called low-discrepancy sequences and a local search (LDE).The proposed method outperforms in comparison to traditional methods for multilevel thresholding

Fan and Lin (2007)

Proposed (PSO + EM) algorithm for estimation of Gaussian’s parameters. PSO employed for global search and the best particle was updated through expectation maximization (EM). PSO + EM were applied for multilevel image thresholding

Tao et al. (2007)

Object segmentation using ant colony optimization algorithm and fuzzy entropy

Chung et al. (2008)

Efficient edge-preserving algorithm for color contrast enhancement with application to color image segmentation

Li and Li (2008)

Fuzzy entropy image segmentation based on particle swarm optimization

Hammouche et al. (2008)

Proposed a wavelet transform method combined with GA. This method reduced the original length of histogram using wavelet transform; GA is used to select the number of thresholds and values of thresholds in this reduced histogram

Coelho et al. (2009)

Proposed a chaotic differential evolution schemes for image enhancement. The fitness function is maximized for enhancing the contrast and details of the image by adapting the parameters using a contrast enhancement technique

Hashemi et al. (2010)

Proposed a contrast enhancement technique based on GA where chromosome representation is simple and novel together with corresponding operators. Using this method natural look of the images is preserved in comparison of other contrast enhancement methods especially for high dynamic images

Zhang et al. (2010)

Proposed an undecimated wavelet transform (UWT) with GA for typhoon cloud enhancement. Modifying the undecimated wavelet coefficients make it efficient to reduce the noise in typhoon cloud image. GA is used for modifying the UWT coefficient efficiently

Horng (2010)

Multilevel minimum cross entropy threshold selection based on the honey bee mating optimization

Sathya and Kayalvizhi (2011)

Modified bacterial foraging algorithm based multilevel thresholding for image segmentation

Fernández-Caballero et al. (2011)

Real-time human segmentation in infrared videos

Chander et al. (2011)

Proposed a variant of PSO for multilevel thresholding for reducing the complexity and computational time

Li et al. (2011)

Modified local entropy-based transition region extraction and thresholding

Celik et al. (2012)

A 2DHE (two dimensional histogram) approach is proposed for enhancing the image quality using contextual information around each pixel

Chen and Leou (2012)

Proposed a method of saliency-directed color image interpolation using particle swarm optimization (PSO) and artificial neural network (ANN). PSO is used for determining the weights in interpolation filtering masks and ANN is used to determine the orientation of each image pattern (block). It was shown that this method performs better for color image interpolation

Vahedi et al.(2012)

Proposed GA based watermarking approach for color images for copyright purposes

Verma et al. (2012)

High dynamic range optimal fuzzy color image enhancement using Artificial Ant Colony System

Masra et al. (2012)

Proposed a Histogram Equalization (HE) method based on Particle Swarm Optimization (PSO). Images are split in red green and blue (RGB) channels and PSO finds the best fitness value for each channel.

Tsai et al. (2012)

Image enhancement filter named DPSM (Decision tree, Particle swarm optimization, and Support vector regression Median-type filter)

Lee et al. (2012)

Proposed a modified PSO for extracting high-level image semantics depending upon the color, intensity and orientation

Ghamisi et al. (2012)

An efficient method for segmentation of images based on fractional calculus and natural selection

Shanmugavadivu and Balasubramanian (2013)

Otsu method is used for converting the image into two sub-images and formulates a fitness function based on these sub-images. For optimal solution PSO is used which provide better solution

Kwok et al. (2013)

Proposed a multi-objective PSO for correcting the color effect and for balancing all effects regarding the scene and environment

Hoseini and Shayesteh (2013)

Proposed an evolution based contrast enhancement technique embedded of three techniques named GA, Ant Colony Optimization (ACO) and Simulated Annealing (SA). Input intensities to the output intensities were mapped through ACO, and then SA worked as local search methods for modifying the transfer functions. The processed ants worked as chromosome for GA

Zhong et al. (2013)

Image enhancement based on wavelet transformation and pseudo-color coding with phase-modulated image density processing

Lan and Zeng (2013)

Multi-threshold image segmentation using maximum fuzzy entropy based on a new 2D histogram

Osuna-Enciso et al. (2013)

Successfully applied PSO ABC and DE for making the calculation of parameters used in 1-D histogram. Gaussian function approximates the 1-D histogram, for calculation of threshold point in gray level image segmentation

Kumar et al. (2013)

MRLDE, PSO and ABC are successfully applied for bi-level thresholding embedded with Otsu method

2 Proposed algorithm

A 1D histogram does not consider all the local information near a pixel; so a 2D histogram will be constructed for image enhancement. Suppose there is an input image \( \chi = \{ x(i,j)|1 \le i \le M,1 \le j \le N\} \)of size M × N and there is an enhanced or output image γ = {y(ij)|1 ≤ i ≤ M, 1 ≤ j ≤ N}. For image enhancement a target will be achieved from an input image to output image; making some significant changes like compression and enhancement. For an input image χ pixel values having a dynamic range x(i, j) ∊ [x l , x u ] will produce a target value [y l , y u ] for an output image γ.

For designing a 2D histogram a window w is considered; sort the values of pixels for input image X s  = {x 1x 2, … x n }, for an input image χ, where pixels x 1x 2, … x n are in a sorted form as\( x_{1} < x_{2} < \ldots x_{n} ,\quad x_{1} = x_{l} ,x_{n} = x_{n} \). 2D histogram will be expressed as follows:

$$ H_{x} = \{ h_{x} (s,t)|1 \le s \le n,1 \le t \le n $$
(1)
$$ h_{x} (s,t) = \sum\limits_{\forall i} {\sum\limits_{\forall j} {\sum\limits_{{n = - \left\lfloor {{w \mathord{\left/ {\vphantom {w 2}} \right. \kern-0pt} 2}} \right\rfloor }}^{{\left\lfloor {{w \mathord{\left/ {\vphantom {w 2}} \right. \kern-0pt} 2}} \right\rfloor }} {\sum\limits_{{m = - \left\lfloor {{w \mathord{\left/ {\vphantom {w 2}} \right. \kern-0pt} 2}} \right\rfloor }}^{{\left\lfloor {{w \mathord{\left/ {\vphantom {w 2}} \right. \kern-0pt} 2}} \right\rfloor }} {\varphi_{m,n} (x(i,j),x(i + n,j + m))(|x_{k} - x_{l} |} } + 1),} } $$
(2)

For computing 2D histogram a squared window of odd size w is required for neighborhood pixels; the window will move throughout the image and will compute the values around each pixel. Occurrence of gray-level will be measured with functions x(i, j) and x(i + n, j + m) both are the values of x k and x l respectively. Both functions work on a similarity index such that if actual pixel value is similar to the computed value of that pixel, then it will be considered as ‘1’ otherwise it will be considered ‘0’.

2D histogram h x (s, t) is normalized as:

$$ h_{x} (s,t) = {{h_{x} (s,t)} \mathord{\left/ {\vphantom {{h_{x} (s,t)} {\sum\limits_{i = 1}^{K} {\sum\limits_{j = 1}^{K} {h_{x} (i,j)} } }}} \right. \kern-0pt} {\sum\limits_{i = 1}^{K} {\sum\limits_{j = 1}^{K} {h_{x} (i,j)} } }} $$
(3)

Normalized values form a 2D histogram for an image. If the image has homogeneous regions then diagonal values for a 2D histogram are large. Homogeneous regions have similar values for most pixels in neighborhood, so the diagonal values show this similarity in the form of larger values. In 2D histogram if peaks are large around the diagonal, it represents white color or a large difference between x k and x l , so a high intensity enhancement is required at these points.

Probability of original histogram is given as:

$$ P_{x} (s) = \sum\limits_{i = 1}^{s} {\sum\limits_{j = 1}^{t} {h_{x} (i,j)} } $$
(4)

The main objective of 2D histogram is to represent the actual information of the image in a managerial way. Main diagonal represents the actual skeleton of the image and values around each pixel represent the homogeneity and dissimilarity. 2D histogram should be uniform for an enhanced image, so the main objective is to uniform the 2D histogram. Probability represented in Eq. (4) is pixel strength of a gray-level image.

Smoothing of 2D histogram provides better results for enhancement. A method is proposed by Celik et al. (2012), in which they have mentioned that minimum value of cumulative difference between distribution functions P x (s) and P x (s′); where P x (s) and P x (s′) are distribution functions of input image and target output image will replace the exact value of grey-level in the input image. In this method it is clearly mentioned that desired output image is considered according to grey-level; they have supposed that the output image has a range of grey-level from 0 to L; where 0 is considered as a lower grey-level value and L is considered as a higher grey-level value. So, an optimized value of grey-level will replace the exact value of input image.

In this article, a new technique based on DE is proposed for optimizing this target. The proposed strategy is particularly designed for image enhancement and its purpose is to enhance all the points so that no important information in the image is missed out. Because the range of target output image is available for each pixel, so this strategy will work for optimization based on the condition of output image pixels. Range of desired output will work as a conditional statement for enhancement. The proposed strategy tries to minimize the function till the desired output is reached. So, the resultant enhanced image is of good quality.

3 Image based population

DE uses an initial population as a search space. For this particular problem, the search space is made up of distribution probability P x (s) which will act as the initial population; here it is worth mentioning that the distribution probability of each pixel is known with the help of a window of size w × w. Pseudocode for the proposed strategy is given in Fig. 1.

Fig. 1
figure 1

Pseudocode of proposed differential evolution for image enhancement

4 Analysis of proposed DE-IE

Fis a mutant factor which controls the diversity in classical DE algorithm. But in the proposed algorithm Fis playing a slightly different role. Here, F works like a catalyst; if the difference of input image probability distribution function and output probability distribution function is high, it will be self-adaptive as seen the above algorithm. Suppose PDF1 (Probability Density Function 1 for input image) and PDF2 (Probability Density Function 2 for output image) both have different values like 0.9 and 0.1, respectively, then difference between both values will be 0.8. In this case 1st condition of the algorithm will be applied where F = .8 and the product output will be 0.64. Mean value of PDF1 and PDF2 is (0.9 + 0.1)/2 = 0.5, so the output pixel value will be 0.64.

As we have seen in last example the desired output value is 0.1 and output from the algorithm is higher value 0.64 and vice versa. This suggested algorithm will work for one-by-one values of pixels. It will replace and pixels whenever it is required other the pixel value will be as it is in the input image. Consequently, it is expected to give better results.

If difference between probability distributions of input image and desired output image is large it depicts pixel value difference or dissimilarity; lower value of this difference depicts similarity of pixels. Enhancement is required when dissimilarity exists. With the above algorithm one can measure that if difference is higher, output pixel value will also be higher which produces a higher pixel value. This in turn indicates that the quality of the given image will visibly improve through enhancement. On the other hand, if difference is a small value then algorithm will produce a small value of output pixel resulting in small enhancement or in other words it can be said that the original image do not require more enhancement to improve its quality.

5 Test problems

A total of 24 images given in Fig. 2 are considered. These images are taken from Martin et al. (2001) or Berkley database. Figure 2a, b represents the original image and the histogram obtained respectively. Figure 2c, d represents the enhanced image and the corresponding histogram obtained using the proposed DE-IE.

Fig. 2
figure 2figure 2figure 2figure 2figure 2figure 2

a Original image, b 3D histogram of input image, c Output enhanced image, d 3D histogram of output image

6 Result analysis

The algorithms are compared on the basis of the following analysis:

  • Entropy based measurement or quality measurement (Table 1)

    Table 1 Result for entropy based quantitative measurement
  • Visual analysis (Fig. 2)

  • Histograms (Fig. 2)

7 Algorithms used for comparison

  • HE [histogram equalization (Gonzalez and Woods 2006)]

  • CEBGA [contrast enhancement based on GA (Hashemi et al. 2010)]

  • HMF [histogram modification framework (Arici et al. 2009)]

  • FHSABP [flattest histogram specification with accurate brightness preservation (Wang et al. 2008)]

8 Quality measurement on the basis of entropy

Normalized discrete entropy (NDE) and normalized edge based contrast measure (CM) are used for measuring contrast enhancement. Discrete entropy for an input image I having grey levels N is defined as

$$ E_{I} = - \sum\limits_{n = 1}^{N} {p(x_{n} )\log_{10} p(x_{n} )} $$
(5)

where; p(x n ) represents the probability of a pixel intensity x n . Normalized histogram is used for making all the calculations.

Similarly entropy for output image O is defined as

$$ E_{O} = - \sum\limits_{m = 1}^{M} {p(y_{m} )\log_{10} p(y_{m} )} $$
(6)

where, p(y m ) is the probability of pixel intensity y m for an output image O.

Small value of entropy indicates that the image have a lesser details and a high value indicates image have more details. Normalized entropy (E N ) for input image I and output image O is defined as follows:

$$ E_{N} = \frac{1}{{1 + \frac{{\left( {\log_{10} \left( {256} \right) - E_{O} } \right)}}{{\left( {\log_{10} \left( {256} \right) - E_{I} } \right)}}}} $$
(7)

For a grey level image log10(256) is the maximum value of entropy for an input image. Now, the very basic idea is that a high number of normalized entropy E N represents a better value for output image. From Eq. (7) it is very clear that if E N  ≥ 0.5 then output image always has a higher entropy value which in turn implies a more detailed image. All the measurement can be used for color images. Convert a color image into CIE L*a*b (The CIE (L*, a*, b*) color space (CIELAB), showing only colors that fit within the RGB gamut (and can therefore be displayed on a typical computer display) color space. After processing the enhancement process transform the image into its previous form.

The numerical analysis of the results based on entropy is given in Table 1, which represents a quantitative measurement for output enhanced images. From this Table it can be seen that although all the algorithms used for comparative analysis give more or less similar results, the proposed DE-IE outperforms the other algorithms.

9 Visual analysis and analysis on the basis of histograms

The superior performance of DE-IE can also be observed from Fig. 2, from where the difference between the original image and the enhanced image is clearly visible. Also, from the histogram of the original image and the enhanced image it can be easily seen that the histogram of the enhanced image contains much more data in comparison of original image histogram.

10 Summary

A new DE variant called DE-IE is proposed for image enhancement. DE-IE is particularly designed for image enhancement so as to preserve most of the information of the image as the initial population here is made up of the probability distribution of each pixel. It is a simple and novel DE strategy making use of only the scaling factor F. Note that the proposed DE-IE does not make use of any crossover parameter Cr like the usual DE.

The proposed variant is compared with other algorithms like HE, CEBGA, HMF and FHSAB, where it is observed that the proposed DE-IE gives a better performance. The good performance of DE-IE can also be visualized with the help of Fig. 2, where the difference between the input and the output image after enhancement through DE-IE can be easily observed. Performance of DE-IE can also be seen through histograms. The above analysis shows that DE-IE can be an efficient method for image segmentation.