You are on page 1of 6

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)

Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com


Volume 1, Issue 2, July – August 2012 ISSN 2278-6856

Threshold Optimization by Genetic Algorithm


for Segmentation of Medical Images by Region
Growing
Ahmad EL Allaoui1 and M’barek Nasri2
1,2
LABO MATSI, ESTO, B.P 473, University Mohammed I OUJDA, MOROCCO

an algorithm of segmentation by evolutionary region


Abstract—Image segmentation by region growing method is growing.
robust fast and very easy to implemented, but it suffers from:
The problem of initialization and order of cours of points
the threshold problem, initialization, and sensitivity to noise.
is treated by evolutionary strategy in [3, 4].
Genetic algorithms are particular methods for optimizing
functions; they have a great ability to find the global In Section 2 image segmentation with region growing
optimum of a problem. In this paper, we used genetic algorithm is presented. Section 3 gives an introduction to
algorithms to get over the threshold problem. We have genetic algorithm. The evaluation criterion of
proposed a segmentation method based on region growing segmentation is detailed in the next section. The proposed
and genetic algorithms. The proposed approach is validated genetic algorithm for optimization of threshold is
on synthetic images and medical. The results show the good presented in section 5. In section 6, a validation of our
performance of this approach. approach is given; experimental results are obtained over
Keywords: Segmentation, Region growing, Genetic synthetic and medical images. Finally we give a
algorithm, threshold. conclusion.

1. INTRODUCTION 2. REGION GROWING METHOD (RG)


The segmentation is a very important stage in images and The region growing algorithm is a method of
interpretation processing; there are many consistent segmentation based on the approach region, the principle
methods available today for image segmentation, among of this algorithm is as follows [2, 5, 6]:
these: there is the segmentation based on regions [3, 4],
segmentation based on pixel [7] and segmentation based  We fix the points (seed) starting in the image. These
contour. After many years of seeking the optimal method, points are called germs of regions searched.
the researchers understood that the ideal segmentation did  We fix a criterion of homogeneity (threshold) of the
not exist. Given an image, there are still several possible region searched for example, the grey level or texture
segmentations. A good segmentation method will be one criteria.
that will arrive at a correct interpretation.
 For a recursive procedure (step by step), are included
We are interested in this work to approach region and
in the region all the points that satisfy the criterion
specifically the region growing. A region is a set of
related.
topologically related pixels and having similar attributes:
gray levels, color, texture, movement [1, 2, 5]. It is growing and the region as the criterion is met.
The choice of starting points is the critical part of the
Segmentation by region growing is very recognized, fast,
algorithm. The growing stage will use a similarity
simple and easy to implement, [2, 5, 6] but it presents
measure to select the pixels to be agglomerated.
disadvantages:
The growing stop when you can not add more pixels
 Sensitive to the threshold.
without breaking homogeneity [2, 5, 6].
 Local method: no global view of the problem. In
practice, for different point of initialization (seeds)
2.1. Starting points (seeds)
one gets different results, not very stable.
 Sensitive to the order of course of the points The choice of starting points or initialization is the
critical part of the algorithm. Indeed, the growth stage
 Very sensitive to the noise. will use a similarity measure based on a given threshold,
Considering the great success of the genetic algorithms in to select the pixels to be agglomerated. If the starting
the optimisations problems, we exploit them to get over point is located in a non-homogeneous, the similarity
first disadvantages of this algorithm. We have presented

Volume 1, Issue 2 July-August 2012 Page 161


International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July – August 2012 ISSN 2278-6856

measure will produce large variations and growth will allowing a good discrimination between chromosomes
stop very soon. and to define genetic operators to be used [8].

Crossover site
2.2. Region growing (growing)
1 8
This step aims to grow a region by agglomerating 1 0 0 0 1 1 1 1
Parents
neighboring pixels. The pixels are selected to maintain 1 1 0 0 0 0 0 0
the homogeneity of the region. For this, we need to define
an indicator of homogeneity. Neighboring pixels are 1 0 0 0 0 0 0 0
added to the region of homogeneity if the indicator is Children
1 1 0 0 1 1 1 1
true. Growth stops when you can not add pixels with out
breaking the homogeneity [2, 5, 6].

The choice of germs and the threshold can be either Figure 2:Crossover operator.
manually or automatically.
Mutation site
In this work we will give germs a priori and we determine 1 8
the optimal threshold automatically by genetic algorithm. Initial chromosome 1 0 0 0 1 1 1 1

Chromosome mutant 1 0 0 0 0 1 1 1
3. GENETIC ALGORITHM
Figure 3:Mutation perator.
3.1. Basic concepts
Genetic algorithms are techniques for optimizing
functions. GA are based on the evolution of a population 3.3 Solving a problem by AG
of solutions which under the action of some precise rules
The application of GA to solve a problem requires to
optimize a given behavior, which initially has been
formulated by a given specified function fitness function coding potential solutions to this problem by finite chains
[9]. A GA manipulates a population of constant size. This of bits to form chromosomes, to find a selective function
population is formed by chromosomes. Each chromosome allowing a good discrimination between chromosomes
represents the coding of a potential solution to the and to define genetic operators to be used [8].
problem to be solved; it is formed by a set of genes
belonging to an alphabet [9][12]. 4. EVALUATION OF A SEGMENTATION
At each iteration is created a new population by applying There are a multitude of segmentation methods whose
the genetic operators: selection, crossover and mutation effectiveness is difficult to assess. Currently, some work
[8, 12]. The algorithm chooses in selection the most has been done to solve the general problem of evaluating
pertinent candidates. Crossover consists in building 2 new a segmentation result [10]. There are two types of
chromosomes from 2 old ones referred to as the parents, evaluation approaches [11].
figure 2. The first evaluates the quality of a segmentation result by
Mutation realizes the inversion of one or several genes in measuring its similarity to reference segmentation.
a chromosome, figure 3, [9, 12]. Figure 1 show steps of Several studies have been made in medical imaging.
genetic algorithm GA. The second is based on unsupervised evaluation criteria
Random generation of the initial population
for estimating the quality of a segmentation result from
Fitness evaluation of each chromosome statistics calculated for each detected region.
Repeat There are several criteria for evaluating unsupervised
Selection segmentation. The value of each criterion increases with
Crossover the quality of the segmentation result [11].
Mutation
Fitness evaluation of each chromosome A criterion value close to 1 indicates a very good result of
Until Satisfying the stop criterion segmentation. Different criteria are described in detail in
[10, 11], we are interested in this work in the criterion of
Figure 1: Basic genetic algorithm.
Levine and Nazif.

3.2 Solving a problem by AG 4.1 Inter-region contrast of Levine and Nazif


The application of GA to solve a problem requires to This criterion computes the sum of contrasts of regions
coding potential solutions to this problem by finite chains (Ri ) weighted by their area (Ai ). The contrast of a region
of bits to form chromosomes, to find a selective function
Volume 1, Issue 2 July-August 2012 Page 162
International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July – August 2012 ISSN 2278-6856

is defined from the existing contrasts with regions that contrast of Levine and Nazif) presented in paragraph
are contiguous. (4.1) which expresses the behavior to be optimized.
The chromosome chr is optimal if CIR (chr) is maximal.
 Ac i i

C IR 
Ri (1)
5.3 Genetic algorithm proposed
 Ai
Ri
Figure 4 shows the different steps of the proposed
lij mi  m j algorithm:
Where c   (2)
i
Rj li (mi  m j )
Phase 1 :
mi mean of the region Ri ; lij, length of the common
1. Fix :
border between Ri and Rj ; li , perimeter of the region Ri .
- The size of the population maxpop.
- The number of region C and seeds in the image.
5. THRESHOLD OPTIMIZATION BY - The maximum number of generation maxgen.
GENETIC ALGORITHM 2. Generate randomly the population Pop
Pop = {chr1, .., chrk, ..., chrmaxpop}

5.1Proposed coding
 
3. Verify for each chr of Pop the constraint: s  0,1
Phase 2 :
The proposed algorithm consists of selecting among all of
the possible thresholds s  0,1 , the optimal threshold by Repete
minimizing a criterion for validating segmentation. So 1. Region growing for each chr of Pop
every threshold s is associated a binary chromosome chr 2. Compute for each chr of Pop its fitness value F=CIR
of N genes. (chr).
3. Order the chromosomes chr in Pop from the best to the
chr  ( g k )1k  N (3) poor (in an increasing order of F).
The chr chromosome is a line vector of dimension N. 4. Choose the best chromosomes chr (replace the first chr
The possible values of the threshold are: by the last).
5. Determination of optimal chr and fitness value for this
s  0;0.01;..,0.09;0.10;0.11;..;0.21;..;0.31;..;0.99;1 generation.
6. Crossover of all the chr of Pop except the last
(4) 7. Mutation of all the chr of Pop except the last
Then we have 100 possible values of the threshold. The  
8. Verify for each chr of Pop the constraint: s  0,1
search space considered: Until Nb_gen (Nombre of generation)  maxgen
s *100  0;1;2;..100 (5) Figure 4: Genetic algorithm proposed.
The variable s*100 undergoes a binary coding, it is
represented by a set of bits that forms the chromosome. 6. RESULTS AND EVALUATIONS
The length of the chromosome is defined by the value l,
which depends on the range of s*100, in this case In = [0, In order to evaluate the performances of the proposed
99]. method we have considered 4 grey level images, a
Let bmin = 0 is the lower bound of In and bmax = 99 its synthesised image, and 3 real medical images of X-ray.
upper bound. 6.1 Synthetic image
b  99 the difference between the two terminals. Since
the value of b  128 and 128 = 27, and can be taken We have constructed a synthetic image which we name I1
of size 64*64. The image contains five objects of different
chromosome length l = 7.
grey level, its regions are marked by the starting points
To avoid that the initial solutions be far away from the
(seeds) proposed, figure 5.
optimal solution, the thresholds should check the
following constraint: s  0,1
In the proposed algorithm, we discard any chromosome
with a gene that does not satisfy this constraint. This
gene, if any, is replaced by another one which complies
with the constraint.

Figure 5: Synthesised image I1 and the marked image by


5.2 The proposed fitness function seeds.
Let chr be a chromosome of the population, for
computing the fitness function value associated with chr, Table 1 shows the region of I1 along with the grey level
we define the fitness function CRE (chr) (inter-region values and the number of pixels of each region.

Volume 1, Issue 2 July-August 2012 Page 163


International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July – August 2012 ISSN 2278-6856

TABLE 1 INFORMATIONS ON I1. TABLE 2 RESULT OF IMAGE SEGMENTATION.

Region Grey level GL Number of pixels Np


Number of pixels
1 150 839 Grey level Number of pixels of
Region of segmented
GL original image
2 29 883 image
3 179 895 1 150 839 821
4 15 827 2 29 883 866
5 76 652 3 179 895 913
4 15 827 844
5 76 652 652
The number of region considered is C = 5. The
coordinates of the starting points used in the region
growing method are: P (4 52 36 53 51 44 31 28 17 7) 6.1 Abdominal X-ray Image
Figure 6 shows that the proposed genetic algorithm We have considered in this test an image of an abdominal
converges quickly and gives optimum chromosome chrop X-ray scanner named I2, of size 101*88, figure (8, a).
corresponding to the optimal threshold sop. This gives the The number of region proposed is C = 7 (liver, left
optimal segmentation, Figure 7. kidney, right kidney, pancreas, etc). The objective of
segmentation in this case is the detection of image
The optimal chromosome obtained is: regions. The coordinates of the starting points P used in
the region growing method:
chrop= (0 1 0 1 0 1 0)
P (25 28 30 70 51 63 67 57 84 52 94 12 81 73)
The optimal threshold is : sop= 0.42 Figure (8, b) show the image marked by P.
0.024

0.022

0.02

0.018

0.016
F a b
0.014
Figure 8: Image of the abdomen marked by seeds.
0.012

0.01
The proposed algorithm converges quickly, in 4
generations, figure 9.
0.008
The optimal chromosome chop and the optimal threshold
0.006
1 2 3 4 5 6 7 8 9 10 sop are:
Générations

chop=( 0 1 0 1 1 0 1)
Figure 6: Fitness value with respect to the generation.
sop = 0.45

0.24

0.23

0.22

Figure 7: Results of image segmentation. 0.21


F

Table 2 illustrates the results of image segmentation by 0.2

region growing based optimal threshold obtained. 0.19

The error rate is :   35  0.85% 0.18

4096 0.17
1 2 3 4 5 6 7 8 9 10

The proposed algorithm shows good segmentation of the Générations

5 regions of the original image. The error rate obtained is


very small. This confirms the good performance of the Figure 9: Fitness value with respect to the generation.
proposed method.

Volume 1, Issue 2 July-August 2012 Page 164


International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July – August 2012 ISSN 2278-6856

Figure 10 show the results of the segmentation by the


proposed algorithm.

Figure 13: Results of image segmentation

Figure 12 shows that the proposed genetic algorithm


converges quickly and gives the optimal threshold sop.
This gives the optimal segmentation, Figure 13.
Figure 10: Results of image segmentation.

The proposed algorithm shows a clear detection of all 6.3 Image thorax 2
regions of the image. In this test we have considered a thorax X-ray image
named I4 of size 118*131, figure 14. The number of
6.2 Image thorax1 region considered is C=5 and the seeds P are:
In this test we have considered a thorax X-ray image
named I3 of size 103*127, figure 11. The number of P (23 62 73 46 116 63 66 104 16 16)
region considered is C=4, and the seeds P are: The objective of image segmentation is the detection of
image regions.
P (22 17 34 46 65 56 108 56)
The objective of image segmentation is the detection of
regions marked by seeds P.

Figure 14: Image of the thorax I4 marked by seeds.

Figure 11: Image of the thorax I3 marked by seeds.

The proposed algorithm converges quickly, in 8


generations, figure 12.
The optimal chromosome chop and the optimal threshold Figure 15: Result of image segmentation.
sop are:
The optimal chromosome chrop and the corresponding
chrop= (0 1 0 1 0 1 1) threshold sop are:
chrop=(0 1 0 1 1 0 1)
sop= 0.43
sop=0.45
0.15 0.155

0.145 0.15

0.14 0.145

0.14
0.135
F

0.135
F 0.13

0.13
0.125
0.125
0.12
0.12
0 2 4 6 8 10 12 14 16 18 20
0.115 Générations

0.11
0 2 4 6 8 10 12 14 16 18 20 Figure 16: Fitness value with respect to the generation.
Générations

Figure 12: Fitness value with respect to the generation. The proposed genetic algorithm converges quickly in all
trials (figure 9, 13 and 16) and finds the optimal

Volume 1, Issue 2 July-August 2012 Page 165


International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July – August 2012 ISSN 2278-6856

threshold. This allows the detection of objects of interest application aux images de textures. Thèse de
marked by the starting points (seeds) given a priori. doctorat. Université Mohammed premier Oujda
Figures 10, 12 and 15 show the optimal segmentation 2004.
obtained by the optimal threshold. [9]. M. Renders. Algorithmes génétiques et Réseaux de
Neurones. Editions HERMES, 1995.
7. CONCLUSION [10]. V. Letournel. Contribution à l’évaluation
d’algorithmes de traitement d’images. Thèse de
Region growing image segmentation shows some stability
Doctorat de l’ENST. 2002.
difficulties due to the threshold problem and the seeds.
[11]. C. Rosenberger, S. Chabrier, H. Laurent and B.
We have proposed the genetic algorithm image
Emile. Unsupervised and supervised image
segmentation in order to get over the threshold problem.
segmentation evaluation. Chapitre 18, pages 365-393
The proposed approach has been validated on synthetic
du livre Advances in Image and Video Segmentation,
image and a real medical image.
Pr. Yu-Jin Zhang, Idea Group Publishing, 2006.
The experimental results obtained show the good [12]. Charbuillet, Christophe. Algorithmes
performance of this approach. The threshold problem is évolutionnistes appliqués à l’extraction de
eliminated. caractéristiques pour la reconnaissance du locuteur.
Thèse de Doctorat. Université Pierre et Marie Curie-
Paris 6, 5 Décembre 2008.
REFERENCES
[1]. Y. Frank. Shih, Shouxian Cheng. Automatic seeded
region growing for color image segmentation. Image
and Vision Computing 23, pp 877–886, 2005. AUTHOR
[2]. Y. Lu, J. Miao, L. Duan, Y. Qiao and R. Jia. A new
approach to image segmentation based on simplified
Ahmad EL ALLAOUI works on
region growing PCNN. Applied Mathematics and
image processing and pattern
Computation. 205 pp. 807–814, 2008.
recognition in MATSI laboratory
[3]. Ahmad EL Allaoui, M. Nasri, M. Merzougui et M.
of the school of Technology,
EL Hitmy. Segmentation Evolutionniste d’image par
University of Oujda, Morocco. He
croissance de région:application aux images
has his master in the field of
médicales .International Worckshop on Information
computer sciences at University
and Communication, WOTIC’11 Casa Blanca,
the Med Benabdellah at Fez. His main field of
CDROM, 13-15 Octobre 2011. http://wotic11-
research interest is segmentation of medical image
ensem.net/
based on new methods (genetic and evolutionary
[4]. Ahmad EL Allaoui, M. Nasri, M. Merzougui , M.
approaches, neural networks, fuzzy logic).
EL Hitmy and B. Bouali. Medical Image
Segmentation By Region Evolutionary Approach.
M’barek Nasri is a senior
The 3rd International Conference on Multimedia
lecturer at the School of
Computing and Systems ICMCS’12 Tangier,
technology of Oujda University
CDROM, 10-12 May 2012. http://www.est-
since 1996. He obtained his Ph.D
usmba.ac.ma/cmt12/programme.htm
degree in 2004 in the field of data
[5]. Fan, J., Yau, D.K.Y., Elmagarmid, A.K., Aref, W.G.
Classification from the University
Automatic image segmentation by integrating color-
of Oujda, department of physics.
based extraction and seeded region growing. IEEE
He obtained the habilitation degree in 2006 from the
Trans. Image Process. 10 (10), pp. 1454–1466,
same university. His field of research interest is in
2001a.
image processing and its application to the quality
[6]. J. Fan , G. Zeng , Mathurin Body , Mohand-Said
control by artificial vision and medical imaging.
Hacid. Seeded region growing: an extensive and
MATSI laboratory of the school of Technology,
comparative study. Pattern Recognition Letters 26,
University of Oujda, Morocco
pp.1139–1156, 2005.
[7]. Ahmad EL Allaoui, M. Merzougui, M. Nasri, M. EL
Hitmy and H. Ouariachi. Evolutionary Image
Segmentation By Pixel Classification Application To
Medical Images. IJCIIS International Journal of
Computational Intelligence and Information Security,
ISSN: 1837-7823, Vol. 2, No. 3 pp. 12-24. March
2011.
[8]. M. Nasri. Contribution à la classification de données
par Approches Evolutionnistes : Simulation et

Volume 1, Issue 2 July-August 2012 Page 166

You might also like