Parameter Optimization in Image Enhancement Using PSO

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

American Journal of Engineering Research (AJER)

2013

American Journal of Engineering Research (AJER) e-ISSN : 2320-0847 p-ISSN : 2320-0936 Volume-02, Issue-05, pp-84-90 www.ajer.us Research Paper Open Access

Parameter Optimization In Image Enhancement Using PSO


Nirmal Singh1, Maninder kaur2, K.V.P Singh3
1(ECE, DIET Kharar/ PTU Jalandhar, India) 2(ECE, DIET Kharar/ PTU Jalandhar, India) 3(ECE, DIET Kharar/ PTU Jalandhar, India)

Abstract: In this paper parameters of the transformation function is considered as an optimization problem and Particle Swarm Optimization (PSO) is used to solve it.(PSO) algorithms is a new approach for optimization. With intensity transformation function image enhancement is done by maximizing the information content of the enhanced image. In this work a parameterized transformation function is used, which uses local and global information of the image. Here an objective criterion for measuring image enhancement is used which considers entropy and edge information of the image. We tried to achieve the best enhanced image according to the objective criterion by optimizing the parameters used in the transformation function with the help of PSO. Results are compared with other enhancement techniques, viz. Histogram equalization, contrast stretching based image enhancement. Keywords: Particle swarm optimization, image enhancement and histogram equalization. I. INTRODUCTION

Image enhancement, one of the important image processing techniques, can be treated as transforming one image to another to improve the interpretability or perception of information for human viewers, or to provide better input for other automated image processing techniques. According to [16], image enhancement techniques can be divided into four main categories: point operation transformation, spatial operation, and pseudo coloring. The work done in this paper is based on spatial operation. Histogram transformation is considered as one of the fundamental processes for contrast enhancement of gray-level images [15], which facilitates subsequent higher level operations such as detection and identification. Linear contrast stretching employs a linear transformation that maps the gray-levels in a given image to fill the full range of values. Pseudo coloring is an enhancement technique that artificially color the gray- scale image based on a color mapping, with the extensive interactive trials required to determine an acceptable mapping [16]. Color images can be enhanced by separating the image into the chromaticity and intensity components [17]. Majority of the image enhancement work usually manipulates the image histogram by some transformation function to obtain the required contrast enhancement. Consequently, this operation also delivers the maximum information contained in the image. Evolutionary algorithms have been previously used to perform image enhancement [1] [5]. In [1], the authors applied a global contrast enhancement technique using genetic programming (GP) [11] to adapt the color map in the image so as to fit the demands of the human interpreter. In [2] a real coded GA is used with a subjective evaluation criterion to globally adapt the gray-level intensity transformation in the image. Combination of different transformation n functions with different parameters is used to produce the enhanced image by GA in [5].In this paper we have performed gray-level image contrast enhancement by PSO. In comparison to Linear Contrast Stretching (LCS) and Histogram Equalization (HE), PSO does not require selection, crossover and mutation operations. At the same time PSO takes less time to converge to a better optima. The resulted gray-level enhanced images by PSO are found to be better compared with other automatic image contrast enhancement techniques. Both objective and subjective evaluations are performed on the resulted image which says about the goodness of PSO. The rest of the paper is organized as follows: In Section II, functions used for the proposed work (transformation and evaluation function) are described. In Section III, theory of PSO (basic PSO, proposed methodology, parameter setting) is discussed. In Section IV, results and discussions are put, and finally in Section V, conclusion of the work is made. www.ajer.us Page 84

American Journal of Engineering Research (AJER)


II. FUNCTIONS USED

2013

For image enhancement task, a transformation function is required which will take the intensity value of each pixel from the input image and generate a new intensity value for the corresponding pixel to produce the enhanced image. To evaluate the quality of the enhanced image automatically, an evaluation function is needed which will tell us about the quality of the enhanced image. In this section we describe the function used for the proposed work. A. Transformation function Image enhancement done on spatial domain uses a trans- form function which generates a new intensity value for each pixel of the MxN original image to generate the enhanced image, where M denotes the number of columns and N denotes the number of rows. The enhancement process can be denoted by : , = , (1)

Where f(x, y) is the input image, g(x, y) is the output (processed) image, and T is an operator on f defined over a specified neighborhood about point (x, y). In addition, T can operate on a set of images, such as performing the addition of K images for noise reduction. The principal approach for defining spatial neighborhoods about a point (x, y) is to use a square or rectangular region centeredat (x, y). The center of the region is moved from pixel to pixel starting, say, at the top, left corner, and, as it moves, it encompasses different neighborhoods. Operator T is applied at each location (x, y) to yield the output, g, at that location. Only the pixels in the neighborhood centered at (x, y) are used in computing the value of g at (x, y). , = , , . , + ( , ) (2)

Where,a andc are the parameters whose value is to be optimized. m(x, y) is local mean over a window of n x n. , Is enhancement function which takes both local and global information into account. Expression for local mean and enhancement function are defined as: , =
1 x 1 =0 1 =0 (, )

(3)
1 1

( , )
=0 =0

The enhancement function K x, y can be defined as: , =


. , +

(4)

Where,b and kare the parameters to optimize. D is the Global mean of the input image. x, y is local Standard Deviation over a window of n x n x, y is defined as : , =
1 1 =0 1 =0

, ,

(5)

Hence, the complete transformation function is defined as follows: , =


. , +

, . ,

+ ( , )

(6)

With the transformation stated in eq. (6) contrast of the image can be stretched considering local mean as the centre of stretch. The last term m(x, y)a has brightening & smoothing effect thus smooths the output image and the four parameters introduced in the transformation function i.e. a, b, c & k are the parameters of the enhancement function and the small variation in their value produces a large variation in the processed output image and thus the value of these parameters should be precisely set. The approximate range of these parameters is defined as: a [0, 1.5]; b [0, (D/2)]; c [0, 1]; K [.5, 1.5].

www.ajer.us

Page 85

American Journal of Engineering Research (AJER)

2013

A. Evaluation Criterion In order to evaluate the performance of the proposed algorithm and the quality of an enhanced image without human intervention, we need an objective function which tells us about thequality of the output image. Many objective functions are presented in literature [45]-[47]. It is observed that compared to the original image good contrast enhanced image has more number of edgels i.e. number of edge pixels and enhanced version should have a higher intensity of the edges. But these two measures are not sufficient to test an enhanced image and that why one more performance measure is taken into account i.e. entropy value of the image. Entropy value reveals the information content in the image. If the distribution of the intensities is uniform, then we can say that histogram is equalized and the entropy of the image will be more. Thus, the objective function considered here uses three performance measures i.e. entropy value, sum of edge intensities value and number of edgels (edge pixels) and is defined as: = ( ( ( )))

( )

(7)

In the above mentioned equation Ienh is the enhanced image resulted from the transformation function defined above. In eq. 4.8 the edges or edgels can be detected by many efficient edge detector algorithms such as Sobel [1], Laplacian [1], Canny [5] etc. In this study Canny is used as an automatic threshold detector [15]. Cannys edge detection algorithm is computationally more expensive compared to Sobel, Prewitt and Roberts operator. However, the Cannys edge detection algorithm performs better than all these operators under almost all scenarios and thus in this work after using Canny edge operator we produce an edge image I C. E(Ic )is the sum of M x N pixels intensities of canny edge images. nis the number of pixels, whose intensity value is greater than a threshold in canny edge image. Entropy of the enhanced image Ienh is given by: = 1 =0 Where, 2 , 0 = 0, (8) (9)

III.

THEORY OF PSO

PSO algorithm is a population based search algorithm based on the simulation of the social behavior of birds within a flock. The initial intent of the particle swarm concept was to graphically simulate the graceful and unpredictable choreography of a bird flock, with the aim of discovering patterns that govern the ability of birds to fly synchronously, and to suddenly change direction with a regrouping in an optimal formation. B. PSO Algorithm In PSO, individuals are referred to as particles, which are flown through hyper dimensional search space [49]. Change in the position of each particle within the search space is based on the social psychological tendency of particle to emulate the success of other particle. The change to a particles position within the swarm is therefore influenced by the past experience, or by the knowledge of its neighbours. The search behaviour of a particle is thus affected by that of other particles within the swarm (PSO is therefore a kind of symbiotic cooperative algorithm). Particle Swarm optimization technique has mainly two primary operators: Velocity update Position update During each generation each particle is accelerated toward the particles previous best position (pbest) and the global best (gbest) position and new velocity value for each particle is calculated based on: Its current velocity. The distance from its previous best position. The distance from the global best position. The new velocity value is then used to calculate the next new position of the particle in the search space. In PSO, initially each potential sol ution is assigned a randomized velocity and is flown through the problem space. Each particle adjusts its flying according to its own flying experience and its companion flying experience. t t t t vi t+1 = w. vit + c1 . r1 [pbest t i X i ]+c2 . r2 [gbest X i ] (10) t+1 Xi = Xit + vi t+1 Where; vit is velocity of ith particle at iteration t, wis weight inertia. www.ajer.us Page 86

American Journal of Engineering Research (AJER)


c1, c2 is Acceleration Constants. r1, r2 is random number between 0 and 1. xit is current position of ith particle at iteration t, pbesti is personal best of ith particle, gbest is global best value of the group.

2013

C. Proposed Methodology In the proposed method an enhanced image produced from a transformation function which incorporates both global and local information of the input image defined in eq. 4.7 is used. The function also contains four parameters namely a, b, c, k which are used to produce diverse result and help to find the optimal one according to the objective function. These four parameters have their defined range which is described above. Now our aim is to find the best set of values for these four parameters which can produce the optimal result and to perform this work PSO is used. P number of particles are initialized, each with four parameter a, b, c and k by the random values within their range and corresponding random velocities. It means position vector of each particle X has four component a, b, c and k. Now using these parameter values, each particle generates an enhanced image. Quality of the enhanced image is calculated by an objective function defined in eq. 4.8 which is termed as fitness of the particle. Fitness value of all the enhanced images generated by all the particles is calculated. From these fitness values pbest&gbest are found. In PSO the most attractive property is that pbest&gbest are found according to their fitness values. With the help of these best values, component wise new velocity of each particle is calculated to get the new solution. In this way new positions of particles are created for generations. When the process is completed the enhanced image is created by the global best (gbest) particle, as it provides the maximum fitness value and the image is displayed as the final result. Main steps for PSO algorithm is as follows: Initialize number of particles with random position and velocity. Evaluate the fitness value for each particle. Evaluate gbest. Evaluate pbest. Update velocity & position. Evaluate the fitness value for new position If condition is fulfilled gbest is the solution else repeat above steps The pseudocode for the proposed methodology : Repeat fori = 1 to number of particles do ifG(Xi) >G(pbesti) then G() evaluates goodness for d = 1 to dimensions do pbesti = Xi // pbesti is the best state found so far end for end if gbest = i// arbitrary for j = indexes of neighbours do if G(pbestj) > G(gbest) then gbest = j // gbest is the index of the best performer in the neighbourhood end if end for for d = 1 to number of dimensions do Vit = f (Xi(t 1), Vi(t 1), pbesti, gbest) //Update velocity Vi = (Vmax, + Vmax) Xit = f (Vit, Xit 1) //Update position end for end for until stopping criteria end procedure D. Parameter setting The result of PSO algorithm for image enhancement is very much parameter dependent and fine tuning of these defined parameters is required in order to get the better result than other optimization algorithms. Parameter w used in eq. 10 plays an important role in balancing the global & local search and is known as inertia weight. Maximum and minimum value for this is set to two and zero respectively, which is same for all www.ajer.us Page 87

American Journal of Engineering Research (AJER)

2013

particles. It may have fixed value throughout the procedure but in our case we start with maximum inertia value i.e. 2 and gradually reduce it to minimum. Therefore, initially inertia component is large and explore larger area in the solution space, but gradually inertia component becomes small and exploit better solutions in the solution space. Inertia value w is calculated as follows: =

(11)

Where, t is the ithiteration and tmax is the total number of iteration. Parameters c1&c2 are positive acceleration constants, given a random number between 0 & 2. These parameters are fixed for each particle throughout its life. c1 is also known as cognitive coefficient and it controls the pull to the personal best position while c2 is known as social-rate coefficient and it control the pull to the global best position. r 1called cognition random factor & r2 called social learning random factor. These are random numbers in [0, 1] and varies for each component of the particles in every generation. These have important effect on balancing the global & local search. The experiment proves that the four parameter to be optimized i.e. a, b, c & k give better results if there values are selected in the following range a [0, 1.5]; b [0, (D/2)]; c [0, 1]; K [.5, 1.5]Where D is the global mean of the original image.

IV.

RESULT AND DISCUSSION

The experimentation is done for the four images shown below. Results of the proposed method is compared with two other methods, namely (i)linear contrast stretching (LCS),(ii) histogram equalization (HE)

Figure (a): Original imageFigure (b): Image obtained by LCS Figure (c): Image obtained by HEFigure (d): Image obtained by PSO

P/I/W thirdcolumnofTable-1signify the number of particles maximum number of generation sand window size taken to extract the local information correspondingly. www.ajer.us Page 88

American Journal of Engineering Research (AJER)


V. CONCLUSION

2013

Results of the proposed technique are compared with some other image enhancement techniques, like linear contrast stretching, histogram equalization based image enhancement. Most of the times it is observed that our technique is giving better result compared to other techniques mentioned above. In PSO, the most important property is that, it can produce better result with proper tuning of parameters. But in case of contrast stretching and histogram equalization, they always produce only one enhanced image for a particular. In this paper we have propose a PSO based automatic image enhancement technique for gray level images. In this paper we have propose a PSO based automatic image enhancement technique for gray level images VI .Acknowledgment

VI.

ACKNOWLEDGMENT REFERENCES

Authors would like to thank the department of electronics and communication engineering, diet, kharar.
Cambridge University Press 978-0-521-86085-7 Digital Image Processing for Medical Applications R. C. Gonzales and R. E. Woods, Digital Image Processing. Addison-Wesley, 2009. A. K. Jain, Fundamentals of Digital Image Processing. Englewood Cliffs, NJ: Prentice -Hall, 1991. A. Zagzebski, Essentials of Ultrasound Physics. St. Louis, Missouri: Mosby, 1996. J. Canny, A Computational Approach To Edge Detection, IEEE Trans.Pattern Analysis and Machine Intelligence., vol. 8, pp. 679-714, 1986. T. Peli and J. S. Liin, Adaptive filtering for image enhancement, Optical Eng., vol. 21, no. 1, pp. 108 -112, 1982. S. M. Pizer, J. B.Zimmerman, and E. V. Staab, Adaptive grey level assignment in CT scan display, J. Comput. Assist. Tomogr.,vol. 8, pp. 300-308, 1984. M. I. Sezan, A. M. Tekalp, and R. Schaetzing,Automatic anatomically selective image enhancement in digital chest radiography, IEEE Trans. Med. Imag., vol. 8, pp. 154-162, 1989. Ji, T.-L., Sundareshan, M.K.; Roehrig, H., Medical Imaging, IEEE Transactions on Volume: 13 , Issue: 4, Page(s): 573 586, 1994 B.T. Chen; Y.S. Chen; W.H. Hsu; Automatic histogram specification based on fuzzy set operations for image enhancement, Signal Processing Letters, IEEE Volume: 2 , Issue: 2, PP: 37 40, 1995 F. Russo and G. Ramponi, "An Image Enhancement Technique Basedon the FIRE Operator", IEEE international Conference on Image Processing, KIP-95, October 22-25, 1995 T. K. Kim; J. K. Paik; B. S. Kang, Contrast enhancement system using spatially adaptive histogram equalization with temporal filtering, Consumer Electronics, IEEE Transactions on Volume: 44 , Issue: 1, PP: 82 87, 1998 S.C. Matz, R.J.P Figueiredo, A nonlinear technique for image contrast enhancement and sharpening, Proceedings of the IEEE International Symposium on Volume: 4, PP: 175 178, 1999. K. Horio, T. Haraguchi, T. Yamakawa, An Intuitive Contrast Enhancement of an Image Data Employing the Self -organizing Relationship, IJCNN '99. Vol: 4, PP: 2710 2714, 1999. F. Saitoh, Image Contrast Enhancement Using Genetic Algorithm, IEEE International Conference on Volume: 4, PP: 899 904, 1999. U. Bidarte, J.L. Martin, A. Zuloaga, J. Ezquerra, Adaptive Image Brightness and Contrast Enhancement Circuit for Real -Time Vision Systems, Proceedings of IEEE International Conference on Volume: 1, PP: 421 426, 2000. F. Russo, An image enhancement technique combining sharpening and noise reduction., IEEE Transactions onVolume: 51 , Issue: 4, PP: 824 828, 2002 J. L. Starck, F. Murtagh, E. J. Candes, D. L. Donoho, Gray and colour image contrast enhancement by the curvelet transform, Image Processing, IEEE Transactions on Volume: 12 , Issue: 6, PP : 706 717, 2003. J. T. Cheng, B. Hsieh, W. S. Jyh, Image contrast enhancement based on intensity -pair distribution,IEEE International Conference on Volume: 1, PP : 913-916, 2005 L. Q. Hiep, P. Smet, W. Philips, Image interpolation using constrained adaptive contra st enhancement techniques, IEEE International Conference on Volume: 2, PP: II - 998-1001, 2005. Z. Y. Chen, B. R. Abidi, D. L. Page, M. A. Abidi , A Generalized and Automatic Image Contrast Enhancement Using Gray Level Grouping, Acoustics, Speech and Signal Processing, IEEE International Conference on Volume: 2, 2006 Z. Y. Chen, B. R. Abidi, D. L. Page, M. A. Abidi , Gray-level grouping (GLG): an automatic method for optimized image contrast enhancement - part II: the variations Image Processing, IEEE Transactions on Volume: 15 , Issue: 8, PP: 2303 2314, 2006. E. Nezhadarya, M. B. Shamsollahi, Image Contrast Enhancement by Contourlet Transform, Multimedia Signal Processing and Communications, 48th International Symposium ELMAR, PP: 81 84, 2006. X. Jianmao, S. Junzhong, Z. Changjiang, Non -linear Algorithm for Contrast Enhancement for Image Using Wavelet Neural Network, Control, Automation, Robotics and Vision, PP: 1 6, 2006. Y. Hu, B. Li, J. Zheng, B. Yu, An Adaptive Image Enhancement Based on the Vector Closed Operations, Image and Graphics, ICIG, Fourth International Conference, PP: 75 80, 2007 K. A. Panetta, E.J. Wharton, S.S. Agaian, Human Visual System -Based Image Enhancement and Logarithmic Contrast Measure, Systems, Man, and Cybernetics, Part B: Cybernetics, IEEE Transactions on Volume: 38, Issue: 1, PP: 174 188, 2008. T. Chun-Ming, Y. Zong-Mu, Contrast Enhancement by Automatic and Parameter -Free Piecewise Linear Transformation for Colour Images, Consumer Electronics, IEEE Transactions on Volume: 54, Issue: 2, PP: 213 219, 2008. Z. Tiedong, W. Lei, X. Yuru, L. Yu, Sonar Image Enhancement Based on Particle Swarm Optimization, Industrial Electronics and Applications, 3rd IEEE Conference Page(s): 2216 2221, 2008. S. Te-Jen, L. Tzu-Hsiang, L. Jia-Wei, Particle Swarm Optimization for Gray -Scale Image Noise Cancellation, Intelligent Information Hiding and Multimedia Signal Processing, International Conference, PP: 1459 1462, 2008. A. Choudhury, G. Medioni, Perceptually Motivated Automatic Color Contrast Enhancement, Computer Vision Workshops, IEEE 12th International Conference, PP: 1893 1900, 2009.

[1]. [2]. [3]. [4]. [5]. [6]. [7]. [8]. [9]. [10]. [11]. [12]. [13]. [14]. [15]. [16]. [17]. [18]. [19]. [20]. [21]. [22]. [23]. [24]. [25]. [26]. [27]. [28]. [29]. [30].

www.ajer.us

Page 89

American Journal of Engineering Research (AJER)


[31].

2013

[32].

[33]. [34]. [35]. [36]. [37]. [38]. [39]. [40]. [41]. [42]. [43]. [44]. [45].

P. Jagatheeswari, S. S. Kumar, M. Rajaram, Contrast Stretching Recursively Separated Histogram Equalization for Brightness Preservation and Contrast Enhancement, Advances in Computing, Control, & Telecommunication Technologies, International Conference, PP: 111 115, 2009. T. R. Benala, S.D. Jampala, S.H. Villa, B. Konathala, A novel Approach to Image Edge Enhancement Using Artificial Bee Colony Optimization Algorithm for Hybridized Smoothening Filters, Nature & Biologically Inspired Computing, World Congress, Page(s): 1071 1076, 2009. L. Ching-Hsi, H. Hong-Yang, W. Lei, A New Contrast Enhancement Technique by Adaptively Increasing the Value of Histogram, Imaging Systems and Techniques, IEEE International Workshop, PP: 407 411, 2009. T. Arici, S. Dikbas, Y. Altunbasak, A Histogram Modification Framework and Its Application for Image Contrast Enhancement, Image Processing, IEEE Transactions on Volume: 18, PP: 1921 1935, 2009. J. Kenndy and R. C. Eberhart, Particle Swarm Optimization, Proceedin gs of IEEE International Conference on Neural Networks, pp 1942-1948, 1995. A. P. Engelbrecht, Computational Intelligence - An Introduction, Chichester, England: John Wiley and Sons, 2007. J. Kennedy and R. Eberhart. Swarm Intelligence, Morgan Kaufmann Publishers, Inc., San Francisco, CA, 2001. Kennedy, J. Small worlds and megaminds: Effects of neighborhood topology on particle swarm performance, in Proceedings of IEEE Congress on Evolutionary Computation, pages 1931 1938, 1999. R. Poli, S. Cagnoni, Evolution of pseudo-coloring algorithms for image enhancement, Univ. Birmingham, CSRP - 97-5, 1997. C. Munteanu, V. Lazarescu, Evolutionary contrast stretching and detail enhancement of satellite images, in Proc. Mendel, Be rno, Czech Rep., pp. 94-99, 1999. C. Munteanu, A. Rosa, Evolutionary image enhancement with user behavior modeling, ACM SIGAPP Applied Computing Review, vol. 9, no. 1, pp. 8-14, 2001. F. Saitoh, Image contrast enhancement using genetic algorithm, in Proc. IEEE SMC, Tokyo, Japan, pp . 899-904, 1993. S. K. Pal, D. Bhandari, M. K. Kundu, Genetic algorithms for optimal image enhancement, Pattern Recognition Letter, vol. 15, pp. 261-271, 1994. T. Back, D. Fogel and Z. Michalewicz, Handbook of Evolutionary Computation, Oxford Univ. Press, London, U.K., 1997. S. Jingquan, F. Mengyin, Z. Chanjian, An image enhancement algorithm based on chaotic optimization, Computer Engineering and Applications, vol. 27, pp. 4-6, 2003.

www.ajer.us

Page 90

You might also like