Journal of Information & Computational Science 11:16 (2014) 5895–5903 Available at

Journal of Information & Computational Science 11:16 (2014) 5895–5903
Available at http://www.joics.com
November 1, 2014
An Image Retrieval Algorithm Based on Improved
Electromagnetism-like Mechanism
Jianguo Jiang ∗, Juan Wang, Mingxiang Zang, Wenhong Zhou
School of Electronic Engineering, Xidian University, Xi’an 710071, China
Abstract
In view of the advantages, such as the simplicity for understanding and high convergence rate of
Electromagnetism-like Mechanism (EM) algorithm, an image retrieval algorithm based on improved
EM is proposed in this paper. The novel algorithm assigns distinct weights to each block of the image,
which represents the extent of human eyes’ preference to different areas when recognizing this image.
The Chaos Search (CS) is used in local search in order to prevent the retrieval process from falling into
a local optimum leading to a premature convergence. A genetic coefficient is added to the updating
formula so that the particles are more likely to move into other feasible regions. The experimental
results demonstrate that the improved EM algorithm can figure out the best matching image rapidly
and accurately.
Keywords: Electromagnetism-like Mechanism; Image Retrieval; Chaos Search; Global Optimization
1
Introduction
Electromagnetism-like Mechanism (EM) algorithm [1, 2] is a new heuristic global optimization
algorithm proposed by Birbil and Fang in 2003. The idea evolved from the attraction and elimination mechanism between the charged particles. This algorithm itself is very simple while in
the same time it requires few resources but can converge to the optimal in a high rate. In recent
years, EM algorithm has become a hot research topic for solving global optimization problems.
With the rapid development of multimedia and Internet technology, the management of large
amounts of images and image retrieval are becoming increasingly important. Conventional marking method [4, 5] has been unable to meet people’s desire. More and more researches pay their
attentions on how to retrieve image quickly by visual features of image. In recent years, a lot of
novel optimization algorithms are applied to image retrieval. Xu Li [6] proposed a image retrieval
relevance feedback algorithm based on particle swarm optimization. In this method, initial results are generated randomly by using particle swarm algorithm, then particle swarm optimization
evolutionary search process is combined with feedback, finally particle swarm algorithm runs repeatedly to achieve the purpose of retrieving target image by modifying the parameters based on
∗
Corresponding author.
Email address: [email protected] (Jianguo Jiang).
1548–7741 / Copyright © 2014 Binary Information Press
DOI: 10.12733/jics20104901
5896
J. Jiang et al. / Journal of Information & Computational Science 11:16 (2014) 5895–5903
feedback result. However, the single feature and complex computation process of this algorithm
resulting in low efficiency and accuracy. Shicai Yu [7] proposed an image retrieval method by
using genetic algorithm and adjusting feature weight. This method uses group search technology,
and adjusts the weight of new populations constantly. This method can improve the retrieval
accuracy to some extent, but it is still not very satisfactory. At present, EM algorithm has not
been applied to image retrieval, so in this paper, EM algorithm will be improved and applied to
image retrieval.
EM algorithm has the feature of leading search particles to local optimum of feasible regions
which meets the need of image retrieval. The high convergence rate improves the probability of
successfully retrieving the target image with high retrieval efficiency. EM algorithm can effectively
avoid getting to premature local optimum which can make the search adaptively adjust the
direction targeting the optimal soon.
2
2.1
Image Retrieval and Improved EM Algorithm
Image Retrieval
The central problem of image retrieval is to find the images relevant to that submitted by the user
from the image library. Traditional image retrieval methods rely on artificial text annotation of
the images. This method has disadvantages of strong subjectivity and time-consuming. Therefore,
content-based image retrieval technology [4] emerges, which mainly considers the characteristics
of image.
The features [8] of an image are a description of some content of image and understanding by
image retrieval systems. It largely determines the capabilities of retrieval systems. Broadly, the
features of an image include text features and visual features. Text features include keywords
and tagging, while visual features include color, texture, shape and spatial relationships. Color
features are selected as retrieval features because color features computation are simple and color
features are the most sensitive for human eyes when observing images.
2.2
Improved EM Algorithm
EM is a heuristic global optimization algorithm which uses stochastic search. It generates an
initial solution (i.e. the initial population) from feasible regions, and then imitates the attraction
and elimination mechanism between the charged particles. The charge of particles and the search
scope are determined according to objective function value of each solution. EM algorithm regards
each solution as a charged particle, and then generates next populations on the basis of the update
rules of the algorithm until the solution meets termination condition defined by users.
EM algorithm mainly research unconstrained optimization problems, namely to find the optimal
value of a real-valued function, the mathematical model is:
{
min f (x)
(1)
s.t. x ∈ [l, u]
where f (x) is the objective function, [l, u] = {x ∈ Rn |lk ≤ xk ≤ uk , k = 1, 2, · · · , n}.
J. Jiang et al. / Journal of Information & Computational Science 11:16 (2014) 5895–5903
5897
But classical EM algorithm uses stochastic linear search [10, 11] in local search stage. It results
in that the search process can easily fall into local optimum, and the particles’ moving step
length is determined without considering the effects of particles’ merits and evolution algebra.
Therefore, an improved algorithm named hybrid Chaos search Electromagnetism-like Mechanism
algorithm (CEM) will be proposed in this paper. Hybrid chaos search is used in local search to
avoid premature convergence. Then good point set [12] is used to generate initial population.
And genetic variation coefficient is added to particle’s update formula so that the particles are
more likely to move into the other feasible regions.
3
Image Retrieval Algorithm
In applying the CEM algorithm to image retrieval, each image in the library is mapped to a
particle of CEM algorithm. Each image’s feature vector is extracted and used to calculate the
similarity (i.e. the value of objective function) to the target image. CEM algorithm finally outputs
the particle with best objective function value.
3.1
Objective Function Construction
Since color features are simple, they are selected to be used in CEM for image retrieval. As RGB
color model aims hardware while HSV color model users, HSV color model is taken in order to
reflect people’s understanding of images. Therefore, RGB color model has to be firstly converted
to HSV color model [13, 14].
Assuming the resolution of image P is m × n, so the size of RGB vector is m × n × 3. If
these data is considered as feature, a problem appears that feature dimension is too large and not
identical. In order to solve this problem, the new method proposed in this paper preprocesses
images first. The specific process is that each image with m × n resolution is divided into l × l
blocks and each block contains ml × nl pixels. The blocking equation is as following:
(i+1)× m
l
∑
C(i, j) =
(j+1)× n
l
∑
i′ =i× m +1 j ′ =j× n +1
l
l
m
l
×
n
l
C(i′ , j ′ )
(2)
where i, j ∈ (1, 2, · · · , l), i′ ∈ (1, 2, · · · , m), j ′ ∈ (1, 2, · · · , n), C(i′ , j ′ ) represents h, s, v in point
(i′ , j ′ ), C(i, j) represents the average h, s, v in block (i, j) after blocking. l is 4 in the experiments
in this paper, so feature vector size of image P is 4 × 4 × 3, namely 48.
Taking the different importance degrees when people observe different regions into account,
the weight coefficients for different regions are designed. Each image is divided into 4 × 4 block,
weight coefficients of the regions are shown in Table 1.
As can be seen from Table 1, the more close the block is to the center, the larger weight
coefficient it gets. It reflects that people pay more attention to center region when they observe
objects; thereby the retrieval accuracy is enhanced.
The particle in CEM algorithm is encoded with vector h, s, v in image P . The encoding equation
follows:
x12i+3j−15+r = Cr (i, j) × w(i, j)
(3)
5898
J. Jiang et al. / Journal of Information & Computational Science 11:16 (2014) 5895–5903
Table 1: Weight coefficients for each block
0.02
0.04
0.04
0.02
0.04
0.15
0.15
0.04
0.04
0.15
0.15
0.04
0.02
0.04
0.04
0.02
where i, j ∈ {1, 2, 3, 4}, r ∈ {1, 2, 3}, x12i+3j−15+r represents the independent variable in dimension
12i + 3j − 15 + r of the particle. When r is 1, 2 or 3, Cr (i, j) represents C(i, j) of h, s, v vector
respectively.
Image retrieval is to figure out the image most similar to the target from the library. Euclidean
distance [15] is used to evaluate the similarity between two images, which is also being used to
define the objective function. The equation is as:
v
u 48
u∑
f (x) = t
(xi − xi∗ )2
(4)
i=1
where xi∗ is dimension i of the particle that corresponds to the target image, while xi is dimension
i of the particle that corresponds to be retrieved. Large f (x) means low similarity, therefore f (x)
is computed as the target function of CEM.
3.2
3.2.1
Image Retrieval Process
Initialization
Good point set is used to generate m points {x1 , x2 , · · · , xm } as initial population from feasible
region, where xi = {x1i , x2i , · · · , xni }(i = 1, 2, · · · , m), n is the number of dimensions of the problem
which is set to 48 in this paper. Then the f (x) value of each particle is computed, the particle
with the greatest f (x) is marked as xbest .
3.2.2
Chaos Local Search
When EM algorithm is used to retrieve image, the search process of this algorithm is simple
neighborhood linear search. The search range is small and the search step is constant which
resulting in that the retrieval process will easily fall into local optima, thereby the retrieval speed
and effect is affected. Since the ergodicity of the chaos can prevent search process falling into
local optima, it is used in local search process of image retrieval.
The basic idea of chaos is to introduce chaos status to optimization variable by using mapping
model Logistic, and to enlarge the traversing range of chaos to the range of optimization variable,
then search the optimal particle with chaos variable. The entire solution space will be inspected
with ergodic track. When the termination condition is meet, the best status searched is close to
the optimal solution to the problem. Specific process is described as following:
Step 1: Let y = xbest which saves the current optimum. The solution space is mapped to the
J. Jiang et al. / Journal of Information & Computational Science 11:16 (2014) 5895–5903
5899
chaotic space with the following formula:
zk (0) =
yk (0) − lk
, k = 1, 2, · · · , n
uk − lk
(5)
Step 2: Logistic chaotic iteration is operated on variable z with the following formula:
zk (t) = η · zk (t − 1) · (1 − zk (t − 1))
(6)
where z ∈ [0, 1] is a chaos variable in the t-th search process (t = 1, 2, · · · , LSIT ER) and
η is the control parameter. For η = 4, the system is in a complete chaotic state;
Step 3: Map the chaotic space back to the solution space;
yk (t) = lk + (uk − lk ) · zk (t)
(7)
Step 4: Calculate the objective function value f (y). If the new value is smaller than the previous
one, update the particle until the termination criterion is meet.
3.2.3
Calculation of Total Force Vector
The charge of each particle is evaluated as,



f (xi ) − f (xbest ) 

qi = exp 
m
−n ∑

(f (xk ) − f (xbest ))
(8)
k=1
Obviously, points that have smaller (better) objective values possess higher charges.Like electrical charges, the force exerted on a point via another point is calculated, and the total force
exerted on a point is computed according to the superposition principle of electromagnetism theory. F ij and F i represent the force exerted on particle i from particle j and the total force exerted
on particle i, respectively, and then:

qi qj


 (xj − xi ) ||xj − xi ||2 , f (xj ) < f (xi )
Fij =
(9)
qi qj


, f (xj ) ≥ f (xi )
 (xi − xj )
||xi − xj ||2
Fi =
m
∑
Fij
(10)
j̸=i
According to Equation (9), the direction of a particular force between two points is decided by
their objective function values. And, between two points, the particle that has a better objective
function value attracts the other one. Contrarily, the particle with worse objective function value
repels the other.
5900
3.2.4
J. Jiang et al. / Journal of Information & Computational Science 11:16 (2014) 5895–5903
Movement According to the Total Force
In the standard EM algorithm, the effects of the quality of particles and the number of iterations
on the feasible step length are not taken into consideration. In order to make the optimums
become more accurate, an adaptive mobile operator is designed as following:
)
(
1 π
i
Φ = (1 − q ) sin √ ·
(11)
t 2
where t denotes the order of the current iteration.
The heredity makes the species remain relatively stable, while the variation makes it possible
for the species to evolve. The idea of genetic variation in the theory of biological evolution is
also introduced into the CEM algorithm. A genetic coefficient is added to the Equation (11), so
that the particles are more likely to move to the other feasible regions. The balance between the
global and local search ability can be arrived at by choosing an appropriate genetic coefficient.
( 1 π) F
i
xi = ωxi + (1 − q i ) sin √ ·
λ
RN G
(12)
t 2 ||Fi ||
It can be seen from Equation (12) that (1 − q i ) makes the particle with (a worse
) objective
π
1
function value move by a larger step. And with more and more iterations, sin √t · 2 makes the
feasible step length smaller and smaller. Later in the evolution, the particles only move randomly
in the neighborhood of the optimum. A more precise optimum may be found with the formula
above.
4
Algorithm Description
The image retrieval algorithm that using improved EM algorithm is described following:
Step 1: Preprocess. Features of target image and the images to be retrieved from image library
are extracted, region coefficients are set. The h, s, v of each block in the image and the
value of the particle which corresponds to the image are computed;
Step 2: Initialization. Good point set theory is used to generate initial population. Population scale and termination criteria are set including maximum number of iterations
M AXIT ER, or the similarity of current optimal image with target image is less than
threshold T , and the number of local search LSIT ER;
Step 3: Use the improved local search method to locally search current optimal particle;
Step 4: Compute the charge and the total force of each particle according to its target function
values;
Step 5: Update each particle according to the total force that it exerted;
Step 6: Calculate the optimum for the updated population;
Step 7: Judge that whether the result meets the termination criteria or not. If true, then search
the particle that is nearest to the current optimal particle, and the image that corresponds
to this particle is the result image; else go to Step 3.
J. Jiang et al. / Journal of Information & Computational Science 11:16 (2014) 5895–5903
5
5901
Simulation Results
To illustrate the applicability of the improved EM algorithm for image retrieval, the test function
following is used to verify the applicability according to definition of objective function:
v
u 48
u∑
f (x) = t
(xi − xi∗ )2
(13)
i=1
In order to test the retrieval effect of CEM algorithm, four groups are selected from Corel
standard image library-flowers, dinosaurs, mountains and beaches-including 100 images each.
The 100 images of each group are respectively used as target images. The representative images
of each group are as Fig. 1.
In the experiments, the parameters of EM and CEM are set as following: n = 48, m = 5, 10 and
20 represent different sizes of original population respectively, M AXIT ER = 100, LSIT ER =
50, δ = 1.0e − 2, and the threshold T is set to 1. Table 2 shows series of metrics including average
Table 2: Results
Set
Flowers
Dinosaurs
Mountains
Beaches
m
Alg
Avg (iter)
Avg (time)
accuracy
5
EM
78.8
1.2924
96%
5
CEM
59.17
0.9482
100%
10
EM
70.6
0.5046
100%
10
CEM
54.52
0.8202
100%
20
EM
61.15
1.8819
100%
20
CEM
50.36
1.2924
100%
5
EM
100
1.7144
67%
5
CEM
83.19
1.3918
99%
10
EM
100
4.1854
79%
10
CEM
77.29
3.1189
100%
20
EM
99.77
9.9001
91%
20
CEM
73.6
6.2075
99%
5
EM
46.33
0.7913
96%
5
CEM
44.02
0.7111
99%
10
EM
39.34
1.396
98%
10
CEM
38.96
1.4029
99%
20
EM
33.59
2.9224
95%
20
CEM
35.09
2.9554
99%
5
EM
39.34
0.6604
80%
5
CEM
38.06
0.6328
98%
10
EM
34.38
1.2267
78%
10
CEM
31.26
1.1350
96%
20
EM
30.85
2.6335
76%
20
CEM
26.72
2.3128
94%
5902
J. Jiang et al. / Journal of Information & Computational Science 11:16 (2014) 5895–5903
(a) Flower
(b) Dinosaur
(c) Mountain
(d) Beach
Fig. 1: (a), (b), (c) and (d) are respectively representative images of flowers, dinosaurs, mountains and
beaches image library
number of iterations (Avg(iter)), average retrieval time (Avg(time)) and accuracy under different
sizes of original population with each picture in the four sets taken as the target.
Obviously in Table 2 that for most of the images, the accuracy of CEM is always better than
that of EM and at the same time CEM costs less time than EM, which means CEM is more
effective than EM.
On the other hand, CEM proposed in this paper also outperforms both the PSO-based algorithm
presented in [6, 9] and GM-based algorithm [7] on accuracy of image retrieval.
6
Conclusion
A novel CEM-based method for image retrieval is proposed in this paper. It combines EM
algorithm and image retrieval. In preprocessing, images are partitioned and each of the partitions
gets a weight coefficient. The chaos search is introduced into local search of EM algorithm and
a new parameter is used in the updating formulas of the particles. The results of simulations
demonstrate that the novel method can find the target image much accurately and effectively
comparing with other image retrieval methods such as PSO, GM. However, the performance of
CEM-based method is not such practical which requires more step-further researches.
References
[1]
S. T. Birbil, S. C. Fang, An electromagnetism-like mechanism for global optimization [J], Journal
of Global Optimization, 25(3), 2003, 263-282
[2]
S. T. Birbil, S. C. Fang, R. L. Sheu, On the convergence of a population-based global optimization
algorithm [J], Journal of Global Optimization, 30, 2004, 301-318
[3]
Ke Zhang, Ping Cao, Locating non-circular slip surfaces by electromagnetism-like algorithm [J],
Journal of Central South University, 42(10), 2011, 3125-3130
[4]
Hong Wu, Hanqing Lu, Songde Ma, A survey of relevance feedback techniques in content-based
image retrieval [J], Chinese Journal of Computres, 28(12), 2005, 1968-1948
[5]
Zhiping Shi, Qingyong Li, Xiaodong Zhao, Optimized discriminative features for CBIR [J], Journal
of Computer-Aided Design & Computer Graphics, 24(12), 2012, 1952-1959
[6]
Xiangli Xu, Libiao Zhang, Xiangdong Liu, Image retrieval relevance feedback algorithm based on
particle swarm optimization [J], Acta Electronica Sinica, 38(8), 2010, 1935-1940
J. Jiang et al. / Journal of Information & Computational Science 11:16 (2014) 5895–5903
5903
[7]
Shicai Yu, Yongquan Zhang, Image retrieval of utilizing genetic algorithm and feature weight
assignment [J], Computer Engineering and Applications, 46(32), 2010, 168-171
[8]
Huaijing Qu, Texture image retrieval based on hybrid modeling in PDTDFB [J], Journal of
Computer-Aided Design & Computer Graphics, 24(10), 2012, 1329-1336
[9]
Xuan Gao, Rearch on Particle Swarm Optimization and Its Application in Image Retrieval [D],
Xi’an: Xidian University, 2012
[10] Ziwu Ren, Zhenhua Wang, Juan Li et al., Inverse kinematics solution for robot manipulator based
on hybrid electromagnetism-like mechanism algorithm [J], Journal of Mechanical Engineering,
48(17), 2012, 21-28
[11] Weimin Wang, Wenli He, Research on data allocation in distributed database based on
electromagnetism-like mechanism algorithm [J], Modern Electronics Technique, 35(21), 2012, 8790
[12] Jianguo Jiang, Xiuping Long, Min Tian et al., Electromagnetism-like mechanism algorithm based
on the good point set [J], Journal of Xidian University, 38(6), 2011, 167-172
[13] Tao Wang, Shimin Hu, Image retrieval based on color-spatial feature [J], Journal of Software,
13(10), 2002, 2031-2036
[14] Ling Zhuang, Yueting Zhuang, Jiangqin Wu, Image retrieval approach based on sparse canonical
correlate analysis [J], Journal of Software, 23(5), 2012, 1295-1304
[15] Yi Zeng, Research on Image Watermarking Based on Contourlet Transform [D], Xi’an: Xidian
University, 2012
[16] Yanguang Cai, Minjie Zhang, Hybrid chaotic quantum evolutionary algorithm [J], System
Engineering-Theory & Pratice, 32(10), 2012, 2207-2215