segmentation of color lip images by optimal thresholding using bacterial foraging optimization (bfo)

7
Journal of Computational Science 5 (2014) 251–257 Contents lists available at ScienceDirect Journal of Computational Science journa l h om epage: www.elsevier.com/locate/jocs Segmentation of color lip images by optimal thresholding using bacterial foraging optimization (BFO) Mohamad Amin Bakhshali , Mousa Shamsi 1 Faculty of Electrical Engineering, Sahand University of Technology, Tabriz, Iran a r t i c l e i n f o Article history: Received 30 December 2012 Received in revised form 19 June 2013 Accepted 2 July 2013 Available online 26 July 2013 Keywords: Lip segmentation Color space BFO algorithm Optimal thresholding IHLS a b s t r a c t Image segmentation is required as a very important and fundamental operation for significant analysis and interpretation of images. One of the most important applications of segmentation is for facial surgical planning. Thresholding method is so common in image segmentation, because it is simple, noise robust- ness and accurate. In this paper, we recognize and segment the area of lips using optimal thresholding based on bacterial foraging optimization. New color space (IHLS) is introduced in this paper, that it has good performance in facial image segmentation. In order to evaluate the performance of the proposed algorithm, we use three methods to measure accuracy. The proposed algorithm has less computational complexity and error and it is also efficient. © 2013 Elsevier B.V. All rights reserved. 1. Introduction Image segmentation is required as a very important and fun- damental operation for significant analysis and interpretation of images. So far, many segmentation methods have been pro- posed which include segmentation based on fuzzy clustering, and expectation maximization (EM) algorithms [1,2]. Among the segmentation methods, image thresholding is one of the most well-known methods due to its simplicity, robustness, and high precision [3]. In many image processing applications, the gray levels of pix- els belonging to an object are substantially different from those belonging to the background. Indeed, image thresholding is a major operation in many image processing applications such as optical character recognition where the goal is to extract the character in a document image and then recognize it [4]. Thresholding tech- niques can be classified into two categories: The first category includes methods that find the optimal threshold using image his- togram analysis [5]. The second category includes methods that find the optimal threshold using objective functions. Generally, the two methods of Kapur et al. [6] and Otsu [7] are the best methods in thresholding based on optimizing the objective function. The goal is to find the exact threshold in images but the obstacle of all Corresponding author. Tel.: +98 912 671 8442. E-mail addresses: m [email protected] (M.A. Bakhshali), [email protected] (M. Shamsi). 1 Tel.: +98 912 154 0548; fax: +98 412 344 4322. these methods is the complexity of calculation while optimizing the objective function. In this area, evolutionary algorithms are also used. Among these evolutionary methods are the genetic algorithm (GA), ant colony optimization (ACO) [8], and particle swarm opti- mization (PSO) [9], which have been successful in thresholding. GA is a quick method because it uses parallel searching techniques. Particle swarm optimization has been also used in thresholding for image segmentation. Nowadays, new bio-inspired algorithms are introduced for opti- mization. In [10], a new metaheuristic optimization was presented, called bat algorithm (BA). It is based on the echolocation behavior of bats. The capability of echolocation of microbats is fascinating as these bats can find their prey and discriminate different types of insects even in complete darkness [10]. Another bio-inspired algo- rithm for optimization was introduced in [11]. Cuckoo search (CS) algorithm is a new method for solving structural optimization tasks. CS algorithm is based on the obligate brood parasitic behavior of some cuckoo species in combination with the Levy flight behav- ior of some birds and fruit flies [11]. A new bio-inspired algorithm, namely krill herd (KH) was proposed for global optimization [12]. The time-dependent position of the krill individuals is formulated by three main factors: movement, foraging activity, and random diffusion [12]. Bacterial foraging optimization (BFO) was first introduced as a new and innovative algorithm by Passino [13]. The concept of BFO algorithm is based on the fact that, in nature, animals with low sense of foraging are more probable to extinct in comparison with animals with high sense of foraging [13]. Considering to lips segmentation in facial image, different meth- ods were applied; e.g. segmentation of color lip images by spatial 1877-7503/$ see front matter © 2013 Elsevier B.V. All rights reserved. http://dx.doi.org/10.1016/j.jocs.2013.07.001

Upload: mousa

Post on 23-Dec-2016

219 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Segmentation of color lip images by optimal thresholding using bacterial foraging optimization (BFO)

Sb

MF

a

ARRAA

KLCBOI

1

dopaswp

ebocanitfitig

(

1h

Journal of Computational Science 5 (2014) 251–257

Contents lists available at ScienceDirect

Journal of Computational Science

journa l h om epage: www.elsev ier .com/ locate / jocs

egmentation of color lip images by optimal thresholding usingacterial foraging optimization (BFO)

ohamad Amin Bakhshali ∗, Mousa Shamsi1

aculty of Electrical Engineering, Sahand University of Technology, Tabriz, Iran

r t i c l e i n f o

rticle history:eceived 30 December 2012eceived in revised form 19 June 2013ccepted 2 July 2013vailable online 26 July 2013

a b s t r a c t

Image segmentation is required as a very important and fundamental operation for significant analysisand interpretation of images. One of the most important applications of segmentation is for facial surgicalplanning. Thresholding method is so common in image segmentation, because it is simple, noise robust-ness and accurate. In this paper, we recognize and segment the area of lips using optimal thresholdingbased on bacterial foraging optimization. New color space (IHLS) is introduced in this paper, that it has

eywords:ip segmentationolor spaceFO algorithm

good performance in facial image segmentation. In order to evaluate the performance of the proposedalgorithm, we use three methods to measure accuracy. The proposed algorithm has less computationalcomplexity and error and it is also efficient.

© 2013 Elsevier B.V. All rights reserved.

ptimal thresholding

HLS

. Introduction

Image segmentation is required as a very important and fun-amental operation for significant analysis and interpretationf images. So far, many segmentation methods have been pro-osed which include segmentation based on fuzzy clustering,nd expectation maximization (EM) algorithms [1,2]. Among theegmentation methods, image thresholding is one of the mostell-known methods due to its simplicity, robustness, and highrecision [3].

In many image processing applications, the gray levels of pix-ls belonging to an object are substantially different from thoseelonging to the background. Indeed, image thresholding is a majorperation in many image processing applications such as opticalharacter recognition where the goal is to extract the character in

document image and then recognize it [4]. Thresholding tech-iques can be classified into two categories: The first category

ncludes methods that find the optimal threshold using image his-ogram analysis [5]. The second category includes methods that

nd the optimal threshold using objective functions. Generally, thewo methods of Kapur et al. [6] and Otsu [7] are the best methodsn thresholding based on optimizing the objective function. Theoal is to find the exact threshold in images but the obstacle of all

∗ Corresponding author. Tel.: +98 912 671 8442.E-mail addresses: m [email protected] (M.A. Bakhshali), [email protected]

M. Shamsi).1 Tel.: +98 912 154 0548; fax: +98 412 344 4322.

877-7503/$ – see front matter © 2013 Elsevier B.V. All rights reserved.ttp://dx.doi.org/10.1016/j.jocs.2013.07.001

these methods is the complexity of calculation while optimizingthe objective function. In this area, evolutionary algorithms are alsoused. Among these evolutionary methods are the genetic algorithm(GA), ant colony optimization (ACO) [8], and particle swarm opti-mization (PSO) [9], which have been successful in thresholding. GAis a quick method because it uses parallel searching techniques.Particle swarm optimization has been also used in thresholding forimage segmentation.

Nowadays, new bio-inspired algorithms are introduced for opti-mization. In [10], a new metaheuristic optimization was presented,called bat algorithm (BA). It is based on the echolocation behaviorof bats. The capability of echolocation of microbats is fascinating asthese bats can find their prey and discriminate different types ofinsects even in complete darkness [10]. Another bio-inspired algo-rithm for optimization was introduced in [11]. Cuckoo search (CS)algorithm is a new method for solving structural optimization tasks.CS algorithm is based on the obligate brood parasitic behavior ofsome cuckoo species in combination with the Levy flight behav-ior of some birds and fruit flies [11]. A new bio-inspired algorithm,namely krill herd (KH) was proposed for global optimization [12].The time-dependent position of the krill individuals is formulatedby three main factors: movement, foraging activity, and randomdiffusion [12].

Bacterial foraging optimization (BFO) was first introduced as anew and innovative algorithm by Passino [13]. The concept of BFOalgorithm is based on the fact that, in nature, animals with low

sense of foraging are more probable to extinct in comparison withanimals with high sense of foraging [13].

Considering to lips segmentation in facial image, different meth-ods were applied; e.g. segmentation of color lip images by spatial

Page 2: Segmentation of color lip images by optimal thresholding using bacterial foraging optimization (BFO)

2 f Comp

fgacrmteaiaaumtssc

sTFoa

2

tbAbrf(

2

imdwatfitf

fm

, �i(j

−hrep

52 M.A. Bakhshali, M. Shamsi / Journal o

uzzy clustering was presented in [14]. In [15], a multi-class, shape-uided FCM (MS-FCM) clustering algorithm was presented and thislgorithm is appropriate for facial images with inhomogeneous andomplex background. In [16], a system for feature extraction andecognition of lip postures is presented, by constructing a shapeodel of the inner and outer contours of the lips, whose parame-

ers are controlled by a canonical genetic algorithm. Features ofach posture are the model parameters which better fit to thenalyzed image. In [17], a method for inner lip segmentation wasntroduced. This method uses optimal information of luminancend chrominance gradient for extraction of lips contour. In [18],

technique for adaptive segmentation was investigated using annsupervised clustering technique incorporating the expectationaximization (EM) algorithm across a variety of chromatic fea-

ures. One application of lips segmentation is evaluating of facialurgery. This application was reviewed in [19] and the role of lipsegmentation in treatment of children with cleft lip and palate wasoncentrated.

In this paper, first BFO algorithm is introduced. A new colorpace with high performance is presented for lips segmentation.hen, lips area is recognized and segmented in facial color images.or segmentation of color lips images, we have used optimal thresh-lding based on BFO algorithm. Finally, we evaluate the proposedlgorithm, using accuracy measurement criteria.

. Bacterial foraging optimization algorithm

The concept of bacterial foraging algorithm is based on the facthat, in nature, animals with low sense of foraging are more proba-le to be extinct compared with those with high sense of foraging.fter many generations, weak animals and weak foraging methodse extinct or are modified into better forms. Escherichia coli bacte-ia which live in human intestine have a foraging method based onour stages: (1) chemotactic, (2) swarming, (3) reproduction, and4) elimination and dispersal [20].

.1. Chemotactic

In this stage, bacteria start to tumble and swim. In fact, depend-ng on the rotation of the bacterium tail, it tumbles and starts to

ove in a direction. If the amount of food is better in the newirection, the bacterium starts to swim in that direction. Supposee intend to find the minimum value of J(�), � ∈ � p. Consider �

s the location of the bacterium and J(�) as the amount of food inhat location or in fact the cost function. Therefore, if the bacteriumnds the better amount of food in location �, then J(�) < 0 and, ifhe amount of food is not sufficient in location �, then J(�) > 0. If theood in location � is neutral, then J(�) = 0 [20].

In order to perform the tumble, a unit vector named �(i) is

Jcc(�, P(i, j, l)) =s∑

i=1

Jicc(�

+s∑

i=1

[

ormed. This vector is used to define the new direction of bacteriumovement after tumbling. New location of bacterium is defined as:

i(j + 1, k, l) = �i(j, k, l) + C(i)�(i) (1)

utational Science 5 (2014) 251–257

where �i(j, k, l) indicates the ith bacterium in jth chemotactic, kthreproduction and lth elimination and dispersal. C(i) is chemotacticmagnitude of the bacterium in the direction of �(i). If the magni-tude of J(i, j, k, l) in �i(j + 1, k, l) is less than its magnitude in �i(j,k, l), then another chemotactic step with the magnitude of C(i) isdone in the direction of �(i) and the bacterium starts to swim in thedirection of �(i). This swimming is continued until the magnitudeof J(�) decreases and it can continue to the maximum number ofpermitted swimming stages (Ns). This demonstrates that the bac-terium continues in its direction as long as sufficient food is foundin that direction [20].

2.2. Swarming

When a bacterium finds a better direction for foraging, it attractsother bacteria to that direction and other bacteria reach the mainfood source faster. Swarming causes collective movement of bacte-ria to the food. If P(j, k, l) = {�i(j, k, l)|i = 1, 2, ..., s} is considered as aset of bacteria locations, then swarming can be modeled as:

, k, l)) =s∑

i=1

[−dattract exp

(−ωattract

P∑m=1

(�m − �im)

2

)]

eliant exp

(−ωrepeliant

P∑m=1

(�m − �im)

2

)](2)

where Jcc(�, P(i, j, l)) is time-dependent function and depends onthe collective movement of bacteria and J(i, j, k, l) is added to thecost function. Therefore, the bacteria start to find food and evadefrom foodless areas while attracting each other; but they never gettoo close to each other. S is the total number of bacteria and P is thenumber of parameters that must be optimized and is considered asa bacterium position in the p-dimensional space. dattract, hrepeliant,ωattract and ωrepeliant are coefficients that must be given a propervalue depending on the problem [20].

2.3. Reproduction

Half of the bacteria which have not found proper food woulddie and each bacterium in the other half which is healthy bacte-ria would be divided into two bacteria which are left in the sameprevious place. This process keeps the number of bacteria constant(Sr = S/2) [20].

2.4. Elimination and dispersal

Life of bacteria would change gradually because of food con-sumption or suddenly due to other factors. Accidents can kill ordisperse bacteria. Although at first this may disturb the process ofchemotactic stage, it can also have a positive effect on that becausebacteria’s dispersion might place them in areas with sufficient food.Elimination and dispersal stage prevents the bacteria from beingtrapped in the local optimum points. In this stage, the possibility ofeach bacterium in the group for elimination and dispersion is equalto Ped. To keep the number of bacteria constant, in case a bacteriumis eliminated, another bacterium is randomly placed in the searchspace [20].

2.5. Summarized BFO algorithm

Summary of the bacterial foraging optimization is as follows[20]:

Page 3: Segmentation of color lip images by optimal thresholding using bacterial foraging optimization (BFO)

f Computational Science 5 (2014) 251–257 253

3

3

mhfRt

sssdasieh

tF0

Table 1F measurement for three-dimensional color spaces using different color space mod-eling methods [23].

IHLS HSI RGB nRGB YCbCr CIELAB

AdaBoost 0.320 0.300 0.260 0.250 0.270 0.276BayesianNet 0.590 0.570 0.321 0.370 0.490 0.560J48 0.684 0.680 0.662 0.626 0.680 0.660MLP 0.650 0.591 0.590 0.569 0.627 0.600NaiveBayes 0.466 0.450 0.255 0.408 0.427 0.454Random Forest 0.745 0.741 0.710 0.700 0.705 0.740RBF 0.467 0.430 0.389 0.420 0.490 0.510

M.A. Bakhshali, M. Shamsi / Journal o

Step 1: Start (giving initial values to all parameters)Step 2: Elimination and dispersion loopStep 3: Reproduction loopStep 4: Chemotactic loop1. ith bacterium moves according to the following pattern.2. J(i, j, k, l) is calculated and then the effect of swarming is added

to it (Eq. (3)):

Jsw = J(i, j, k, l) + Jcc(�i(j, k, l), P(j, k, l)) (3)

3. the current value is saved for later comparison (Eq. (4)):

Jlast = Jsw(i, j, k, l) (4)

4. Tumble: a random vector of �(i) ∈ � p with values of m = 1, 2, ...,p is generated within the range of [−1, 1]

5. Chemotactic: The values of �(i) = �(i)√�T (i)�(i)

and �i(j + 1, k,

l) = �i(j, k, l) + C(i)�(i) are obtained. Then, the bacterium with themagnitude of C(i) moves in the direction of �(i).

6. J(i, j + 1, k, l) is calculated and then the swarming effect is addedto it.

7. Swimming stage: First, m = 0. The following loop is continueduntil m < Ns.m = m + 1if Jsw(i, j + 1, k, l) < Jlast , then Jlast = J(i, j + 1, k, l) and Jlast = J(i, j + 1,k, l) are calculated; otherwise, m = Ns.

8. If i /= s, then, the loop is repeated for the next bacterium.Step 5: If j < Nc, then, step 3 and the chemotactic stage are repeatedfor all the bacteria.Step 6: Reproduction: First, for the specific values of k and l, Ji

health=

minj ∈ {1,2,...,Nc+1}{Jsw(i, j, k, l)} is calculated for each bacterium andthe bacteria are sorted in an increasing manner. Half of the bacteriawith the highest values of Ji

healthare eliminated and the other half

are first transferred to a place where the value of J(i, j, k, l) is equalto Ji

healthand then a bacterium is reborn from each bacterium and

is placed in the same position.Step 7: If k < Nre, then Step 2 is repeated.Step 8: Elimination and dispersion: Each bacterium is eliminatedand dispersed using the probability value of Ped. To do that, in casea bacterium is eliminated, another bacterium is randomly formedin the search space.Step 9: If l < Ned, then, Step 1 is repeated [20].

. Proposed algorithm

.1. IHLS color space

Recognizable colors are made up of a combination of three pri-ary colors including red (R), Green (G) and blue (B). Brightness,

ue and saturation are properties that are used to distinguish a colorrom others. There are various color spaces in image processing likeGB, CMY, HIS, YIQ and IHLS. These color spaces can be convertedo each other [21].

Considering different color spaces and their span, a proper colorpace should be chosen for each image processing operation. Theegmentation accuracy is improved in following image processingtages due to a proper color space. So, noticing the application ofifferent color spaces, we chose IHLS, a new color space which hasn appropriate efficiency in image processing operations. IHLS colorpace was first presented by Hanbury [22]. The IHLS model has beenmproved by brightness normalization and color saturation, consid-ring the likenesses to HLS, HIS and HSV color spaces. This propertyas solved the numerical problems existing in color channels [23].

This color space is the most accurate and efficient one comparingo other color spaces in skin segmentation using different methods.or instance the F parameter for IHLS color space is measured as.650, using perceptron neural network and is measured as 0.467

SVM 0.503 0.471 0.360 0.370 0.385 0.400Hist. 0.409 0.408 0.418 0.399 0.390 0.400

using the Radial Basis Function method, which is the best valuescomparing to other color spaces [23]. These values are shown inTable 1. F measure is harmonic mean of precision and recall and iscalculated as [23]:

F = 2 × precision × recall

precision + recall(5)

In pattern recognition and information retrieval, precision is thefraction of retrieved instances that are relevant, while recall is thefraction of relevant instances that are retrieved. Both precision andrecall are therefore based on an understanding and measure ofrelevance.

Conversion of RGB color space to IHLS is done using the follow-ing equations. Considering the point that the RGB color space ismade up of three R, G and B color channels, we would have [22]:

i = 13

(R + G + B), s = max(R, G, B) − min(R, G, B),

h = arctan

( √3(G − B)

2R − G − B

)(6)

The equation for converting from RGB color space to IHLS is as:

R = i + 23

c1, G = i − 13

c1 + 1√3

c2, B = i − 13

c1 − 1√3

c2 (7)

and then we have c1 = ccos(h), c2 = csin(h) when c is defined as:

c =√

3s

2 sin(120 − (H − k × 60))(8)

3.2. Optimal thresholding methods

Optimal thresholding methods search types of thresholds inwhich classes with the desired features are segmented. Thismethod is carried out by maximizing the objective function withparameters which are thresholds. In this section, two methods ofthresholding are introduced: (1) entropy-based method (Kapur)and (2) inter-class variance method (Otsu). If L is considered thegray level in the image within the range of {0, 1, . . ., L − 1}, theprobability of ith gray level can be defined as:

Pi = h(i)N

for (0 ≤ i ≤ (L − 1)) (9)

where h(i) is the number of pixels with L gray levels and N is thetotal number of image pixels.

Inter-class variance method was introduced by Otsu in order todetermine the threshold values [7]. In this method, thresholding is

done based on maximizing the inter-class variance to separate thesegmented classes as much as possible. In two-level thresholding,an image is divided into two classes of C0 and C1. Threshold is equalto t and C0 class includes pixels within the level range of 0 to t − 1
Page 4: Segmentation of color lip images by optimal thresholding using bacterial foraging optimization (BFO)

254 M.A. Bakhshali, M. Shamsi / Journal of Comp

Fi

ap

M

Fs

ig. 1. Block diagram of the proposed algorithm for lips segmentation in facial colormages.

nd C1 class includes pixels within the level range of t to L − 1. Now,robability distributions of these two classes are according to [7]:

C0 :p0

ω0(t), ...,

pt−1

ω0(t)and C1 :

pt

ω1(t), ...,

pL−1

ω1(t)

ω0(t) =t−1∑i=0

pi and ω1(t) =L−1∑i=t

pi

(10)

ean values for C0 and C0 classes are as:

0 =t−1∑i=0

ipi

ω0(t), �1 =

L−1∑i=t

ipi

ω1(t)(11)

ig. 2. Result of the proposed algorithm. (a) Facial color images in frontal view, (b) S chaegmentation results, (e) segmented lips area, and (f) position of the lips.

utational Science 5 (2014) 251–257

Mean value for total image intensity is defined as shown:

ω0�0 + ω1�1 = �T and ω0 + ω1 = 1 (12)

Objective function which should be optimized is defined as:

J(t) = ω0(�0 − �T )2 + ω1(�1 − �T )2 (13)

Entropy-based method (Kapur), is done in a way that the entropyresulted from segmented histogram is maximized so that eachsegment can achieve a central distribution [6]. Now, the entropyresulted from the segmented histogram is defined as follows [6]:

H0 = −t−1∑i=0

Pi

ω0ln

Pi

ω0H1 = −

L−1∑i=t

Pi

ω1ln

Pi

ω1(14)

where ω0 and ω1 are expressed as follows:

ω0(t) =t−1∑i=0

pi ω1(t) =L−1∑i=t

pi (15)

The objective function which must be maximized is in the form:

J(t) = H0 + H1 (16)

3.3. Proposed algorithm

In the proposed algorithm, facial color image in RGB is convertedto IHLS color space and then, the channel S of IHLS, which has goodfacial skin mapping, was used for segmentation of the lips. In orderto accurate lips segmentation and considering that lips are located

nnel images from IHLS color space, (c) removing of the upper two third of face, (d)

Page 5: Segmentation of color lip images by optimal thresholding using bacterial foraging optimization (BFO)

M.A. Bakhshali, M. Shamsi / Journal of Computational Science 5 (2014) 251–257 255

in IHLS color space and distinction of lips area pixels.

iTdwfita

iSbt

4

fItvaip

fot

4

tai

M

Itbat1

TP

Table 3Mean and standard deviation (SD) of the methods to evaluate the accuracy of seg-mentation results. (The best results are marked with (*) and the worst results aremarked with (+).).

ME NU RAEMean SD Mean SD Mean SD

Genetic algorithm 0.06+ 0.03 0.08+ 0.06 0.05+ 0.04PSO 0.03 0.03 0.07 0.06 0.06 0.04

RAE =⎨⎩ AO

if AT < AO

AT − AO

ATif AT ≥AO

(19)

Fig. 3. Three-dimensional view of the S channel

n lower third of the face, upper two third of the face is removed.he color range of facial images is limited and since lips color isifferent in lower third of the face, two level thresholding methodas used. For thresholding, entropy-based method (Kapur) and fornding optimal threshold, BFO algorithm is used as explaining inhe previous sections. Fig. 1 shows block diagram of the proposedlgorithm for lips segmentation in facial color images.

Table 2 shows parameters of the BFO algorithm that were usedn the proposed method. Each of these parameters was explained inection 4 and, by changing them, the optimization process woulde also changed. Parameters presented in Table 2 were obtained inhe best segmentation case resulting from our database.

. Experimental results

To investigate and quantitatively evaluate the proposed algorithm, we have usedacial color images from database of Sahand University of Technology, Tabriz, Iran.n this database, contained three orthogonal facial images (for each person) wereaken, simultaneously, by the designed orthogonal camera system at Sahand Uni-ersity of Technology, Tabriz, Iran. This system is based on orthogonal placementnd calibration of three cameras. These cameras have specific technical character-stics for the simultaneous, fast, accurate and high quality imaging. Fig. 2 shows theroposed algorithm results. In this figure, size of the image is 300 × 400 pixels.

In Fig. 3, S channel of IHLS color space is demonstrated in three-dimensionalorm. Each pixel with high intensity has more height. Pixels of lips area in S channelf IHLS are well distinct from other pixels. In order to evaluate the performance ofhe proposed algorithm, we used three criteria to measure accuracy.

.1. Misclassification error (ME)

This error is the percentage of the background pixels which are wrongly iden-ified as the desired areas and also percentage of the pixels regarding the desiredreas which are wrongly considered as the background pixels. To classify this errornto two classes, Eq. (17) is used [24]:

E = 1 − |BO ∩ BT | + |FO ∩ FT ||BO| + |FO| (17)

n this equation, BO and FO are the numbers of background pixels and pixels in

he desired area for the original image, respectively. BT and FT are the numbers ofackground pixels and pixels in the desired area for the image resulted from thelgorithm, respectively. The sign ∩ also denotes the common pixels between thewo areas. ME ranges from 0 to 1, in which 0 is related to the best classification and

is related to the worst one.

able 2arameters of BFO algorithm.

Parameters of BFO Value

Number of bacterium (s) 20Number of chemotatic steps (Nc) 10Swimming length (Ns) 10Number of reproduction steps (Nre) 4Number of elimination of dispersal events (Ned) 2Probability of elimination and dispersal (Ped) 0.02Depth of attractant (dattract) 0.1Height of repellent (hrepellent) 0.1Width of attract (ωattract) 0.2Width of repellent (ωrepellent) 10

ACO 0.02 0.03 0.05 0.06 0.04 0.04Proposed algorithm 0.01* 0.03 0.03* 0.06 0.03* 0.04

4.2. Nonuniformity (NU)

This measure, which does not require ground-truth information, is defined as[25]:

NU = |FT ||FT + BT |

�2f

�2(18)

where �2 represents the variance of the whole image, and �2f

represents theforeground variance. It is expected that a well-segmented image will have a nonuni-formity measure close to 0, while the worst case of NU = 1 corresponds to an imagefor which background and foreground are indistinguishable up to second ordermoments.

4.3. Relative foreground area error (RAE)

The comparison of object properties such as area and shape, as obtained fromthe segmented image with respect to the reference image, has been used in relativeforeground area error. We modified this measure for the area feature A as follows[26]: ⎧

AO − AT

Fig. 4. Plot of region area error (RAE) based on area of reference image (AO).

Page 6: Segmentation of color lip images by optimal thresholding using bacterial foraging optimization (BFO)

256 M.A. Bakhshali, M. Shamsi / Journal of Computational Science 5 (2014) 251–257

istory

wOi

4

atiteia

foaoa

rc

5

ctbm

Fig. 5. Comparison of the convergence h

here AO is the area of reference image, and AT is the area of thresholded image.bviously, for a perfect match of the segmented regions, RAE is zero, while if there

s zero over-lap of the object areas, the penalty are the maximum one.

.4. Results of evaluating

The proposed algorithm is applied on 30 sample images and accuracy of thelgorithm is evaluated with methods mentioned above. In Table 3, the accuracy ofhe proposed algorithm is compared with PSO, ACO and genetic algorithm. As shownn Table 3, for finding an appropriate threshold, BFO is more efficient and accuratehan the other mentioned methods. Proposed algorithm has 1% misclassificationrror, 3% nonuniformity and 3% relative foreground area error. As the results shown Table 3, the proposed algorithm has good precision and few errors. Proposedlgorithm has less computational load in comparison with the others algorithms.

The proposed algorithm is noise robustness and has good performance in dif-erent color images. In Fig. 4, we demonstrate region area error (RAE) based on areaf reference image (AO). According to Eq. (3), relationship between region area errornd area of reference image is nonlinear. The important conclusion is that if areaf lips in image is small and the segmented lips area is large, then segmentationlgorithm will be successful and the error will be low.

Fig. 5 shows a graphical representation of the convergence history of the algo-ithms. The convergence history plot lets us know how the optimization problem isonverged to the optimal point.

. Conclusion

Accurate lips segmentation is a difficult problem due to the weak

olor contrast between the lips and the face region. This articleried to perform color lips segmentation using thresholding methodased on a new and efficient color space. In this regard, a new opti-ization method called BFO was used and a connection was formed

of the algorithms for the four samples.

between new biological optimization algorithms and color imagesegmentation. The proposed algorithm is a new research topic infacial skin segmentation. This research is very effective to developsimulation and evaluation systems for facial esthetic surgery. Thisresearch is part of a system designed by our teamwork for imag-ing and evaluating of facial surgery. The other new bio-inspiredalgorithms for finding optimal threshold can be considered in thedirection of this research. Future research will be carried out for seg-mentation the other parts of the face based on optimal thresholdingand special color space.

References

[1] J.C. Bextek, A convergence theorem for the fuzzy ISODATA clustering algo-rithms, IEEE Transactions on Pattern Analysis and Machine Intelligence 2 (1)(1980) 1–8.

[2] M. Li, R.C. Staunton, A modified fuzzy c-means image segmentation algorithmfor use with uneven illumination patterns, Pattern Recognition 40 (11) (2007)3005–3011.

[3] M. Sezgin, B. Sankur, Survey over image thresholding techniques and quan-titative performance evaluation, Journal of Electronic Imaging 13 (1) (2004)146–165.

[4] P.K. Saha, J.K. Udupa, Optimum image thresholding via class uncertainty andregion homogeneity, IEEE Transactions on Pattern Analysis and Machine Intel-ligence 23 (2001) 689–706.

[5] A. Pikaz, A. Averbuch, Digital image thresholding based on topological stablestate, Pattern Recognition 29 (5) (1996) 829–843.

[6] J.N. Kapur, P.K. Sahoo, A.K.C. Wong, A new method for gray-level picture thresh-olding using the entropy of the histogram, Computer Vision, Graphics andImage Processing 29 (3) (1985) 273–285.

Page 7: Segmentation of color lip images by optimal thresholding using bacterial foraging optimization (BFO)

f Comp

[

[

[

[

[

[

[

[

[

[

[

[

[

[

[

[

[

M.A. Bakhshali, M. Shamsi / Journal o

[7] N. Otsu, A threshold selection method from gray level histograms, IEEE Trans-actions on Systems, Man and Cybernetics SMC-9 (1979) 62–66.

[8] Z. Ye, Z. Zheng, X. Yu, X. Ning, Automatic threshold selection based on antcolony optimization algorithm, in: Proceedings of the International Conferenceon Neural Networks and Brain, Beijing, 2006, pp. 728–732.

[9] M. Maitra, A. Chatterjee, A hybrid cooperative-comprehensive learning basedPSO algorithm for image segmentation using multilevel thresholding, ExpertSystems with Applications 34 (2008) 1341–1350.

10] X. Yang, A.H. Gandomi, Bat algorithm: a novel approach for global engineeringoptimization, Engineering Computations 29 (5) (2012) 464–483.

11] A.H. Gandomi, X. Yang, A.H. Alavi, Cuckoo search algorithm: a metaheuristicapproach to solve structural optimization problems, Engineering with Com-puters 29 (2013) 17–35.

12] A.H. Gandomi, A.H. Alavi, Krill herd: a new bio-inspired optimization algo-rithm, Communications in Nonlinear Science and Numerical Simulation 17 (12)(2012) 4831–4845.

13] K.M. Passino, Bio-mimicry of bacterial foraging for distributed optimization andcontrol, IEEE Transactions on Control Systems Magazine 22 (3) (2002) 52–67.

14] A.W. Liew, S.H. Leung, W.H. Lau, Segmentation of color lip images by spatialfuzzy clustering, IEEE Transactions on Fuzzy Systems 11 (4) (2003) 542–549.

15] S.L. Wang, W.H. Lau, A.W. Liew, S.H. Leung, Robust lip region segmenta-tion for lip images with complex background, Pattern Recognition 40 (2007)3481–3491.

16] J.A. Jaramillo, M. Orozco, G. Castellanos, J.C. Riano, Variational shape model forlip postures recognition using GA, in: CERMA Proceeding of Electronic, Roboticsand Automotive Mechanics Conference, vol. 1, Washington, DC, USA, 2006, pp.25–29.

17] S. Stillittano, A. Capleir, Inner lip segmentation by combining active contoursand parametric models, Proceeding of the Third International Conference onComputer Vision Theory and Application (2008) 297–304.

18] S. Lucey, S. Sridharan, V. Chandran, Adaptive mouth segmentation using chro-matic features, Pattern Recognition Letters 23 (2002) 1293–1302.

19] A. Salazar, G. Daza, et al., Feature extraction and lips posture detection orientedto the treatment of CLP children, in: Proceeding of the 28th IEEE EMBS AnnualInternational Conference, New York City, USA, 2006.

20] P.D. Sathya, R. Kayalvizhi, Modified bacterial foraging algorithm based mul-tilevel thresholding for image segmentation, Engineering Applications ofArtificial Intelligence 24 (2011) 595–615.

21] A.R. Robertson, The CIE 1976 color difference formulae, Color Research and

Application 2 (1977) 7–11.

22] A. Hanbury, Constructing cylindrical coordinate colour spaces, Pattern Recog-nition Letters 29 (4) (2008) 494–500.

23] R. Khan, A. Hanbury, J. Stottinger, A. Bais, Color based skin classification, PatternRecognition Letters 33 (2) (2012) 157–163.

utational Science 5 (2014) 251–257 257

24] W.A. Yasnoff, J.K. Mui, J.W. Bacus, Error measures for scene segmentation, Pat-tern Recognition 9 (1977) 217–231.

25] Y.J. Zhang, A survey on evaluation methods for image segmentation, PatternRecognition 29 (1996) 1335–1346.

26] T. Kampke, R. Kober, Nonparametric optimal binarization, in: ICPR’98, Interna-tional Conf. Pattern Recognition, 1998, pp. 27–29.

Mohamad Amin Bakhshali was born in Mashad,Iran, in 1987. He graduated from high school (major:Mathematics–Physics) in Mashad, in 2005. He passed theuniversity entrance examination for engineering stud-ies in Iran in 2005, and joined Amirkabir University ofTechnology (Polytechnic Tehran). He received his B.Sc.degree in Biomedical Engineering (major: Bio-electric)from Amirkabir University of Technology, in 2010. In 2010,he joined the Sahand University of Technology, Tabriz,Iran. He received his M.Sc. degree in Biomedical Engineer-ing (major: Bio-electric) from this university in 2012. Hisresearch interests are medical image processing and bio-inspired algorithms.

Mousa Shamsi was born in Tabriz, Iran, in 1972. He grad-uated from high school (major: Mathematics–Physics) inTabriz, Iran, in 1990. He passed the university entranceexamination for engineering studies and joined TabrizUniversity, Tabriz, Iran, in 1990. He received his B.Sc.degree in Electrical Engineering (major: Electronics) fromTabriz University, in 1995. In 1996, he joined the Univer-sity of Tehran, Tehran, Iran. He received his M.Sc. degreein Electrical Engineering (major: Biomedical Engineer-ing) from this university in 1999. From 1999 to 2002, hetaught as a lecturer at the Sahand University of Technol-ogy, Tabriz, Iran. In 2002, he entered the University ofTehran as a Ph.D. candidate. From 2002 to 2008, he was a

Ph.D. student at the University of Tehran in Bioelectrical Engineering. In 2006, hewas granted with the Iranian government scholarship as a visiting researcher at theRyukyus University, Okinawa, Japan. From December 2006 to May 2008, he was a

visiting researcher at this University. He received his Ph.D. degree in Electrical Engi-neering (major: Biomedical Engineering) from University of Tehran in December2008, he is an assistant professor at the Faculty of Electrical Engineering, SahandUniversity of Technology, Tabriz, Iran. His research interests include medical imageand signal processing, pattern recognition and facial surgical planning.