You are on page 1of 6

I nt ernat i onal Journal of E mergi ng Trends & Technol ogy i n Comput er Sci ence (I JE TTCS)

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


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


Vol ume 1 , I ssue 2 Jul y-August 2 0 1 2 Page 1 6 1


AbstractImage segmentation by region growing method is
robust fast and very easy to implemented, but it suffers from:
the threshold problem, initialization, and sensitivity to noise.
Genetic algorithms are particular methods for optimizing
functions; they have a great ability to find the global
optimum of a problem. In this paper, we used genetic
algorithms to get over the threshold problem. We have
proposed a segmentation method based on region growing
and genetic algorithms. The proposed approach is validated
on synthetic images and medical. The results show the good
performance of this approach.
Keywords: Segmentation, Region growing, Genetic
algorithm, threshold.
1. INTRODUCTION
The segmentation is a very important stage in images and
interpretation processing; there are many consistent
methods available today for image segmentation, among
these: there is the segmentation based on regions [3, 4],
segmentation based on pixel [7] and segmentation based
contour. After many years of seeking the optimal method,
the researchers understood that the ideal segmentation did
not exist. Given an image, there are still several possible
segmentations. A good segmentation method will be one
that will arrive at a correct interpretation.
We are interested in this work to approach region and
specifically the region growing. A region is a set of
topologically related pixels and having similar attributes:
gray levels, color, texture, movement [1, 2, 5].
Segmentation by region growing is very recognized, fast,
simple and easy to implement, [2, 5, 6] but it presents
disadvantages:
- Sensitive to the threshold.
- Local method: no global view of the problem. In
practice, for different point of initialization (seeds)
one gets different results, not very stable.
- Sensitive to the order of course of the points
- Very sensitive to the noise.
Considering the great success of the genetic algorithms in
the optimisations problems, we exploit them to get over
first disadvantages of this algorithm. We have presented
an algorithm of segmentation by evolutionary region
growing.
The problem of initialization and order of cours of points
is treated by evolutionary strategy in [3, 4].
In Section 2 image segmentation with region growing
algorithm is presented. Section 3 gives an introduction to
genetic algorithm. The evaluation criterion of
segmentation is detailed in the next section. The proposed
genetic algorithm for optimization of threshold is
presented in section 5. In section 6, a validation of our
approach is given; experimental results are obtained over
synthetic and medical images. Finally we give a
conclusion.
2. REGION GROWING METHOD (RG)
The region growing algorithm is a method of
segmentation based on the approach region, the principle
of this algorithm is as follows [2, 5, 6]:
- We fix the points (seed) starting in the image. These
points are called germs of regions searched.
- We fix a criterion of homogeneity (threshold) of the
region searched for example, the grey level or texture
criteria.
- For a recursive procedure (step by step), are included
in the region all the points that satisfy the criterion
related.
It is growing and the region as the criterion is met.
The choice of starting points is the critical part of the
algorithm. The growing stage will use a similarity
measure to select the pixels to be agglomerated.
The growing stop when you can not add more pixels
without breaking homogeneity [2, 5, 6].
2.1. Starting points (seeds)
The choice of starting points or initialization is the
critical part of the algorithm. Indeed, the growth stage
will use a similarity measure based on a given threshold,
to select the pixels to be agglomerated. If the starting
point is located in a non-homogeneous, the similarity
Threshold Optimization by Genetic Algorithm
for Segmentation of Medical Images by Region
Growing

Ahmad EL Allaoui
1
and Mbarek Nasri
2



1,2
LABO MATSI, ESTO, B.P 473, University Mohammed I OUJDA, MOROCCO

I nt ernat i onal Journal of E mergi ng Trends & Technol ogy i n Comput er Sci ence (I JE TTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July August 2012 ISSN 2278-6856


Vol ume 1 , I ssue 2 Jul y-August 2 0 1 2 Page 1 6 2

measure will produce large variations and growth will
stop very soon.
2.2. Region growing (growing)
This step aims to grow a region by agglomerating
neighboring pixels. The pixels are selected to maintain
the homogeneity of the region. For this, we need to define
an indicator of homogeneity. Neighboring pixels are
added to the region of homogeneity if the indicator is
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
manually or automatically.
In this work we will give germs a priori and we determine
the optimal threshold automatically by genetic algorithm.
3. GENETIC ALGORITHM
3.1. Basic concepts
Genetic algorithms are techniques for optimizing
functions. GA are based on the evolution of a population
of solutions which under the action of some precise rules
optimize a given behavior, which initially has been
formulated by a given specified function fitness function
[9]. A GA manipulates a population of constant size. This
population is formed by chromosomes. Each chromosome
represents the coding of a potential solution to the
problem to be solved; it is formed by a set of genes
belonging to an alphabet [9][12].
At each iteration is created a new population by applying
the genetic operators: selection, crossover and mutation
[8, 12]. The algorithm chooses in selection the most
pertinent candidates. Crossover consists in building 2 new
chromosomes from 2 old ones referred to as the parents,
figure 2.
Mutation realizes the inversion of one or several genes in
a chromosome, figure 3, [9, 12]. Figure 1 show steps of
genetic algorithm GA.
Random generation of the initial population
Fitness evaluation of each chromosome
Repeat
Selection
Crossover
Mutation
Fitness evaluation of each chromosome
Until Satisfying the stop criterion
Figure 1: Basic genetic algorithm.
3.2 Solving a problem by AG
The application of GA to solve a problem requires to
coding potential solutions to this problem by finite chains
of bits to form chromosomes, to find a selective function
allowing a good discrimination between chromosomes
and to define genetic operators to be used [8].





Figure 2:Crossover operator.







Figure 3:Mutation perator.
3.3 Solving a problem by AG
The application of GA to solve a problem requires to
coding potential solutions to this problem by finite chains
of bits to form chromosomes, to find a selective function
allowing a good discrimination between chromosomes
and to define genetic operators to be used [8].
4. EVALUATION OF A SEGMENTATION
There are a multitude of segmentation methods whose
effectiveness is difficult to assess. Currently, some work
has been done to solve the general problem of evaluating
a segmentation result [10]. There are two types of
evaluation approaches [11].
The first evaluates the quality of a segmentation result by
measuring its similarity to reference segmentation.
Several studies have been made in medical imaging.
The second is based on unsupervised evaluation criteria
for estimating the quality of a segmentation result from
statistics calculated for each detected region.
There are several criteria for evaluating unsupervised
segmentation. The value of each criterion increases with
the quality of the segmentation result [11].
A criterion value close to 1 indicates a very good result of
segmentation. Different criteria are described in detail in
[10, 11], we are interested in this work in the criterion of
Levine and Nazif.
4.1 Inter-region contrast of Levine and Nazif
This criterion computes the sum of contrasts of regions
(R
i
) weighted by their area (A
i
). The contrast of a region

1 8
Initial chromosome 1 0 0 0 1 1 1 1

Chromosome mutant 1 0 0 0 0 1 1 1
Mutation site


1 8
1 0 0 0 1 1 1 1
Parents
1 1 0 0 0 0 0 0

1 0 0 0 0 0 0 0
Children
1 1 0 0 1 1 1 1

Crossover site
I nt ernat i onal Journal of E mergi ng Trends & Technol ogy i n Comput er Sci ence (I JE TTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July August 2012 ISSN 2278-6856


Vol ume 1 , I ssue 2 Jul y-August 2 0 1 2 Page 1 6 3

is defined from the existing contrasts with regions that
are contiguous.

=
i
i
R
i
i
R
i
IR
A
c A
C
(1)
Where

=
j
R j i i
j i ij
i
m m l
m m l
c
) (
(2)
m
i
mean of the region R
i
; l
ij
, length of the common
border between R
i
and R
j ;
l
i
, perimeter of the region R
i
.
5. THRESHOLD OPTIMIZATION BY
GENETIC ALGORITHM
5.1Proposed coding
The proposed algorithm consists of selecting among all of
the possible thresholds | | 1 , 0 e s , the optimal threshold by
minimizing a criterion for validating segmentation. So
every threshold s is associated a binary chromosome chr
of N genes.

N k k
g chr
s s
=
1
) ( (3)
The chr chromosome is a line vector of dimension N.
The possible values of the threshold are:

| | 1 ; 99 . 0 ;..; 31 . 0 ;..; 21 . 0 ;..; 11 . 0 ; 10 . 0 ; 09 . 0 ;.., 01 . 0 ; 0 e s
(4)

Then we have 100 possible values of the threshold. The
search space considered:
| | 100 ;.. 2 ; 1 ; 0 100 * e s (5)

The variable s*100 undergoes a binary coding, it is
represented by a set of bits that forms the chromosome.
The length of the chromosome is defined by the value l,
which depends on the range of s*100, in this case I
n
= [0,
99].
Let b
min
= 0 is the lower bound of I
n
and b
max
= 99 its
upper bound.
99 = Ab the difference between the two terminals. Since
the value of 128 < Ab and 128 = 2
7
, and can be taken
chromosome length l = 7.
To avoid that the initial solutions be far away from the
optimal solution, the thresholds should check the
following constraint: | | 1 , 0 e s
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.
5.2 The proposed fitness function
Let chr be a chromosome of the population, for
computing the fitness function value associated with chr,
we define the fitness function CRE (chr) (inter-region
contrast of Levine and Nazif) presented in paragraph
(4.1) which expresses the behavior to be optimized.
The chromosome chr is optimal if C
IR
(chr) is maximal.
5.3 Genetic algorithm proposed
Figure 4 shows the different steps of the proposed
algorithm:
Phase 1 :
1. Fix :
- The size of the population maxpop.
- The number of region C and seeds in the image.
- The maximum number of generation maxgen.
2. Generate randomly the population Pop
Pop = {chr1, .., chrk, ..., chrmaxpop}
3. Verify for each chr of Pop the constraint: | | 1 , 0 e s
Phase 2 :

Repete
1. Region growing for each chr of Pop
2. Compute for each chr of Pop its fitness value F=CIR
(chr).
3. Order the chromosomes chr in Pop from the best to the
poor (in an increasing order of F).
4. Choose the best chromosomes chr (replace the first chr
by the last).
5. Determination of optimal chr and fitness value for this
generation.
6. Crossover of all the chr of Pop except the last
7. Mutation of all the chr of Pop except the last
8. Verify for each chr of Pop the constraint: | | 1 , 0 e s
Until Nb_gen (Nombre of generation) maxgen
Figure 4: Genetic algorithm proposed.
6. RESULTS AND EVALUATIONS
In order to evaluate the performances of the proposed
method we have considered 4 grey level images, a
synthesised image, and 3 real medical images of X-ray.
6.1 Synthetic image
We have constructed a synthetic image which we name I1
of size 64*64. The image contains five objects of different
grey level, its regions are marked by the starting points
(seeds) proposed, figure 5.

Figure 5: Synthesised image I1 and the marked image by
seeds.
Table 1 shows the region of I1 along with the grey level
values and the number of pixels of each region.
I nt ernat i onal Journal of E mergi ng Trends & Technol ogy i n Comput er Sci ence (I JE TTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July August 2012 ISSN 2278-6856


Vol ume 1 , I ssue 2 Jul y-August 2 0 1 2 Page 1 6 4

TABLE 1 INFORMATIONS ON I1.





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)
Figure 6 shows that the proposed genetic algorithm
converges quickly and gives optimum chromosome chr
op

corresponding to the optimal threshold s
op
. This gives the
optimal segmentation, Figure 7.
The optimal chromosome obtained is:
chr
op
= (0 1 0 1 0 1 0)
The optimal threshold is : s
op
= 0.42
1 2 3 4 5 6 7 8 9 10
0.006
0.008
0.01
0.012
0.014
0.016
0.018
0.02
0.022
0.024
Gnrations
F

Figure 6: Fitness value with respect to the generation.

Figure 7: Results of image segmentation.
Table 2 illustrates the results of image segmentation by
region growing based optimal threshold obtained.
The error rate is :
% 85 . 0
4096
35
= =

The proposed algorithm shows good segmentation of the
5 regions of the original image. The error rate obtained is
very small. This confirms the good performance of the
proposed method.
TABLE 2 RESULT OF IMAGE SEGMENTATION.


6.1 Abdominal X-ray Image
We have considered in this test an image of an abdominal
X-ray scanner named I2, of size 101*88, figure (8, a).
The number of region proposed is C = 7 (liver, left
kidney, right kidney, pancreas, etc). The objective of
segmentation in this case is the detection of image
regions. The coordinates of the starting points P used in
the region growing method:
P (25 28 30 70 51 63 67 57 84 52 94 12 81 73)
Figure (8, b) show the image marked by P.

a b
Figure 8: Image of the abdomen marked by seeds.
The proposed algorithm converges quickly, in 4
generations, figure 9.
The optimal chromosome ch
op
and the optimal threshold
s
op
are:
ch
op
=( 0 1 0 1 1 0 1 )
s
op
= 0.45
1 2 3 4 5 6 7 8 9 10
0.17
0.18
0.19
0.2
0.21
0.22
0.23
0.24
Gnrations
F

Figure 9: Fitness value with respect to the generation.
Region
Grey level
GL
Number of pixels of
original image
Number of pixels
of segmented
image
1 150 839 821
2 29 883 866
3 179 895 913
4 15 827 844
5 76 652 652
Region Grey level GL Number of pixels Np
1 150 839
2 29 883
3 179 895
4 15 827
5 76 652
I nt ernat i onal Journal of E mergi ng Trends & Technol ogy i n Comput er Sci ence (I JE TTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July August 2012 ISSN 2278-6856


Vol ume 1 , I ssue 2 Jul y-August 2 0 1 2 Page 1 6 5

Figure 10 show the results of the segmentation by the
proposed algorithm.

Figure 10: Results of image segmentation.
The proposed algorithm shows a clear detection of all
regions of the image.
6.2 Image thorax1
In this test we have considered a thorax X-ray image
named I3 of size 103*127, figure 11. The number of
region considered is C=4, and the seeds P are:
P (22 17 34 46 65 56 108 56)
The objective of image segmentation is the detection of
regions marked by seeds P.

Figure 11: Image of the thorax I3 marked by seeds.
The proposed algorithm converges quickly, in 8
generations, figure 12.
The optimal chromosome ch
op
and the optimal threshold
s
op
are:
chr
op
= (0 1 0 1 0 1 1)
s
op
= 0.43
0 2 4 6 8 10 12 14 16 18 20
0.11
0.115
0.12
0.125
0.13
0.135
0.14
0.145
0.15
Gnrations
F

Figure 12: Fitness value with respect to the generation.

Figure 13: Results of image segmentation
Figure 12 shows that the proposed genetic algorithm
converges quickly and gives the optimal threshold s
op
.
This gives the optimal segmentation, Figure 13.
6.3 Image thorax 2
In this test we have considered a thorax X-ray image
named I4 of size 118*131, figure 14. The number of
region considered is C=5 and the seeds P are:
P (23 62 73 46 116 63 66 104 16 16)
The objective of image segmentation is the detection of
image regions.

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

Figure 15: Result of image segmentation.
The optimal chromosome chr
op
and the corresponding
threshold s
op
are:
chr
op
=(0 1 0 1 1 0 1)
s
op
=0.45
0 2 4 6 8 10 12 14 16 18 20
0.12
0.125
0.13
0.135
0.14
0.145
0.15
0.155
Gnrations
F

Figure 16: 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
I nt ernat i onal Journal of E mergi ng Trends & Technol ogy i n Comput er Sci ence (I JE TTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 1, Issue 2, July August 2012 ISSN 2278-6856


Vol ume 1 , I ssue 2 Jul y-August 2 0 1 2 Page 1 6 6

threshold. This allows the detection of objects of interest
marked by the starting points (seeds) given a priori.
Figures 10, 12 and 15 show the optimal segmentation
obtained by the optimal threshold.
7. CONCLUSION
Region growing image segmentation shows some stability
difficulties due to the threshold problem and the seeds.
We have proposed the genetic algorithm image
segmentation in order to get over the threshold problem.
The proposed approach has been validated on synthetic
image and a real medical image.
The experimental results obtained show the good
performance of this approach. The threshold problem is
eliminated.
REFERENCES
[1]. Y. Frank. Shih, Shouxian Cheng. Automatic seeded
region growing for color image segmentation. Image
and Vision Computing 23, pp 877886, 2005.
[2]. Y. Lu, J. Miao, L. Duan, Y. Qiao and R. Jia. A new
approach to image segmentation based on simplified
region growing PCNN. Applied Mathematics and
Computation. 205 pp. 807814, 2008.
[3]. Ahmad EL Allaoui, M. Nasri, M. Merzougui et M.
EL Hitmy. Segmentation Evolutionniste dimage par
croissance de rgion:application aux images
mdicales .International Worckshop on Information
and Communication, WOTIC11 Casa Blanca,
CDROM, 13-15 Octobre 2011. http://wotic11-
ensem.net/
[4]. Ahmad EL Allaoui, M. Nasri, M. Merzougui , M.
EL Hitmy and B. Bouali. Medical Image
Segmentation By Region Evolutionary Approach.
The 3rd International Conference on Multimedia
Computing and Systems ICMCS12 Tangier,
CDROM, 10-12 May 2012. http://www.est-
usmba.ac.ma/cmt12/programme.htm
[5]. Fan, J., Yau, D.K.Y., Elmagarmid, A.K., Aref, W.G.
Automatic image segmentation by integrating color-
based extraction and seeded region growing. IEEE
Trans. Image Process. 10 (10), pp. 14541466,
2001a.
[6]. J. Fan , G. Zeng , Mathurin Body , Mohand-Said
Hacid. Seeded region growing: an extensive and
comparative study. Pattern Recognition Letters 26,
pp.11391156, 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 donnes
par Approches Evolutionnistes : Simulation et
application aux images de textures. Thse de
doctorat. Universit Mohammed premier Oujda
2004.
[9]. M. Renders. Algorithmes gntiques et Rseaux de
Neurones. Editions HERMES, 1995.
[10]. V. Letournel. Contribution lvaluation
dalgorithmes de traitement dimages. Thse de
Doctorat de lENST. 2002.
[11]. C. Rosenberger, S. Chabrier, H. Laurent and B.
Emile. Unsupervised and supervised image
segmentation evaluation. Chapitre 18, pages 365-393
du livre Advances in Image and Video Segmentation,
Pr. Yu-Jin Zhang, Idea Group Publishing, 2006.
[12]. Charbuillet, Christophe. Algorithmes
volutionnistes appliqus lextraction de
caractristiques pour la reconnaissance du locuteur.
Thse de Doctorat. Universit Pierre et Marie Curie-
Paris 6, 5 Dcembre 2008.



AUTHOR

Ahmad EL ALLAOUI works on
image processing and pattern
recognition in MATSI laboratory
of the school of Technology,
University of Oujda, Morocco. He
has his master in the field of
computer sciences at University
the Med Benabdellah at Fez. His main field of
research interest is segmentation of medical image
based on new methods (genetic and evolutionary
approaches, neural networks, fuzzy logic).
Mbarek Nasri is a senior
lecturer at the School of
technology of Oujda University
since 1996. He obtained his Ph.D
degree in 2004 in the field of data
Classification from the University
of Oujda, department of physics.
He obtained the habilitation degree in 2006 from the
same university. His field of research interest is in
image processing and its application to the quality
control by artificial vision and medical imaging.
MATSI laboratory of the school of Technology,
University of Oujda, Morocco

You might also like