Professional Documents
Culture Documents
Abstract–We use an evolutionary process to seek a GA. We have found rules like 0000000001, 11111111110
specialized set of rules among a wide range of rules to be that always perform fine edge segmentation.
used by Cellular Automata (CA) for a range of tasks, In this paper, the sequential floating forward search
extracting edges in a given gray or colour image, noise method for feature selection was used to select good rule
filtering applied to black-white image. This is the best set of
sets for a range of tasks, Edges Detection in a given gray or
local rules determine the future state of CA in an
asynchronous way. The Genetic Algorithm (GA) is applied colour image, Noise Filtering applied to black-white image.
to search the best CA rules that can realize the best edge Indeed, an EvCA is applied in order to determine the best
detection and noise filtering. local rules of the CA, using a GA on a population of CA
candidates [1],
Keywords: Genetic Algorithms, Evolutionary Cellular After this introduction, the Section 2 presents the design
Automata, Edge Detection, Noise Filtering. and training of the generalised EvCA approach. Edges
Detection is reported in the Section 3. Conclusion is given
I. INTRODUCTION in the last section.
We can understand the emergence like a phenomenon of II. DESIGN AND TRAINING OF THE GENERALISED EVCA
producing collective behaviour by a collection of
interacting elements in a complex system. The study of The proposed approach takes advantage of the
evolving Cellular Automata (CA) framework using calculating faculties of the CA, to transform the initial
evolutionary algorithms is a good example to show how configurations defined by a numerical image lattice as
evolution can create systems in which emergent discrete input data in order to find its edges.
computation takes place. Indeed, the actions of simple The CA unit is represented by a rectangle of 9 cells. In
components with local information and communication particular case of bi-colour image, the problem is to find
give rise to coordinated global information processing [1]. the best CA patterns or rules for edge detection among 251
In this paper, we are using Genetic Algorithms (GAs) in possible patterns or rules. Otherwise, for colour image with
order to evolve CA to perform computations that require more than 02 colours; 16, 256, 16bits, 24bits, 32bits, then
global coordination [1]. Indeed, we are interested into CA search domain is 2(K^8/5) patterns or possible rules, where K
[2], [3], [4] and the edge detection [5]. Among a variety of is the image colour number and 5 is the number of
researchers having investigated the proprieties of CA, we geometrical transformations.
can’t miss to cite the works of John von Neumann [6], Within this enormous wide search domain, we look to
Stephen Wolfram [7], and John Conway [8]. find the optimum packet of rules that give the best edge
CA’s are discrete dynamical systems, which are widely segmentation. Thus, a manually or exhaustive search
applied in modelling systems in areas such as physics, method will consume a lot of time, effort and computing
biology, and sociology [9]. CA can be interpreted like a set resources without guaranty to reach optimal results.
of rules which through an Evolutionary CA (EvCA), we Therefore, we have to work with the inverse problem to
can find one or several appropriate rules for a definite find the optimal set of rules that give the best edge
problem. The idea of using one packet of rules in edge segmentation using the evolving search capabilities of the
detection and filtering are in the merit of Rosin [4]. Indeed, Genetic algorithms (see Fig. 4).
it is used in restoration of black-white images. Moreover, The first important observation is that this wide domain
Rosin [4] studied these best rules in details and showed the of neighbourhood patterns can be reduced to a maximum of
interest of each one. 8 indexed colours, because every CA has a neighboured of
The result of his study showed that a single rule can 8 cells, so locally it saw a maximum of 8 distinct colours
remove isolated pixels in a noise black-white image. whatever the whole number of colour in the image or
In the previous work [10] we have determined a set of around other CAs, thus maximum (Domain Search)
rules to detect edges in black and white images, using a becomes 2(8^8/5).
28
Computer Science
1 1 1 1 1 1 1 1 1 = 9C1
1 1 1 2 2 3 3 4 4 = 3C12C22C32C4
Fig. 1. Generic pattern.
Secondly, to ensure that every CA works independently Fig. 2. Base patterns for training stage.
whatever colour indexes, we have defined what we call
generic patterns. Algorithm
CA can be interpreted like a set of rules which through 1. The input data: Input Image.
an EvCA, we can find one or several appropriate rules for a 2. Initialization of the GA: Construction at random of
definite problem. rule packets extracted from the neighbourhood
The proposed approach named GEvCA-ED, takes a model figured on the whole of the image (see Fig.
population of candidate packets or rules and evolves them 4).
for multiple generations, based on measuring their • Edge detection method: For each CA, the
matching ratio (fitness) with some of well known process: First, searches; among the current
segmented images. packets; the similar rule according to its
The construction of packet must take in consideration neighbourhood. Second, modifies the central
some of constraints that can slow down convergence and pixel according to the defined transition.
may falsify the overall process. • Evaluation of the edge detection result: We
1. Redundancy: one packet must not have rules more compute the distance between the edge
than once. detection result and the ideal one considered
2. Contradiction: one packet must not have more than to assess the approach. We can also evaluate
one rule per patch (02 patches with different the error of miss-classed pixels.
transitions). 3. Reproduction: Generate a new population by
3. Similarity: like these coloured patterns are similar applying selection, crossover and mutation. We use
111223344 =888115533, because they are the the edge detection described above in the evaluation
occurrence of the generic pattern process.
C1C1C1C2C2C3C3C4C4. 4. The process iterates until there is no improvement in
4. Useless: packet hasn’t some rules that patch to the objective function for a given stall limit
operate on. consecutive generations, or for a fixed maximum of
iterations [11].
III. THE GENERALISED EVCA FOR EDGE DETECTION 5. The result: optimal packet of rules.
(GEVCA-ED)
We represent the transition rule of a CA by the
The framework of this new method is composed of two concatenation of the cells states of the current cell
stages: neighbourhood to update (see Fig. 4). Then, we add the
future cell state after updating [5]. This rule (pattern) is
I.1 Training stage transformed as a linear chromosome (see Fig. 3.).
It has as objective, extracting common model rules. The rule is applied when its part neighbourhood
This can be made by a set of handy designed templates; coincides with a patch of the same dimension on the image.
they have a particularity that they can be figured in any Then, we replace the central pixel of the patch by the value
image. We have 03 generic templates (12 x 12 pixels): of the future state in the rule.
The correspondence between the part neighbourhood of
I.2. Building optimal packet stage the rule and a patch of the image is reduced according to
It has as objective, finding more stable rules than other the rotational operators (rotation to 90°, 180°, 2700,
extracted in the training stage. To ensure the best reversal horizontal and vertical "flip-flop"). The rules are
convergence we have to reinforce testing by some therefore symmetrical.
treatments (always by using dedicated CA rules) as, colour
reduction, filtering before and after effective segmentation
process.
After all, the packet with best fitness will be the Fig. 3. CA rule notation and the chromosome representation the CA rule.
dedicated base packet for image edge segmentation.
The following code describes the GA process to
determine the best packet of transition rules that are able to
achieve the edge detection of colour images.
29
Journal of Applied Computer Science & Mathematics, no. 11 (5) /2011, Suceava
1 1 1 1 1 1 2 2 2 1
1 1 1 1 1 2 1 2 2 1
1 1 1 1 1 1 1 2 2 1
1 1 1 1 2 2 1 2 2 1
1 1 2 1 2 2 3 2 2 1
1 1 1 1 1 2 3 3 2 1
1 1 1 1 2 2 2 2 2 1
1 2 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 2 1
1 1 1 1 1 1 1 2 1 1
1 1 1 1 1 2 2 2 2 1
1 1 1 1 2 1 2 2 1 1
Fig. 4. Construction of the neighbourhood model from an input image. 1 1 1 1 2 1 1 2 2 1
1 1 1 1 2 2 1 1 2 1
Each individual of the population is represented by a 1 1 1 2 2 1 1 1 1 1
1 1 2 1 1 2 2 2 2 1
chromosome which is a transition vector according to a
1 1 2 1 1 1 1 1 2 1
neighbourhood model (see Fig. 4). To make the CA 1 1 2 1 1 1 2 2 1 1
deterministic, we must take in consideration the constraints 1 1 2 1 1 1 3 3 3 1
listed above. The crossover exchanges, with given 1 1 2 1 1 1 2 1 1 1
probability a genetic material between two parent 1 1 2 1 1 1 3 1 1 1
1 1 2 1 1 2 3 1 1 1
chromosomes corresponding to two CA transition rules for 1 1 2 1 2 2 1 1 1 1
producing two offspring. The mutation is a random change 1 1 2 3 1 1 3 1 1 1
of gene in a given CA transition rule (parent). 1 2 2 1 1 1 1 2 1 1
The selection process based on the edge detection 1 2 2 1 1 2 3 3 1 1
1 2 2 3 1 1 3 1 1 1
assessment in EvCA represents an interdisciplinary process. 1 2 2 3 1 2 3 3 1 1
Let Err=nbr of pixels where (ImageED ≠ImageIdealED), 1 1 1 2 2 2 2 2 3 1
which Err and nbr are the abbreviation of error and number 1 1 1 2 2 2 2 3 2 1
respectively. 1 1 1 1 1 1 1 1 1 1
. . . . . . . . . .
The fitness function used to assess the edge detection is . . . . . . . . . .
given by: F=1–(Err/L×H) where L and H represent the Fig. 6. Optimal packet with 1057 Rules.
image width and height. The Err function computes the
number of the points finds non equal in the two images: the This figure represents the optimal packet found by the
resulted image and the ideal one. GEvCA-ED process. On the left side we have represented
only a subset of the whole packet composed by 1057 rules.
Post processing packets
On the right side we give a plotted view of the entire
We have an optimal packet for every tested image, but
packet, where each row represents one rule and the last
we need one global optimal packet for all images, so we
column defines the transition part of the rule. We have
must collect these packets on one packet and filtering it
maintained only rules which give solid contours, so non
from redundancy, contradiction and similarity.
figured pattern are considered background.
Fig. 5. A best packet of CA rules find by GA. (1, 2, 3: are the colour
indexes) Fig. 7. Training Stage edge detection 1st set images.
30
Computer Science
C: Cells 96 × 96 pixels
Cameraman Lina
Cells Vegetable 1
Fig. 8. Fitness evolution per generations for images (A, B, C and D)
TABLE I
Evaluation values of the experiments reported in Figs. 8, A, B, C, and D. B. Vegetable 2 - 253 × 254 pixels
Image Fitness Time (sec) Generation Max gen.
Cameraman 0.9784 5127 1808 3000
Lina 0.8745 136879 2994 3000
Vegetable 1 0.9310 9386 197 400
Cells 0.8826 6643 137 600
B: Lina 96 × 96 pixels
31
Journal of Applied Computer Science & Mathematics, no. 11 (5) /2011, Suceava
32
Computer Science
Fig. 13. Filtering Chart_small_resolution image 128×128 pixels; (a) Results of the different filtering methods, (b) Relation between the methods of filtering
and the values of noise
This experiment applied has the image chart small_ information), and the rate of the errors of filtering by CA
resolution with a sequence of the values of noise (0.01, (14%) is smaller compared to the tau of the errors of filter
0.04, 0.07, 0.1, 0.13, 0.16, 0.19, 0.22, 0.25, 0.28, 0.31), and Median (32%). The error is the number of the pixels is
we observe in its results that filtering by Cellular Automata different between the original image and the filtered image.
to produce a closer image which has the original image As we observe as filtering by CA is more effective for
because it is kept the feature of the image (image some is the value of noise (Fig. 13).
33
Journal of Applied Computer Science & Mathematics, no. 11 (5) /2011, Suceava
34
Computer Science
These tables represent the relation between the various S.Rule: Sequence of Rule and Pb.Noisse: Probability of
methods of filtering and the values of noise (E: Errors, Noise).
P.Noise: Percentage of noise, M.F: Method of Filtering,
TABLE II
Representation of relation between the methods of filtering and the values of noise has the lina image.
P.Noise
0.01 0.04 0.07 0.1 0.13 0.16 0.19 0.22 0.25 0.28 0.31
F. M
E. F.CAs 551 602 694 847 1054 1223 1565 1345 1500 1765 1990
E.Median 1110 1191 1271 1362 1473 1511 1661 1822 1993 2189 2363
E.Gussian 815 891 949 1041 1163 1281 1388 1564 1799 2049 2389
E.Muyenn 1087 1168 1250 1343 1438 1486 1622 1780 1960 2150 2321
TABLE III
Representation of relation between the methods of filtering and the values of noise has the Euro image.
P. Noise 0.01 0.04 0.07 0.1 0.13 0.16 0.19 0.22 0.25 0.28 0.31
F.M
E. F.CAs 640 719 799 901 1060 1263 1466 1813 2071 1831 2073
E.Median 1454 1527 1632 1671 1772 1843 1937 2105 2182 2372 2517
E.Gussian 1003 1066 1186 1244 1350 1451 1583 1798 1871 2028 2344
E.Muyenn 1454 1527 1633 1671 1775 1849 1942 2113 2199 2384 2546
TABLE IV
Representation of relation between the methods of filtering and the values of noise has the Chart_small_resolution image.
P. Noise 0.01 0.04 0.07 0.1 0.13 .16 0.19 0.22 0.25 0.28 0.31
F.M
E. FCAs 117 146 188 202 290 345 424 532 624 576 665
E.Median 477 480 480 517 578 603 666 720 796 859 950
E.Gussian 326 329 346 353 382 401 432 551 577 622 715
E.Muyenn 473 476 473 498 545 550 623 654 726 775 843
35
Journal of Applied Computer Science & Mathematics, no. 11 (5) /2011, Suceava
TABLE V
Representation of relation between the rules of filtering by CAs and the values of noise has the lina image.
P. Noise 0.01 0.04 0.07 0.1 0.13 0.16 0.19 0.22 0.25 0.28 0.31
S. Rules
Rule 1 199 666 1249 1950 2797 3684 4496 5399 6427 7401 8435
Rule 2 172 500 938 1486 2323 3141 3940 4804 5833 6834 7881
Rule 3 217 480 790 1226 1849 2498 3222 3940 4840 5692 6649
Rule 4 234 459 724 1140 1702 2308 2929 3614 4469 5316 6210
Rule 5 314 460 640 852 1205 1596 2065 2609 3293 4049 4810
Rule 6 356 474 620 816 1069 1357 1819 2292 2927 3623 4393
Rule 7 424 528 650 818 1037 1266 1655 2064 2572 3098 3830
Rule 8 467 569 670 835 1032 1223 1586 1951 2434 2939 3595
Rule 9 473 579 681 841 1033 1212 1575 1925 2369 2845 3483
Rule 10 476 578 683 845 1036 1217 1575 1894 2338 2807 3385
Rule 11 531 615 704 877 1046 1217 1575 1894 2338 2807 3385
Rule 12 548 616 704 868 1019 1200 1546 1865 2312 2776 3364
TABLE VI
Representation of relation between the rules of filtering by CAs and the values of noise has the Euro image.
P.Noise 0.01 0.04 0.07 0.1 0.13 0.16 0.19 0.22 0.25 0.28 0.31
S.S.Rules
Rule 1 191 674 1086 1692 2237 2813 3483 4145 4645 5238 5966
Rule 2 181 448 734 1165 1657 2162 2831 3503 3995 4587 5327
Rule 3 210 452 701 1068 1469 1972 2587 3152 3662 4181 4907
Rule 4 252 440 664 957 1287 1730 2265 2723 3201 3693 4421
Rule 5 288 440 634 826 1109 1454 1875 2345 2769 3187 3883
Rule 6 410 516 647 795 1008 1251 1622 2009 2329 2733 3339
Rule 7 446 547 673 801 987 1226 1573 1925 2213 2568 3111
Rule 8 546 644 733 868 1019 1222 1515 1852 2094 2411 2913
Rule 9 558 655 738 878 1038 1225 1504 1839 2094 2411 2913
Rule 10 560 656 736 875 1031 1216 1492 1817 2043 2378 2866
Rule 11 612 702 786 911 1068 1258 1514 1839 2054 2345 2833
Rule 12 633 715 799 919 1067 1243 1500 1817 2040 2345 2833
TABLE V
Representation of relation between the rules of filtering by CAs and the values of noise has the Cart_small_resolution image.
0.01 0.04 0.07 0.1 0.13 0.16 0.19 0.22 0.25 0.28 0.31
Pb.Noise
S. Rules
Rule 1 76 342 536 774 1038 1314 1564 1872 2004 2245 2513
Rule 2 29 125 241 403 592 841 1064 1359 1486 1759 2031
Rule 3 39 125 239 398 586 835 1057 1351 1479 1746 2016
Rule 4 34 109 207 322 446 662 812 1072 1211 1404 1625
Rule 5 34 109 203 319 447 651 805 1060 1197 1398 1615
Rule 6 106 163 201 260 326 485 598 773 826 1033 1175
Rule 7 106 162 199 254 323 476 589 773 816 1021 1162
Rule 8 115 171 207 261 321 422 521 704 724 891 1008
Rule 9 115 171 203 259 319 416 516 699 724 878 996
Rule 10 115 170 202 257 316 413 503 687 702 850 941
Rule 11 114 156 191 226 283 382 488 650 679 822 924
Rule 12 114 141 161 194 239 333 431 598 628 755 868
36
Computer Science
Sihem Slatnia was born in the city of Biskra, Algeria. She followed her high studies at the university of Biskra, Algeria at the
Computer Science Department and obtained the engineering diploma in 2004 on the work “Diagnostic based model by Black
and White analyzing in Background Petri Nets”, After that, she obtained Master diploma in 2007 (option: Artificial
intelligence and advanced system’s information), on the work “Evolutionary Cellular Automata Based-Approach for Edge
Detection”.
Also, she has contributed by an article at WILF 2007 about the segmentation based Cellular automata. Ms Slatnia, is an
assistant professor at the University of Biskra.
Dr. Okba Kazar was born at Biskra (Algeria) in 1962. He obtain his master degree in 1997 from the Constantine University
(Algeria) working on artificial intelligence field. He obtained his PhD degree from the same university in 2005. He is member
of editorial board of the SJI Journal. He is an author of some publication in international journals and session chair in
international conferences. He is interested to the multi-agents systems and their applications, advanced information systems,
Web services, semantic Web. Dr. Okba KAZAR actually is an associate professor at computer science department of Biskra
University.
37