Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
46 views4 pages

2d CA Image Processing

The document discusses two-dimensional cellular automata (2DCA) and their applications to image processing. It presents the theoretical framework of 2DCA with uniform periodic and adiabatic boundary conditions. Various linear rules are applied to sample images to generate self-replicating patterns over multiple iterations. Examples and figures are provided to demonstrate how 2DCA can be used for applications such as textile design and genetics research.

Uploaded by

vit1234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views4 pages

2d CA Image Processing

The document discusses two-dimensional cellular automata (2DCA) and their applications to image processing. It presents the theoretical framework of 2DCA with uniform periodic and adiabatic boundary conditions. Various linear rules are applied to sample images to generate self-replicating patterns over multiple iterations. Examples and figures are provided to demonstrate how 2DCA can be used for applications such as textile design and genetics research.

Uploaded by

vit1234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Vol. 125 (2014) ACTA PHYSICA POLONICA A No.

Proceedings of the 3rd International Congress APMAS2013, April 2428, 2013, Antalya, Turkey

2D Cellular Automata with an Image Processing Application


a b c d
S. Uguz , U. Sahin , I. Siap and H. Akin
a
Department of Mathematics, Arts and Science Faculty, Harran University, Sanliurfa, 63120, Turkey
b
Multi Agent Biorobotic Laboratory, Rochester Institute of Technology, Rochester, NY, USA
c
Department of Mathematics, Yildiz Technical University, 34210, Istanbul, Turkey
d
Department of Mathematics, Education Faculty, Zirve University, 27260, Gaziantep, Turkey
This paper investigates the theoretical aspects of two-dimensional linear cellular automata with image appli-
cations. We consider geometrical and visual aspects of patterns generated by cellular automata evolution. The
present work focuses on the theory of two-dimensional linear cellular automata with respect to uniform periodic
and adiabatic boundary cellular automata conditions. Multiple copies of any arbitrary image corresponding to
cellular automata nd so many applications in real life situation e.g. textile design, DNA genetics research, etc.
DOI: 10.12693/APhysPolA.125.435
PACS: 02.10.Yn, 07.05.Kf, 02.10.Ox
1. Introduction

Cellular automata (CAs for brevity) introduced by


Ulam and von Neumann [1] in the early 1950's, have been
systematically studied by Hedlund from purely mathe-
matical point of view. One-dimensional CA has been
investigated to a large extent. However, little inter-
Fig. 1. An application of rule 8 with null (NB), peri-
est has been given to two-dimensional cellular automata
odic (PB) and adiabatic (AB) boundary, respectively,
(2DCA). Von Neumann [1] showed that a cellular au- after 32 iterations of the rst image.
tomaton can be universal. Due to its complexity, von
Neumann rules were never implemented on a computer.
In the beginning of the eighties, Wolfram [2] has stud-
ied in much detail a family of simple one-dimensional
(1D) CA rules and showed that even these simplest rules
are capable of emulating complex behavior. Some basic
and precise mathematical models using matrix algebra
over the binary eld which characterize the behavior of
2D nearest neighborhood linear CA with null and peri-
odic boundary conditions have been seen in the literature Fig. 2. An application of rule 65 after 32 iterations of
[3, 4]. CA has received remarkable attention in the last the rst image.
few decades [46]. Due to its structure CA has given the
opportunity to model and understand many behaviors in
nature easier. Most of the work for CA is done for one-
-dimensional case. The set of papers [4, 7] deals with the
behavior of the uniform 2D CA over binary elds.
In this paper, we study the theory of 2-dimensional
uniform periodic and adiabatic boundary CA (2D PCA,
ACA) of the all linear rules (e.g. von Neumann, Moore
neighborhood and the others) and applications of image
processing for self replicating patterns (see Figs. 18). Fig. 3. An application of rule 82 after 32 iterations of
the rst image.
We present some illustrative examples and gures to ex-
plain the method in detail. Using the rule matrices ob-
tained in this work, the present paper contributes fur-
ther to the algebraic structure of these CA and relates
its applications studied by dierent authors previously
(i.e. [2, 8]). The linear combination of the neighboring
cells on which each cell value is dependent is called the
rule number of the 2D CA over the eld Z2 .
Regarding the neighborhood of the extreme cells, there
exist four dierent approaches: Fig. 4. Application of rule 112 after 32 iterations of
the rst image.

(435)
436 S. Uguz et al.

 
0 0 0 0 ... 0 0
1 0 0 0 ... 0 0
 

 
0 1 0 0 ... 0 0 
 
T2 =  0 0 1 0 ... 0 0 .
 
 . .. .. .. .. .. ..
 ..

. . . . . .
Fig. 5. An application of rule 189 after 16 iterations of

 
the rst image. 0 0 ... 0 1 0 0
 

0 0 ... 0 0 1 0

Lemma 1 [3]. The representation of the next state


of all primary rules (1, 2, 4, 8, 16, 32, 64, 128, and 256)
under the null boundary condition can be given by using
the auxiliary matrices T1 and T2 dened above in the
following way:
Fig. 6. Application of rule 201 after 16 iterations of Rule 1N : [Xt+1 ] = [Xt ],
the rst image.
Rule 2N : [Xt+1 ] = [Xt ][T2 ],
Rule 4N : [Xt+1 ] = [T1 ][Xt ][T2 ],
Rule 8N : [Xt+1 ] = [T1 ][Xt ],
Rule 16N : [Xt+1 ] = [T1 ][Xt ][T1 ],
Rule 32N : [Xt+1 ] = [Xt ][T1 ],
Rule 64N : [Xt+1 ] = [T2 ][Xt ][T1 ],
Fig. 7. Application of rule 261 after 32 iterations of
the rst image. Rule 128N : [Xt+1 ] = [T2 ][Xt ],
Rule 256N : [Xt+1 ] = [T2 ][Xt ][T2 ].

2.1. Rule matrices under periodic boundary


The matrices T1p and T2p are as follows:
 
0 1 0 0 ... 0 0
Fig. 8. Application of rule 345 after 16 iterations of  0 0 1 0 ... 0 0 
 
the rst image.  
 0 0 0 1 ... 0 0 
• A null boundary (NB) CA is the one whose extreme
 
T1p =  0 0 0 0 . . . 0 0  ,
 
cells are connected to 0-state.  . . . . . . .
 .. .. .. .. . . .. .. 

 
• A periodic boundary (PB) CA is the one whose  0 0 ... 0 0 0 1 
 
extreme cells are adjacent to each other. 1 0 ... 0 0 0 0
• An adiabatic boundary (AB) CA is duplicating the  
0 0 0 0 ... 0 1
value of the cell in an extra virtual neighbor.
 1 0 0 0 ... 0 0 
 
 
 0 1 0 0 ... 0 0 
 
2. Rule matrices with primary rules T2p =  0 0 1 0 . . . 0 0  .
 
 . . . . . . .
 .. .. .. .. . . .. .. 

The auxiliary matrices T1 and T2 are as follows:  
 0 0 ... 0 1 0 0 
   
0 1 0 0 ... 0 0
0 0 ... 0 0 1 0
 0 0 1 0 ... 0 0 
 
  Theorem 2. (Periodic case) The matrix for any pe-
 0 0 0 1 ... 0 0 
  riodic boundary CA rule (PB) can be represented as
T1 =  0 0 0 0 . . . 0 0  ,
 
 . . . . .
 .. .. .. .. . . ... ... 

 
0 0 . . . 0 0 0 1
 
 
0 0 ... 0 0 0 0
2D Cellular Automata with an Image Processing Application 437

(TP B )mn×mn = (TAB )mn×mn =


   
Ap B p O O ... ... O Dp Aa B a O O ... ... O O
 C p Ap B p O ... ... O O  Ca Aa Ba O ... ... O O
   
 
   
 O Cp Ap Bp O ... O O   O Ca Aa Ba O ... O O 
 .. .. .. .. .. .. .. ..  .. .. .. .. .. .. .. ..
   
 . . . . . . . . ,  . . . . . . . . ,
 
   
 O O ... O Cp Ap Bp O   O O ... O Ca Aa Ba O 
   
 O O ... ... O Cp Ap Bp  O O ... ... O Ca Aa Ba
   
 
Ep O . . . ... O O Cp Ap O O ... ... O O Ca Aa
where Ap , Bp , Cp , Dp , Ep are one of the following matri- where Aa , Ba , Ca are one of the following matrices of the
ces of the order of n × n : 0, I , T1p , T2p , I + T1p , I + T2p , order of n × n : 0, I T1a , T2a I + T1a , I + T2a , T1a + T2a
T1p + T2p and I + T1p + T2p . and I + T1a + T2a .
Lemma 3. The next state of all primary rules Lemma 5. The next state of all primary rules
(1, 2, 4, 8, 16, 32, 64, 128, 256) of 2D periodic cellular au- (1, 2, 4, 8, 16, 32, 64, 128, 256) of 2D adiabatic cellular au-
tomaton over Z2 can be represented as follows: tomaton with Z2 can be represented as follows:
Rule 1P : [Xt+1 ] = [Xt ], Rule 1AB: [Xt+1 ] = [Xt ],
Rule 2P : [Xt+1 ] = [Xt ][T2p ], Rule 2AB: [Xt+1 ] = [Xt ][T1a ]t ,
Rule 4P : [Xt+1 ] = [T1p ][Xt ][T2p ], Rule 4AB: [Xt+1 ] = [T1a ][Xt ][T1a ]t ,
Rule 8P : [Xt+1 ] = [T1p ][Xt ], Rule 8AB: [Xt+1 ] = [T1a ][Xt ],
Rule 16P : [Xt+1 ] = [T1p ][Xt ][T1p ], Rule 16AB: [Xt+1 ] = [T1a ][Xt ][T2a ]t ,
Rule 32P : [Xt+1 ] = [Xt ][T1p ], Rule 32AB: [Xt+1 ] = [Xt ][T2a ]t ,
Rule 64P : [Xt+1 ] = [T2p ][Xt ][T1p ], Rule 64AB: [Xt+1 ] = [T2a ][Xt ][T2a ]t ,
Rule 128P : [Xt+1 ] = [T2p ][Xt ], Rule 128AB: [Xt+1 ] = [T2a ][Xt ],
Rule 256P : [Xt+1 ] = [T2p ][Xt ][T2p ], Rule 256AB: [Xt+1 ] = [T2a ][Xt ][T1a ]t .

2.2. Rule matrices under adiabatic boundary 3. Application of image processing

The auxiliary matrices T1a and T2a are dened as fol- Self replicating pattern generation is one of the most
lows:   interesting topic and research area in nonlinear science.
0 1 0 0 ... 0 0 A motif is considered as a basic sub-pattern. Pattern
 0 0 1 0 ... 0 0 
  generation is the process of transforming copies of the

 0 0 0 1 ... 0 0 
 motif about the array (1D), plane (2D) or space (3D) in
  order to create the whole repeating pattern with no over-
T1a =  0 0 0 0 . . . 0 0  ,
 
 . . . . . laps and blank [1, 2]. These patterns have some mathe-
 .. .. .. .. . . ... ...  matical properties which make generating algorithm pos-

sible. A cellular automaton is a good candidate algorith-


 
 0 0 ... 0 0 0 1 
 
mic approach used for pattern generation.
0 0 ... 0 0 0 1
Creating algorithmic approach for generating self repli-
cating patterns of digital images (motif as in rst image)
 
1 0 0 0 ... 0 0
is important and sometimes dicult task. Meanwhile
 1 0 0 0 ... 0 0 
 
  many researchers face with many challenges in building
 0 1 0 0 ... 0 0 
  and developing tiling algorithms such as providing sim-
T2a =  0 0 1 0 . . . 0 0  .
  ple and applicable algorithm to describe high complex
 . . . . . . . patterns model. Growth from simple motif in 2D CAs
 .. .. .. .. . . .. .. 

  can produce self replicating patterns with complicated
 0 0 ... 0 1 0 0 
 
boundaries (null, periodic, adiabatic and reexive), char-
0 0 ... 0 0 1 0 acterized by a variety of growth dimensions. The ap-
proach given here leads to an accurate algorithm for gen-
Hence we get the following general rule matrix result for
erating dierent patterns.
the adiabatic case as a theorem.
In this paper we use the CAs with all the nearest neigh-
Theorem 4. (Adiabatic case) The rule matrix for any
borhoods to generate self replicate patterns of digital im-
adiabatic boundary CA rule (AB) can be represented as
ages. For applying 2D null, periodic and adiabatic CA
438 S. Uguz et al.

linear rules in image processing, we take a binary ma- Acknowledgments


trix of size (100 × 100) due to computational limitations.
We map each element of the matrix to a unique pixel on This work is supported by the Scientic and Techno-
the screen (writing new MATLAB codes) and we color logical Research Council of Turkey (TÜBTAK) (project
a pixel white for 0, black for 1 for the matrix elements. number: 110T713).
Then we take another image (as a motif) whose size is
less than (30 × 30) for which patterns are to be generated References
and put it in the center of the binary matrix. This is the
way how the image is drawn within an area of (100×100) [1] J. von Neumann, in: The Theory of Self-Reproducing
pixels. It is observed from the gures that the self repli- Automata, Ed. A.W. Burks, Univ. of Illinois Press,
cating patterns can be generated only when number of Urbana 1966.
repetition is 2n where n = 4. A neighborhood function [2] S. Wolfram, Rev. Mod. Phys. 55, 601 (1983).
that species which of the adjacent cells aects its state [3] P.P. Choudhury, B.K. Nayak, S. Sahoo, S.P. Rath,
also determines how many copies will be obtained from Theory and Applications of Two-Dimensional, Null-

the self-replicating process. In the two dimensional and Boundary, Nine-Neighborhood, Cellular Automata
Linear Rules , Tech. Report No. ASD/2005/4, 13
eight neighborhoods case, this should be at most eight
May 2005, arXiv/0804.2346.
copies of the original image itself. This situation brings
[4] K. Dihidar, P.P. Choudhury, Inf. Sci. 165, 91
also some limitation over the matrix size of the images
(2004).
to be replicated. The matrix size of the original images
[5] H. Akn, Appl. Math. Comput. 170, 339 (2005).
should lower 30 percent of the display matrix in all di-
rections. If the rst image exceeds 30 percentage of the [6] H. Akn, I. Siap, Inf. Proc. Lett. 103, 24 (2007).
length of row or column of the display matrix self repli- [7] P. Chattopadhyay, P.P. Choudhury, K. Dihidar,
Comput. Math. Appl. 38, 207 (1999).
cation pattern when the iteration number t reaches to 16
does not occur. Also behaviors for dierent boundaries [8] P.P. Choudhury, S. Sahoo, S.S. Hassan, S. Basu,
produce dierent shapes when t = 16. Hence we have D. Ghosh, D. Kar, Ab. Ghosh, Av. Ghosh,
A.K. Ghosh, Int. J. Comp. Cogn. 8, 50 (2010).
a classication device and tables up to self replicating
pattern number and for the case seed image less than 30 [9] H. Akn, I. Siap, S. Uguz, AIP Conf. Proc. 1309,
16 (2010).
percentage of the display matrix (see Figs. 18), these
will be presented in the next studies. [10] H.H. Chou, J.A. Reggia, Physica D 110, 252 (1997).
[11] J. Gravner, G. Gliner, M. Pelfrey, Physica D 240,
1460 (2011).
4. Conclusion
[12] I. Siap, H. Akn, S. Uguz, Comput. Math. Appl. 62,
4161 (2011).
In this paper we discuss the theory 2-dimensional, uni-
form periodic and adiabatic boundary CAs of linear rules [13] I. Siap, H. Akn, F. Sah, J. Frank. Inst. 348, 1258
(2011).
and applications of image processing. It is seen that CAs
theory can be applied successfully in self replicating pat- [14] I. Siap, H. Akn, F. Sah, Inf. Sci. 180, 3562 (2010).
terns of image processing. The some characterization and [15] S. Uguz, H. Akn, I. Siap, Int. J. Bifur. Chaos 23,
applications on a 2D nite CA by using matrix algebra 1350101 (2013).
built on Z3 are planned to next studies. However after [16] S. Uguz, H. Akn, I. Siap, Int. J. Bifur. Chaos 24,
making use of the matrix representation of 2D CA, it (2014), to be published.
will be provided an algorithm to obtain the number of
Garden of Eden congurations for the 2D CA dened by
some rules. Some other interesting results and further
connections on this direction wait to be explored in 2D
CA's, see Refs. [916].

You might also like