IMAGE SEGMENTATION USING AN EMERGENT COMPLEX SYSTEM: CELLULAR AUTOMATA
Djemame Safia Computer Science Department Ferhat Abbes University Sétif, Algeria
[email protected] ABSTRACT Cellular automata are simple models of computation which exhibit fascinatingly complex behavior. They have captured the attention of several generations of researchers, leading to an extensive body of work. The emphasis is mainly on topics closer to computer science and mathematics rather than physics, biology or other applications. Many related works were interested in cellular automata capacities in image processing, but all of them were confronted with the problem of increase of rules number towards the number of cells states. In this paper, we propose an original solution to avoid this problem, the objective is a segmentation by edge detection, applied to binary images, grey level images and real images. Comparisons are made with standard edge detector (Canny) and algorithms based on cellular automata. Obtained results are encouraging.
1. INTRODUCTION Segmentation methods can be divided into 3 groups according to the dominant features they employ: first is global knowledge about an image or its part, the knowledge is usually represented by a histogram of image features. Edge-based segmentation forms the second group, and region-based segmentation the third. Many characteristics may be used in edge detection or region growing, like brightness, texture, velocity field…. Until now, there is no universal method for image segmentation. Any technique is effective only for a given image type, for a given application type, and in a given context. Because of these constraints, the diverse segmentation strategies which were proposed asserted their incapacities and their limitations, thus it is necessary to investigate new horizons and to find new more flexible and more effective methods. In this paper we use one of the most powerful paradigms of complexity: cellular automata (CA). A CA is a grid of cells, easily comparable to a grid of pixels, what makes the domain of image processing suitable to research with cellular automata, seen that the image is a coarse representation of CA. Their local nature and the intrinsic parallelism bound to their implementation make them a natural tool for image processing. In this paper, we investigate the possibilities of cellular automata as
Batouche Mohamed Chawki Software Engineering Department CCIS, King Saud University Riyadh, Saudi Arabia
[email protected] an efficient tool in edge detection for images of varied types. The method we propose has the advantage of avoiding the big problem encountered with CA, which is the bottleneck caused by the augmentation of rules set, when the number of cells states increase. The present paper is structured as follows: in section 2, we introduce some general ideas on the tool which we use: the cellular automaton. In section 3, we draw up a state of the art on previous works in image processing using cellular automata. In section 4, we expose the proposed method based on cellular automata. The results obtained and comparisons with other methods will be discussed in section 5. Conclusion and future perspectives are presented in section 6. 2.
CELLULAR AUTOMATA
2.1 General Definition A cellular automaton is a regular grid of cells. Each cell has a state chosen among a finished set of states and which can evolve in time. The state of a cell at time t+1 depends on the state at time t of a limited number of cells called its neighborhood. In every unit of time, the same rules are simultaneously applied to all the cells of the grid, producing a new generation of cells depending completely on the previous generation. The cellular automaton is characterized by [1]: - Dimensions of the grid. Example: 1D, 2D, 3D … - Number of states or colors. Example: switched on or off, 256 grey levels… -Neighborhood considered by a cell. Examples: Von Neumann: 4 cells in 2D, Moore: 8 cells in 2D … -Rules defining the automaton and the progress of the generations. Example: Game of Life … The simplest non-coarse cellular automaton that we can conceive consists of a 1D grid of cells which can take only two states: 0 or 1. For every cell, neighborhood is constituted from itself and both cells which are neighboring to it. Each of the cells can take two states, there are 23=8 possible configurations of such a neighborhood. So that the cellular automaton works, it is necessary to define what has to be the state, in the following generation. For each of these
8
configurations, there are 2 =256 different manners to do that, there are thus 256 different cellular automata from this type [2]. Often we indicate automata of this family by an integer between 0 and 255 the binary representation of which is the continuation of states taken by the automaton on the successive motives 111, 110, 101, etc. 3.
STATE OF THE ART
Cellular automata appear as natural tools for image processing due to their interesting properties like local nature and simple parallel computation implementation. In this respect, there are a number of papers which discuss cellular automata for image processing. By the 1990’s, CAs could be applied to perform a range of computer vision tasks such as [3]: • calculating distances to features; • calculating properties of binary regions such as area, perimeter, and convexity; • performing image enhancement operations such as noise filtering and sharpening; • performing simple object recognition. We cite the work of Rosin [3] who used SFFS algorithm for training cellular automata to perform several image processing tasks like filtering, thinning, convex hulls, edge detection on black and white images. In [4], the authors used an evolutionary process to seek a specialized powerful rule of CA among a set of best rules for extracting edges in black-white images. A genetic algorithm was applied to search the best CA rules for edge detection. In [5], the authors used a symmetric non deterministic CA with dynamical rules for filtering and border detection on binary and grey-level images. [6] presented uniform cellular automata algorithms for elementary medical image processing, dealing with edge detection, noise filtering and white spot detection for mammogram image in breast cancer diagnosis. Obtained results are very encouraging. In [7], the authors present a new approach for image processing based on reverse emergence and quantum computing. The key idea is to use cellular automata as a complex system and quantum inspired algorithms as search strategy, it was applied for denoising binary images and gave promising results. 4.
states (if we consider 256 levels of grey). If we follow the same approach as the previous works, we will select rules in a space of 2568 = 18446744073709551616 rules, what is practically impossible! The cellular automata used in the previous works are "discrete", that means they use a limited number of discrete rules. In this work, we use another type of cellular automata called "continuous" where, instead of using a limited number of cells states, we use a continuous value (usually a real number in [0,1]), and instead of a limited number of rules, we use a continuous function which takes as parameters the values of the neighbor cells. In our case of study, the cell values are the grey levels of the pixels (0..255), each grey level is divided by 255, so the cell’s states are continuous real values contained in the interval [0..1]. The transition function is calculated with the values of the eight neighbors (Moore neighborhood) of the handled cell. The effect of the transition function f is to change the configuration Ct , into the new configuration Ct+1 according to : Ct+1 (r) = f({ Ct (i) / i N (r) } where N(r) denotes the set of neighbors of cell r . The processing steps are described below: 4.1 Smoothing The smoothing function is based on a continuous cellular automaton. The automaton considers a Moore neighborhood ( 8 neighbors), cells have a grey level of continuous values between 0 and 1. Two pixels are homogeneous if the difference of grey levels between them is lower than a predefined homogeneity threshold S ( 0 < S < 1). The smoothing function has the effect of eliminating parasite points. 4.2 Filtering The classic filtering methods allow to attribute for every pixel a value which has an understandable meaning for the latest steps of processing. In the solution proposed here, the edges points are not the pixels of the image but the points between pixels. In that case, the filtering calculates the values of points between pixels where every point is between four pixels of the image to be filtered. The following figure illustrates this method:
THE PROPOSED METHOD
Working with binary images means that all cells have two states (they represent black or white pixels). Each cell has eight connected neighbors: Moore neighborhood. So all combinations of neighbor values leads to 28 = 256 possible patterns of rules. The objective is to select a set of rules susceptible to create edges after some generations, and to reduce this number of rules at least. In the case of grey level images, the number of possible states of a cell becomes 256
Figure 1. Explication of the thresholding method
We can see that the value of a pixel of the filtered image (circle in red) is the variance between the values of the pixels which surround it (rectangles in blue). It is the value which grows if the valuable difference between four pixels increases. As the value of a pixel of filtered image is between 0 and 1, we can consider the value of a pixel of image filtered as the probability of existence of an edge point between four pixels of the image to be treated. The result of filtering an image of dimensions H and L is an image of dimensions H - 1 and L - 1. 4.3 Sweeping In the images resulting from filtering, it often happens that edges between objects are represented by thick bands of probability points, not by visible contrasted curves after thresholding. The sweeping process serves to thin these bands in curves of small thickness and to amplify their values (increase the probability to be a point of edge) to have a better visibility during the thresholding. The thinning of edges is realized by a similar effect to sweeping of dust. Here we try to sweep the small probabilities towards the pixels of higher probability, we pursue the sweeping until obtaining thin regions with sufficient probability for the visibility after thresholding.
algorithm based on CA [4], and with a standard edge detector: Canny [8]. The executions and computing time are made in the Matlab environment on a Pentium 4, CPU 4Ghz and 4 GB RAM. 5.1 Binary images: The following figure shows two binary synthetic images(image A and B) of definition 100x100, the reference image (b), and the results obtained after edge extraction by Ev-GA algorithm [4] (image c) and by our method (image d).
Image A. (a)
Image B. (a)
4.4 Thresholding The thresholding is the last operation in the process of edge detection, it is the process of eliminating the unsignificant probability of the filtered and swept image. The result of thresholding is a binary image where the value of a pixel is 1 if the pixel is a point of edge (probability higher than the threshold), and 0 otherwise.
(b)
(b)
(c)
(c)
(d)
(d)
Figure 3. (a) Original image (b) Ground truth (c) Ev-GA result (d) Our result It is clear that our solution gave better results, edges are continuous and closed, finer, by a thickness of one pixel. Table 1 shows the execution time obtained for the two images above: Table 1. Execution Image Edge detection parameters time (sec) GS Sp GB S A 6 0.1 4 0.3 0.0620 B 0 0 12 0.1 0.0780 Where: Gs is the number of generations for the smoothing step, Sp is the homogeneity threshold, GB is the number of generations for the sweeping step, S is the threshold.
Figure 2. Thresholding swept image 5.
EXPERIMENTAL RESULTS
To estimate effectively the performances of our algorithm, we tested it on synthetic binary images, grey level images, and real images. Results are compared with an
5.2 Grayscale image: The following figure illustrates a grey scale image 200x200, and edge detection result obtained by the standard detector of Canny and by our method.
Figure 4. Results of edge detection of a grey scale synthetic image with Canny and with our method We note that region 1 shows the absence of expected edges (resulting from the degradation of grey level in the original image) in the result obtained by the Canny method compared to our result and that the edges of our solution are thinner than those obtained by Canny.
Image A
Table 2. Edge detection parameters GS
Sp
GB
S
5
0.03
1
0.1
REFERENCES Execution time (sec) Our Canny method 0.1090 0.1100
Table 2 shows that our method gives an execution time rather close to the one given by the method of Canny. 5.3 Real images: The figure below shows the edge extraction of a real image (Lena) with our method:
Figure 5. Edge detection of Lena’s image Image Lena
6. CONCLUSION AND PERSPECTIVES In this paper, we presented a new method of image segmentation by edge extraction. We used a cellular automaton evolving with a continuous transition function. The proposed method gives a solution to the problem of choosing the good discrete rules, which is the main bottleneck when using CA. The algorithm was tested on binary, grey level images and real images, and compared with results of standard methods (Canny), and another method using CA. the proposed method leads to better performance. In a near future, this work will be completed by a quantitative study of results, by introducing objective measures (Root Mean Square Error…). Another topic to develop is the processing of color images. Due to the intrinsic parallelism of CA, we can propose the implementation of this algorithm on a parallel multiprocessor machine, to make it faster.
Table 3. Edge detection parameters GS Sp GB S 4 0.18 4 0.08
Execution time (sec) 2.0630
[1] Holland J. and Burks A. “Logical theory of adaptive systems,” in Essays in Cellular Automata. Urbana, IL: Univ. Illinois Press, 1970. [2] Wolfram S.,” Cellular Automata and Complexity Collected Papers”. Reading, MA: Addison-Wesley, 1994 [3] Rosin P. “Training Cellular Automata for Image Processing,” IEEE Transactions on Image Processing, Vol. 15, No. 7, pp. 2076-2087, 2006. [4] M.Batouche, S.Meshoul, A.Abbassene, On solving edge detection by emergence, International Conference on Industrial , Engineering and other Applications of Applied Intelligent Systems, vol. LNAI 4031, pp.800-808, 2006 [5] Popovici A. and Popovici D. “Cellular Automata in Image Processing” , Proceedings of the 15th International Symposium on the Mathematical Theory of Networks and Systems, 2002. [6] Wongthanavasu S., Tangvoraphonkchai V. “Cellular Automata-based Algorithm and its Application in Medical image processing”, vol III, pp.41-44, ICIP 2007. [7] M. Batouche, S. Meshoul and A. Al Hussaini, Image Processing using Quantum Computing and Reverse Emergence, In the International Journal of Nano and Bio-Materials (IJNBM), Special Issue on Nano and Biomaterials: the Building Blocks, Vol. 2, Nos 1/2/3/4/5, pp. 136-142, Inderscience Publishers, 2009. [8] Canny j.: “A Computationnal Approach to Edge Detection” IEEE transactions on PAMI, 8 (6), 1986. [9] Von Neumann J.,” Theory of Self-Reproducing Automata”. Urbana, IL:Univ. Illinois Press, 1966. [10] Ganguly N., Sikdar B., Deutsch A., Canright G., and Chaudhuri P., “A Survey on Cellular Automata,” Centre for High Performance Computing, Dresden University of Technology, Tech. Rep. 9, 2003.