An Adaptive Image Enhancement Technique by Combining Cuckoo Search and Particle Swarm Optimization Algorithm

Image enhancement is an important procedure of image processing and analysis. This paper presents a new technique using a modified measure and blending of cuckoo search and particle swarm optimization (CS-PSO) for low contrast images to enhance image adaptively. In this way, contrast enhancement is obtained by global transformation of the input intensities; it employs incomplete Beta function as the transformation function and a novel criterion for measuring image quality considering three factors which are threshold, entropy value, and gray-level probability density of the image. The enhancement process is a nonlinear optimization problem with several constraints. CS-PSO is utilized to maximize the objective fitness criterion in order to enhance the contrast and detail in an image by adapting the parameters of a novel extension to a local enhancement technique. The performance of the proposed method has been compared with other existing techniques such as linear contrast stretching, histogram equalization, and evolutionary computing based image enhancement methods like backtracking search algorithm, differential search algorithm, genetic algorithm, and particle swarm optimization in terms of processing time and image quality. Experimental results demonstrate that the proposed method is robust and adaptive and exhibits the better performance than other methods involved in the paper.


Introduction
The visual quality of the most recorded images is often brought down in the course of digital image acquisition because of some factors such as uneven illumination, the noise produced in the transmission, and D/A transformation. As a consequence, image quality usually needs to be improved before image analysis; image enhancement is an elementary step in digital image processing and analysis [1]. The goal of enhancement techniques is to process an image so that the result is more suitable than the original image for specific applications or set of objectives. Many methods based on gray-level histogram modification, the local contrast transformation, edge analysis, and the "global" entropy transformation have been proposed to enhance image. In [2], Cheng and so forth defined a new approach to fuzzy entropy and used it to automatically select the fuzzy region of membership function so that an image was able to be transformed into fuzzy domain with maximum fuzzy entropy. Tang and so forth put forward an image enhancement algorithm for images compressed using the JPEG standard [3]. In general, the enhancement methods may be summarized as two main categories: frequency domain and spatial domain. Frequency domain processing techniques are based on modifying the Fourier transform of an image. Spatial domain refers to the image plane itself, and approaches in this category are based on direct manipulation of pixel in an image. In the paper, our work is based on spatial domain.
Histogram transformation is one of the most basic techniques for spatial domain enhancement of gray-level images [4]. As the adjustment of histogram, the structural relationship of intensity values of the pixel will be changed. The expression of histogram is a discrete probability density function about gray-levels and reflects the relative frequency distribution of gray-levels. Histogram equalization is a method in image processing of contrast adjustment by increasing the global contrast of the image, especially when the usable data of the image is represented by close contrast 2 Computational Intelligence and Neuroscience values [5]. However, the intensity values of pixel will be adjusted to an average position, which cannot highlight the details of the original image. As the basis for numerous spatial domain techniques of image contrast enhancement, it usually manipulates the histogram by the transformation function to obtain the required target. Consequently, this method is to deliver the maximum information contained in the original image. Linear contrast stretching is to increase the dynamic range of the gray-levels in the original image by using a linear transformation [6]. It mainly enhances the contrast grade of the original image, but the threshold must be manually set. If the threshold is not suitable, the enhanced image may be worse than original image. Due to the absence of general standard of the image quality, which could be served as a design criteria for image enhancement algorithms, improving image contrast is difficult by simply stretching the histogram of the image or using simple graylevel transformations [7]. Therefore, recently some novel methods using evolutionary computation and metaheuristic optimization algorithms based on some quality measures of image enhancement have been put forward to further deal with the problem of image enhancement.
Evolutionary computation is a subfield of artificial intelligence that involves continuous optimization and combinatorial optimization problems [8][9][10]. In [8], Civicioglu introduced a new evolutionary algorithm named backtracking search algorithm (BSA) for solving real-valued numerical optimization problems. In [9], a new evolutionary algorithm called differential search algorithm (DSA) is presented to solve the problem of transforming the geocentric Cartesian coordinates into geodetic coordinates. In [10], Hrelja et al. used particle swarm optimization (PSO) to propose the modelling of turning process. In particular, some classical evolutionary computation algorithms have been previously used to perform image enhancement [11][12][13][14]. In [11], Saitoh proposed a method to enhance the contrast of a gray-level image using genetic algorithm (GA) that measures the fitness of an individual by evaluating the intensity of spatial edges included in the image. Gorai and Ghosh have applied an objective criterion for measuring image enhancement which considers entropy and edge information of the image with the help of PSO in [12]. Coelho and so forth presented three differential evolution approaches based on chaotic sequences using logistic equation for image enhancement process in [13]. In [14], the different transformation functions with different parameters were used to produce the enhanced image by GA. These methods have obtained fair good results on image enhancement. However, the definition of image quality measure is imperfect; there are few of objective functions which are able to make a good versatility for all images. Moreover, GA and PSO are easy to fall into local optima. Recently, hybridization of metaheuristics has received great interest. In the paper, a novel image enhancement technique using a modified quality measure and blending of cuckoo search and particle swarm optimization algorithm is proposed.
Cuckoo search (CS) algorithm is a population-based stochastic global search algorithm [15]. In [16], the authors have made a conceptual comparison of cuckoo search (CS), particle swarm optimization (PSO), and genetic algorithm (GA). The final results indicate that CS can better converge to the optimal solution, but its convergence rate is not very well. A hybrid approach of cuckoo search (CS) and particle swarm optimization (PSO) is presented and experimental results demonstrate that the hybrid method (CS-PSO) is a better method compared with other simplex evolutionary algorithm in [17]. Hence, in this paper, on the basis of the newly modified image quality criteria, CS-PSO is employed to perform gray-level image contrast enhancement. We compare the new method with the previously presented methods. The experimental results demonstrate that our method outperforms the other ones from the subjective and objective viewpoints.
The remainder of the paper is organized as follows: In Section 2, the proposed contrast enhancement mechanism and related function used are given. In Section 3, basis theory of CS-PSO (original CS algorithm, CS-PSO algorithm) is illustrated in brief. In Section 4, the proposed enhancing model is detailed. In Section 5, simulation results and discussion are displayed. Finally, Section 6 draws a conclusion.

Proposed Contrast Enhancement Mechanism and Related Function
The simplest way to carry out contrast enhancement is global intensity transformation. In the way, by utilizing lookup tables, the intensity levels in an image are mapped into a new set of grey levels thus changing the image parameters like the contrast [18]. The main objective in global intensity transformation is to obtain a lookup table or transfer function which yields an output image with improvement in desired parameters. For image enhancement, a transformation function is required which will map the intensity value of each pixel from the input image into a new intensity value for the corresponding pixel to produce the enhanced image. To evaluate the quality of the enhanced image and acquire the optimal enhancement parameters automatically, an objective function is needed. In this section, we will discuss the related function used for the proposed work.

Transformation Function.
In general, image enhancement is done on spatial domain by using a transformation function which produces a new intensity for each pixel of the original image to generate the enhanced image. If the spatial relationship of pixel values is changed, the enhanced image will be altered along with it. As the image size increases, the time complexity of the algorithm will increase hugely. Tubbs proposed a fitting transformation function method by using incomplete Beta function, which does not have to know the spatial distribution of the original image [19]. In [20], incomplete Beta function enhancement method based on PSO is applied to aerial and satellite remote sensing image enhancement. The incomplete Beta function is defined as follows: In (1) and (2), ( , ) is the Beta function, is the variable of integration, is the gray-levels after normalization of Computational Intelligence and Neuroscience the original image ( Figure 1), and two parameters are introduced in the incomplete Beta function, namely, and are to obtain as large fitness value as possible in the enhanced image.

Objective Function.
To evaluate the quality of an enhanced image without human intervention, an objective function is needed which is able to estimate the image quality impartially as far as possible. Some objective functions have been given in [12,21,22]. In [12], the authors proposed an objective function which was formed by combining three performance measures, namely, entropy value, sum of edge intensities, and number of edges. Compared with the original image, the enhanced image has more number of edges and enhanced version should have a higher intensity of the edges. This function can make a fair good evaluation for enhanced image, but its convergence rate is unsatisfactory, which is defined as where and , respectively, denote the number of columns and rows of the original image. ( ) stands for the sum of × pixel intensities of Sobel edge image. edgels is the number of pixels, whose intensity value is above a threshold in the Sobel edge image. ( ) is the entropy value of the enhanced image.
In [21], an objective function formed by using the statistical variable of enhanced image was presented. The function was independent of viewing conditions and individual observers, but it could only be applied to a fraction of test images, which is given in where and , respectively, indicate mean value and variance of the intensity values for original image. and , respectively, express mean value and variance of the intensity values for enhanced image.
represents covariance of the intensity values between original image and enhanced image.
In [22], the authors proposed an objective function which only uses the intensity values of pixel. It can promptly obtain the optimal solution, but this function cannot show the 4 Computational Intelligence and Neuroscience correlation of adjacent pixel; it is not fully suitable for solving the problem of image enhancement, which is as in where and , respectively, denote the number of columns and rows of the original image and ( , ) indicates the intensity value of each pixel.
In the theory of signal processing, entropy value reveals the information content in the image. It is widely used in determining the evaluation criterion in image processing. Histogram reflects a discrete probability density function about gray-levels and reports the relative frequency distribution of gray-levels. Hence, in the paper a novel objective function is proposed as where denotes the number of columns and denotes the number of rows of the original image. Based on the histogram of the enhanced image , ℎ is the probability of occurrence th gray value and Δℎ is the variance of ℎ . is the number of gray-levels in which the probability density is greater than a predetermined threshold value . sum(ℎ Th ) is the number of probability density in which the gray-levels are within the range of another predetermined threshold value Th. ( ) is the entropy value which is calculated on the enhanced image as follows: [15]. This evolutionary algorithm is a search strategy model on brood parasitism of some cuckoo species by laying their eggs in the nests of other host birds. If a host bird discovers the eggs are not its own, it will either fling these alien eggs or simply desert its nest and put up a new nest elsewhere. In a CS system, each cuckoo species alter their position as time goes, and every egg in the nest stands for only one new solution.

Original CS Algorithm. Cuckoo search (CS) is an evolutionary algorithm proposed by Yang and Deb in 2009
The better new solution will take place of the solution which is relatively worse in the nest. For simplicity, only three idealized rules are utilized to describe the CS algorithm as follows [15,23].
(1) Each cuckoo lays one egg at a time and dumps it in a randomly selected nest.
(2) The best nests with high quality of eggs (solutions) will be kept up to the next generation. (3) The number of available host nests is fixed, and a host can discover an alien egg with a probability ∈ [0, 1]. In this case, the host bird can either throw the egg away or abandon the nest so as to build a completely new nest in a new location.
Moreover, a mass of studies have indicated that flight behaviors of many animals and insects have the typical characteristics of the Levy flights [24]. In view of these breeding and flight behaviors, the authors in [15] presented the CS algorithm.
For an optimization problem, the quality of a solution could simply be corresponding to the fitness value of the objective function. Other forms of fitness can be defined in a parallel way to the objective function in other evolutionary algorithms. Three rules are defined in the algorithm; first, each egg in a nest stands for a solution; second, a cuckoo egg denotes a new solution; third all of the cuckoos are evaluated by the fitness value of the objective function to be optimized and have velocities which directly decide the cuckoos' flying; the intent is to use the new better solutions to replace the notso good solution in the nests.
In view of these three rules, the primary steps of the CS can be described with the pseudocode in Pseudocode 1.
In order to generate the new solutions ( +1) , call the cuckoo i, a Levy flight can be defined as in the following: where > 0 is the step size which should be connected with the solution space. In general, we can set = (1). In essence, (8) is a stochastic equation for random walk, which is a Markov chain whose next location only relies on the current location and the transition probability. The product ⊕ means entry-wise multiplications. This entry-wise product is similar to those used in PSO, the random walk via Levy flight is more Computational Intelligence and Neuroscience 5 efficient in searching the solve space, and its step length is much longer in the long run.
In essence, the Levy flight provides a random walk; at the same time, the random step length is drawn from a Levy distribution, which has an infinite variance with an infinite mean: Here, the consecutive steps of a cuckoo essentially constitute a random walk process which obeys a power-law step-length distribution with a heavy tail. Some of the new solutions should be generated by Levy flight around the best solution; this will accelerate the local search. However, a large proportion of the new solutions may be generated by extensive randomization, whose locations may be far from the current best solution; this will make sure the algorithm will not fall into a local optimum.

CS-PSO Algorithm.
The parameters , , and introduced in the CS help the algorithm to find optimal solution. Among them, is a very important parameter in determining the proportion of worse nests and can be potentially used in adjusting convergence rate of algorithm. The traditional CS algorithm uses a fixed value for . This value is set in the initialization stage and cannot be changed during the whole iterative processes. The main drawback of this method is that it is not very easy to find the best proportion. The proportion of worse nests too big or too small will all lead to a case that the algorithm cannot obtain the optimal solution.
Particle swarm optimization (PSO) [25] is an optimization algorithm proposed by Eberhart and Kennedy in 1995. It is a stochastic optimization algorithm of swarm intelligence based on the simulation of various collective behaviors of the living creatures such as bird flocking, fish schooling, and swarm theory. As an optimization tool, PSO provides a population-based search strategy in which individuals are called particles. In PSO, particles fly around in a multidimensional search space. All of the particles are evaluated by the objective function and have a certain velocity which influences the movement of particles. The velocity and position vector is updated by the following equations: where and V signify the position and velocity of particle at time , is inertia weight, gen is the maximum generations of the algorithm, 1 and 2 are positive acceleration constants, 1 and 2 are random values generated in the range [0, 1], sampled from a uniform distribution, is the best solution of th individual particle, and is the best solution tracked by any particle among all generations of the swarm.  CS-PSO utilizes PSO algorithm as a disturbance, substitute for the process of updating the worse nests in CS algorithm. and enable the PSO algorithm to effectively develop the local solutions into global optimum solutions. The disturbance has nothing to do with the worse nests, which makes a broader hunting and rapidly converges to the optimal solution.

Proposed Methodology
In order to obtain the enhanced image, a transformation function defined in (1) is used. The function contains two parameters, namely, and , as stated in Section 2; and exert a considerable influence on the performance of image enhancement. The main idea of applying CS-PSO to search the best parameters pair ( and ) is as follows.
Each position vector of the CS-PSO stands for a candidate parameters pair for and . The initial population is generated with number of solutions randomly within their range and corresponding random velocities and each 6 Computational Intelligence and Neuroscience  solution is a -dimension vector, here is set as 2 that each solution represents 2D candidate parameters. represents the th bird position in the population which denotes a candidate parameter pair and its fitness can be measured by fitness function defined in (6). After calculating all of the fitness values, and can be obtained. In CS each individual is generated by the equation defined in (8). Then, in PSO each particle is disturbed to the direction of best solution as it is reflected in (10) and (11). With the defined movement rules, the algorithm will run until it terminates and outputs the best position as the optimal parameters for and . In all, the basic procedures of image enhancement by using CS-PSO can be depicted with the pseudocode as follows in Pseudocode 2.

Simulation Results and Discussion
In this section, in order to make a comparison for optimization ability, image enhancement technology based on incomplete Beta function has been studied formerly by the authors using some traditional optimization algorithms like GA and PSO, and some newly proposed evaluation algorithms like DSA, BSA, and basic CS. Therefore, comprehensive comparisons are provided between the optimum solutions obtained for these problems using the proposed CS-PSO algorithm and other metaheuristic algorithms.
For a fair comparison of results, the search process is terminated before the maximum number of iterations is attained. The main parameters used for these approaches are as follows: the population for all the algorithms is the same; that is 50, and all these algorithms will terminate after being executed 100 times. Moreover, the selection rate for GA is 0.9, the crossover rate is 0.8, and mutation rate is 0.1. For PSO, the cognitive coefficient 1 = 2.0 and 2 = 2.0; the value of inertia weight is set as 1. For CS, the control parameter Pa = 0.25. For DSA, the control parameter 1 = 0.3 and 2 = 0.3. And for BSA, the special parameter of mix rate is fixed to 1. In the paper, there are two problem specific parameters and . The range of these parameters is the same as [26]. ∈ [0, 10] and ∈ [0, 10].
All of the algorithms are programmed and implemented with Matlab R2012b on a personal computer with 2.53 GHz CPU, 2G RAM running memory in windows XP system. In the paper, four images are used to evaluate the enhancement technique based on CS-PSO. The general information of these four images is shown in   Table 2. On the other hand, in order to show the good quality of the objective function, results of the proposed method are compared with Apurba's method [12], Zhou's method [27], and Eskicioglu's method [28], and the results are given in Tables 3 and 4.
In Table 1, Min-pixel and Max-pixel in last column signify the min and max intensity values of pixel in the original image. BV and WV in Table 2, respectively, indicate the best and worst fitness value of objective function and STD is the variance of the fitness value by making 100 independent operations. In Table 4, the unit of time is the second.   value is slightly more than the proposed method, but for other images, the fitness value is equal or inferior to the proposed method; in addition, as for the value of WV and the variance of the fitness value in average of 100 independence experiments is also worse than the proposed method for all images. As a result, compared with the above methods, the proposed method is relatively more stable. More importantly, it can converge to the optimal solution as quickly as possible.

Comparison of Objective Function.
As could be observed from  optimized by CS-PSO are given in Table 3, and running time of each method is listed in Table 4. Seen from Table 3 Table 4 shows that Zhou's objective function has the shortest running time among these methods. However, it cannot assure the quality of enhanced image. Although Apurba's objective function can obtain acceptable result, its running time is much higher than other three objective functions, which will bring down the efficiency of image enhancement. So, compared with the above three objective functions, the proposed objective function can achieve a better balance between image quality and computing time, which is more feasible in practical image enhancement. The foreground, background, and the target can be clearly distinguished; the noise is effectively rejected. Most of the frequency ingredient obtains prominent enhancement. At the same time, the proposed method has been found to produce comparatively better results for the other test images too.

Conclusion
In summary, a CS-PSO based image enhancement technique for gray-level images is proposed and a novel criterion for measuring quality of the enhanced image is given in the paper. Results of the proposed method are compared with some other image enhancement techniques, like linear contrast stretching, histogram equalization, and incomplete Beta function based image enhancement method optimized with Bijective DSA, BSA, GA, PSO, and CS. It is observed that evolutionary algorithm can be well used in image enhancement according to the quality of enhanced image. Meanwhile, objective function plays a decisive role in evaluating the enhanced image. Among these methods, our method can quickly and stably converge to the optimal solution and the objective function is also better than other methods.