Application of Metaheuristic Algorithms For Optimal Smartphone-Photo Enhancement

You might also like

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

Application of Metaheuristic Algorithms for optimal

Smartphone-photo enhancement

L. M. Rasdi Rere
Faculty of Computer Science
University of Indonesia
Depok, Indonesia
laode.mohammad.ui.ac.id
M. Ivan Fanany
Faculty of Computer Science
University of Indonesia
Depok, Indonesia
ivan@cs.ui.ac.id


Abstract Nowadays taking a photo from smartphones is widely
popular because of their simplicity and convenience, but the
images from them sometimes suffer from illumination and color
distortion, so an enhancement of these images are necessary.
There are many kind of image enhancement have been proposed.
One of them using metaheuristic. In this paper we pursue
efficient metaheuristic algorithms for optimal image
enhancement for smartphonephoto. Several smartphone-photos
and image from benchmark data are used to evaluate the
algorithms. The simulation results show metaheuristic methods
are a possible efficient strategy to improve the quality of image
from smartphone-photo.
Keywordsimage enhancement; metaheuristic algorithm;
smartphone-photo
I. INTRODUCTION
One of the important issues in image processing is image
enhancement. The aim of this technology is to improve the
appearance of an image, including increase the contrast and
sharpen the features, which are to improve their visual quality
of human eyes [1]. Image enhancement does not increase the
intrinsic information in the original image, but it is beneficial
to further image application, such as facilitating image
segmentation, recognising and interpreting useful information
from the image [2].
There are many kinds of image enhancement have been
proposed, one of them using metaheuristic methods to
improve the appearance of the image, including increase the
contrast and sharpen image features. Some papers [3], [4], [5]
report that metaheuristic method outperform than classical
point operation (linier contrast stretching and histogram
equalization).
Metaheuristic is an efficient approaches for many
problems that cannot be solved optimally using deterministic
method within a reasonable time limit. Almost all of these
methods are nature-inspired, based on some principles from
biology, physics or ethology. Another classification of
metaheuristic is Single-solution based metaheuristic and
Population-based metaheuristic [6].
A number of metaheuristic methods have been used to
enhance image from smartphone in recent years. Jung et al [7]
proposed Evolutionary Computing for image enhancement
interface in consideration of the accessibility to the mobile
environment and various constraints. Lee and Cho [8]
proposed an automatic image enhancement tool for
smartphone by using interactive differential evolution (DE). In
this paper we use simulated annealing (SA), DE, particle
swarm optimization (PSO) and harmony search (HS) to obtain
the best optimization for gray-level and color image contrast
enhancement. They were chosen to represent all categories in
metaheuristic algorithms. SA is representation of single-
solution based and physics phenomena. DE represents
population-based and biology phenomena, PSO represent
ethology and also population-based. The last one is HS,
inspired by musical phenomena as well as population based.
The remainder of this paper is organized as follows: Section
2 gives explanation image enhancement problem; Section 3
draws optimization using metaheuristic; Section 4 present
simulation result; and Section 5 the conclusion of this paper.
II. IMAGE ENHANCEMENT
Image enhancement methods selectively emphasize certain
information in an image to strengthen the usability of the
image. This method can be categorized into four classes; (i)
contras enhancement, (ii) edge enhancement, (iii) noise
reduction, and (iv) edge restorations. In this paper, we focus
on contrast enhancement. The techniques usually used for
contrast enhancement, fall into two categories, i.e. indirect
methods and direct methods of contrast enhancement [2].
In spatial domain for gray-level image, the enhancement
uses transformation function which generates a new intensity
value for each pixel of M x N original image to generate the
enhance image, where M denotes the number of columns and
N denotes the number of rows. Thus

g(i, j) = T[f(i, j)] (1)

where f(i, j) is the gray value of the (i, j)
th
pixel of the input
images and g(i, j) is the gray value of the (i, j)
th
pixel of the
enhanced images. T is the transformation function. In this
paper we the transformation T is defined as:

| |
a
y x m y x m c y x f
b y x
M
d y x g ) , ( ) , ( . ) , ( .
) , (
) , ( +
|
|
.
|

\
|
+
=
o
(2)

where m(x, y) and o(x, y) are the gray-level mean and standard
deviation respectively, computed in a neighborhood centered
at (x, y). M is the global mean of the image, f(x, y) is the gray-
level intensity of input image pixel at location (x, y), and g (x,
y) is the pixels output gray-level intensity value, at the same
location [2].
In order to apply an automatic image enhancement
technique, which does not require human intervention, and no
objective parameters given by the user, a criterion for
enhancement method should be chosen. This criterion will be
directly related to the fitness function of the metaheuristic
methods. The objective function below is adopted in this paper
for an enhancement criterion:

)) ( ( .
.
)) ( (
)))). ( ( log(log( ) ( Z I H
PV PH
Z I ne
Z I E Z F =
(3)

Function F(Z) is fitness function for maximization
problem, I(Z) denotes the original image I with the
transformation T in each pixel at location (x, y) applied
according to Eq. (1), where the respective parameters a, b, c,
and d are given by the Z = (a b c d). Furthermore, E(I(Z)) is
the intensity of the edges detected with a Sobel edge detector
that is applied to the transformed image I(Z), ne(I(Z)) is the
number of edge pixels as detected with the Sobel edge
detector, PH and PV are the number of pixels in the horizontal
and vertical direction of the image, respectively. Lastly,
H(I(Z)) measures the entropy of the image I(Z) [2].
III. METAHEURISTIC ALGORITHMS
Metaheuristic provide acceptable solution in a reasonable
time for solving hard and complex problems in science and
engineering. It can be defined as upper level general
methodologies that can be used as guiding strategies in
designing underlying heuristics to solve specific optimization
problems [9]. In this section, we introduce four metaheuristic
algorithms that we use in this paper, i.e. simulated annealing
(SA), differential evolution (DE), and particle swarm
optimization (PSO) and harmony search (HS).
SA was first proposed by Kirkpatrick et al. and also
independently by Cerny. This method is inspired by annealing
technique to obtain solid state of minimal energy or ground
states of matter. This technique consists in heating a material at
high temperature, then in lowering the temperature slowly [6].
Differential Evolution (DE) is one of the latest evolutionary
algorithms applied to continuous optimization problem. Price
and Storn proposed this method in 1995, in order to solve the
Chebyshev polynomial fitting problem and have proven to be a
very reliable optimization strategy for many different tasks. DE
algorithm starts by sampling the search space at multiple,
randomly selected search points and creates new search points
through perturbation of the existing points. Using the operation
of differential mutation and recombination, DE creates new
search points which are evaluated against their parents. Then a
selection mechanism is applied that promotes the winners to
the next generation. This cycle is iterated until the termination
criterion is satisfied [6].
PSO was initially introduced in 1995 by James Kennedy
and Russell Eberhart as a global optimization technique is an
adaptive algorithm based on social-psychological metaphor; a
population of particles adapts by returning stochastically
toward previously successful regions. It uses the metaphor of
the flocking behavior of birds to solve optimization problem
[6].
Harmony Search (HS) is a search algorithm considered to
be a population-based, proposed by Zong Woo Geem et al in
2001 [10]. This method is inspired by musical process of
searching for a perfect state harmony. The harmony in music
is analogous to the optimization solution vector, and the
musicians improvisations are analogous to local and global
search schemes in optimization techniques.

IV. SIMULATION AND RESULTS
The main concern of simulation is to enhance contrast of
gray-level and color image using metaheuristic approaches.
The objective is to maximize the number of pixel in the edges,
increasing the overall intensity at the edges and increase the
measurement entropy.
Since it is difficult to ensure the control parameters in
metaheuristic, in all simulation, we decided to determine the
population size is 20 and stopping criterion is 40 for all
methods. We also set the parameters are looking for that is Z =
(a b c d), with boundaries: a = [0 1.5], b = [0 2], c = [0.5 2],
and d = [0.5 30].
In order to evaluate enhancement result, four images were
used i.e. Cameraman and Lena from benchmarks data image,
while Big-Tree and Campus-Building from smartphone-photo
(Samsung galaxy grand duos GT/19082). This simulation was
implemented in Matlab, with 10 independent runtimes. At the
first time in this program, we convert all images into double
precision for numerical computation, and resize them at
256x256 pixels.
In case of contrast color image enhancement, we convert
RGB (red, green, blue) color space to HSV (hue, saturation,
value) color space, then apply metaheuristic algorithm to the
V component, and convert back to RGB.
Comparison of mean objective function from simulation
result is given in Table I, where the best results are printed in
bold fond. The best result for cameraman image is DE (0.558),
Lena is PSO (0.1521), Campus-Building is DE (0.1541), and
Big-Tree is PSO (0.2085). Fig.1 show original images and the
simulation result of Cameraman, Lena, Campus-Building and
Big-Tree. First row is original image, second row is SA result,
third row is DE result, fourth row is PSO result and last row is
HS result. Evaluations of computation time for all methods are
shown in Fig.2. Illustration from this Chart shows that
computation SA is better than HS, DE and PSO.
TABLE I. MEAN OBJECTIVE FUNCTION OF SIMULATION RESULT
Images F(Z) SA DE PSO HS
Cameraman 0.1367 0.1558 0.1556 0.1419
Lena 0.1237 0.1519 0.1521 0.1452
Campus Building 0.1304 0.1541 0.1485 0.1424
Big-Tree 0.1911 0.2081 0.2085 0.1935




























Fig.1. Enhancement result of four images. Column (a) Cameraman, (b) Lena,
(c) Campus-Building, (d) Big-Tree

V. CONCLUSION
Simulation results in four case studies, i.e. Cameraman,
Lena, Campus-Building and Big-Tree, show that DE and PSO
provide the best objective function compare to SA and HS. SA
present the minimum computation time of enhancement
process compare to DE, PSO and HS.
In order to optimize image contrast enhancement, several
parameters in metaheuristic could be adjusted, where it is
mainly based on empirical evidence and practical experience.
In general, this study proves that metaheuristic approach
was successfully applied to enhance the contrast and detail
four images from benchmark data and smartphone-photo,
where the objective function from all methods are better than
the original image. This method could prospectively be
employed to optimize for other image processing field, such as
image segmentation, feature extraction and classification
tasks.













Fig.2. Computation time of simulation, best result: Cameraman (SA = 4.14),
Lena (SA = 5.39), Campus-Building (SA = 5.43), Big-Tree (HS = 5.15)

REFERENCES

[1] H.D. Cheng and Huijuan Xu, A novel fuzzy logic approach to contrast
enhancement, Pattern Recognition 33 (2000) 809-819.
[2] L.S. Coelho, J. G. Sauer and M. Rudek,Differential evolution
optimization combined with chaotic sequences for image contrast
enhancement, Chaos, Solitons and Fractals 42 (2009) 522 29.
[3] C. Munteanu and A. Rosa,Grey-Scale enhancement as an automatic
process driven by evolution, IEEE Transaction on systems, man, and
cybernetics Part B: Cybernetics, vol. 34, no. 2, pp. 1292 1298, April
2004.
[4] C. Munteanu, and A. Rosa,Towards automatic image enhancement
using genetic algorithms, in Proceeding of the congress on evolutionary
computation, San Diego, CA, USA, vol.2: 2000.pp. 1535 1542.
[5] Gorai, A. and Ashhis Ghosh, Gray-level Image Enhancement by
Particle Swarm Optimization, World Congress on Nature &
Biologically Computing (NaBIC 2009)
[6] Boussaid, Ilhem, Julien Lepagnot, and Patrict Siarry, A survey on
optimization metaheuristics, Information Science 237 (2013) 82 117.
[7] T. Jung, Y. S. Lee and S. Cho,Mobile Interface for Adaptive Image
Refinement using Interactive Evolutionary Computing, WCCI IEEE
Word Congress on Computational Intelligence, Barcelona, Spain, July
2010.
[8] M. C. Lee and S. B. Cho,Interactive Differential Evolution for Image
Enhancement Application in Smart Phone, WCCI IEEE Word
Congress on Computational Intelligence, Brisbane, Australia, June 2012.
[9] El-Ghazali Talbi. Metaheuristics from Design to Implementation. John
Wiley & Sons, Inc, 2009.
[10] K. S. Lee and Zong Woo Geem, A new meta-heuritic algorithm for
continuous engineering optimization: harmony search theory and
practice, Comput. Methods Appl. Mech. Engrg. 194 (2005) 3902
3933.

(a) (b) (c) (d)

You might also like