Training of cellular automata for image processing
1. Training of Cellular Automata
for image Processing
Presentated by-
Swati Chauhan
8/27/2018 1K.I.E.T, Ghaziabad
2. Contents
Introduction
Components of Cellular Automata
Applications of C.A
Applications of C.A in Image Processing
Training of Cellular Automata for image processing
Literature Review
Noise Filtering
Filter the salt and pepper ,Gaussian noise using cellular automata
Train the CA for image thinning and thickening
Conclusion
Future work
8/27/2018 2K.I.E.T, Ghaziabad
3. Concept Behind Cellular Automata
Invented by John von Neumann and
Stanislaw Ulam at Los Alamos
National Lab (early 1950s) [1]
Based on work by Alan Turing
Most basic research on CA in the
1950s and 60s
Three major events in CA research
[1,2,3]
• John von Neumann’s self-
reproducing automaton
• John Conway’s Game of Life
• Stephen Wolfram’s classification
of cellular automata
8/27/2018 3K.I.E.T, Ghaziabad
4. Introduction
Cellular Automata are "Systems of Finite Automata," i.e.
Deterministic Finite Automata (DFAs) arranged in a lattice structure.
The input to each DFA is the collective state of itself and some group
of nearby cells considered its neighborhood. [4]
A cellular automaton consists of an n-dimensional grid/array of cells.
Each of these cells can be in one of a finite number of possible states,
updated in parallel according to a state transition function.[5]
8/27/2018 4K.I.E.T, Ghaziabad
5. Components of Cellular Automata
1) Cell
2) State
3) Lattice
4) Discrete Time Development
5) Neighborhood
6) Transition Rule
8/27/2018 5K.I.E.T, Ghaziabad
6. 1) Cell
A cell is a kind of memory element and stores a state.
2) State
Number of states should be finite, otherwise we
can not define rules about states.
AS Glider sequence
cell
State 1, 2,3, 4 and so on
Contt…..
6K.I.E.T, Ghaziabad
7. 3)Lattice
A lattice is an array in which all the cells are arranged.
Types of Lattice:-
1.One dimensional lattice. Cell
2.Two dimensional lattice.
x
y
3.Three dimensional lattice.
Contt…
8/27/2018 7K.I.E.T, Ghaziabad
8. 3)Discrete Time Development
States of all the Cells are updated in discrete time steps.
CAs are often described as discrete dynamical systems with
the capability to model various kinds of natural discrete or
continuous dynamical systems.[2]
t=1 t=2
Contt…..
8/27/2018 8K.I.E.T, Ghaziabad
9. 4)Neighborhood
The neighborhood of a cell consists of the surrounding cells.
There can be many different definitions-
Von Neumann Neighborhood
Five cells, consisting of the
cell and its four immediate
non-diagonal neighbors.
Moore Neighborhood
Nine cells, consisting of the
cell and its immediate
diagonal neighbors.
Contt…..
8/27/2018 9K.I.E.T, Ghaziabad
10. 5)Transition Rule
Cellular Automata is C= (l, F, S, f, i0) .
A configuration of time t,
Ct: l →S is a function that associates a state with each cell of the
lattice.
New configuration Ct+1 according to time stamp
Where F(a) denotes the set of neighbors of cell a, ∀a∈ l and i0∈S
Ct+1 (a)=f({Ct(i) | i ∈F(a)}) (1)
In image processing cellular automata with color image is considered as
A = (S, N, δ ) with set of states S = {#, 0, 1, ……….. k-1}.
A pixel’s color state in {0,1…… ,k -1} [7]
N = Set of neighborhood, δ= is based on a comparison
criteria of the central cell
Contt…..
8/27/2018 K.I.E.T, Ghaziabad
11. Applications of C.A
1) Artificial Life.
2)Simulation of marine life study .
3)Simulation of forest fire propagation.
4) Cellular automata in the traffic flow
control system.
5)Conception of implementing parallel
computers.
8/27/2018 11K.I.E.T, Ghaziabad
12. Applications of C.A (contt……)
6) Cellular automata in machine
learning and control .
7) Simulation of space study .
8) Cellular automata used
in biological systems
9) Generating Multimedia Contents
10)Cryptography and
Random Number Generation
8/27/2018 12K.I.E.T, Ghaziabad
13. Applications of C.A in Image Processing
1)Image Enhancement
2)CA in Border Detection
in Digital Images
3)Connected Set Morphology
4)Image Segmentation
5)Text Extraction
6)Image Filtering
8/27/2018 13
K.I.E.T, Ghaziabad
14. How Cellular Automata works with respect to its rules
1)With One Dimension:
6 cell uniform cellular automaton with a cell
neighbourhood of 2(N1,N2).
The cellular automaton uses the set {0,1} for its two states.
Fig1:- An example of a cellular automata & neighbourhood
in C.A.[8]
N1 N2
8/27/2018 14
K.I.E.T, Ghaziabad
15. Continue………..
Then there are possible 16 Rules.
Size of the rule/search space
Rulesize = 22^n
where n is the size of the cell neighbourhood:[8]
2)With Two Dimension:
The no. of rules in 2D cellular automata is obtained by
Rulesize = 22^n
Where n is the size of the cell neighbourhood:[8]
For the cell of 8 N , Rulesize= 22^8
8/27/2018 15K.I.E.T, Ghaziabad
16. Cellular Automata-Simple 1D
example
The rules
cell# 1 2 3 4 5 6 7 8 9 10 11 12 13
time = 1
time = 2
time = 3
time = 4
time = 5
time = 6
8/27/2018 16K.I.E.T, Ghaziabad
17. Training of Cellular Automata in image
processing
Training basically used to acquire knowledge, skill to
improve capability, capacity and performance of a cellular
automata in image processing like—
» Noise filtering
» Thinning
» Convex Hull
» Template Matching
» Image Sharpening
» Simple Object Recognition
using rule sets which provide changes their states at each
step of time.
17K.I.E.T, Ghaziabad
18. Literature Review
Aim- To choose the best rules set for acquiring
desired result in image processing operations.
There are several methods which fulfil this aim such as
Branch and bound algorithms, standard genetic
algorithm(GA), GAs with co-evolution ,SFFS (sequential
floating forward search), Cellular Automata Based
Evolutionary Computation (CABEC), EvCA, TUTS etc.
Training of cellular
automata
SFFS
Branch and
Bound
CABEC
EvCA’s evolutionary
Process
Texture unit texture
spectrum (TUTS)
method
GA
8/27/2018
19. Aim- To choose the best rules set for acquiring desired
result.
Noise Filtering (SSM)
Noise in images
Noise Filtering
Noise Filtering using Cellular Automata
Here Noise
filtering in images based on thresholding standard images.
Here we are trying to find best rules for filtering the images
among 51 rules proposed by Paul L. Rosin [9].
Objective function- PSNR
8/27/2018 19K.I.E.T, Ghaziabad
20. Filter the salt and pepper noise using
cellular automata
Salt and pepper noise
Procedure
Following experiments are performed
by using MATLAB R2009a .
We are comparing filtered image to target image by
PSNR value. We are considering 51 rules which are
providing filtered images at different iteration
according to noise density in images.[9]
8/27/2018 20K.I.E.T, Ghaziabad
21. Rules Set
8/27/2018 K.I.E.T, Ghaziabad 21
Rule no. 1 when central cell is white
Rule no. 51 when central cell is black
22. Procedure: image filtering
Input: image A
Output: image B
Begin
Step 1: initialization
m 0
B A
Set Required rules set ( D = 51) active
Repeat
m m+1
C B
for every cell of C and k=1 to 51 begin
Step 2: Perform matching pattern
for i= 2 to m-1 (size of image)
for j= 2 to n-1 (size of image)
Extract 3x3 neighbourhood (8 pixel values) and make 8 bit string
by concatenation ( from C )
8/27/2018
22K.I.E.T, Ghaziabad
23. Procedure: image filtering (Contt……)
If C[ i ] [ j ]== 1 and cat (C[3x3])==Dk (for central white pixel)
Then C[ i ] [ j ]=0
Else if C[ i ] [ j ]== 0 and cat (C[3x3])==Dk (for central black pixel)
Then C[ i ] [ j ]=1
Step 3: Take the PSNR values of previous image and filtered image
E( k ) max ( PSNR)
Maxindex k
Then filter the image with maxindex (best rule among 51 at which
PSNR produce maximum value)
Step 4: Repeat step 2 and step 3 until
Difference between oldPSNR and newPSNR < 0.0001
Step 5: B [ i ] [ j ] C[ i ] [ j ]
Step 6: end
8/27/2018 23K.I.E.T, Ghaziabad
24. EXPERIMENTAL RESULTS
Fig 2:-Input Images of size 256x356 gray a(cameraman),
b(rice) and their binary images c and d.
(a) (b)
(c) (d)
Fig 3:- Salt and pepper noise affected images with probability (0.01)
(c) noisy Cameraman (d) Noisy Rice
8/27/2018 24K.I.E.T, Ghaziabad
25. (a-cameraman) (b-rice)
Fig 4:- To obtain the best rules set we are applying the 51 rules on images iteratively
with PSNR values until difference among values is less than 0.0001 that
comes in 3-4 iteration , shown in graphical representation.
(a) filtered cameraman (b) filtered rice
Fig5:- Filter images after obtaining the best rules set 1, 31, 32(in cameraman
image) and rules set 1,2 and 3 (in- rice image).
8/27/2018 25K.I.E.T, Ghaziabad
26. Fig 7:- The graphical representation of PSNR difference of 3 images at noise
density 0.01, where
Dashed line - - - - Median filter PSNR values at different images
Solid line Cellular automata rules PSNR values at corresponding
images.
(a) Cameraman (b) rice
Fig6:- Filter images with median filter at 0.01 noise density.
8/27/2018 26K.I.E.T, Ghaziabad
27. Fig 6:-Salt and pepper noise affected images with probability
(0.1)
Input Images of size 256x356 taken from fig 2.
(a)Cameraman (b)Rice
Fig7:-Salt and pepper noise affected images with probability (0.1)
Fig 8:- Applying the 51 rules on images iteratively with PSNR values until difference among
values is less than 0.0001that comes in 3-4 iteration , graph:- a and b representing PSNR
values on different rules .
(a) cameraman (b) rice
27K.I.E.T, Ghaziabad
28. (a -filtered Cameraman) (b-filtered Rice)
(c-filtered Cameraman) (d-filtered Rice)
Fig6:- Filtered images with cellular automata in (a) and (b) in compare to median
filter in images (c) and (d) at 0.1 noise density.
Fig 7:- The graphical representation of PSNR difference of 3 images at noise density 0.1.
28K.I.E.T, Ghaziabad
29. Applying the learned rule set
Original
Image
Salt and pepper
noise affected
image(PDF=0.1)
30. Applying the learned rule set (Contt….)
Images after
applying learned
rules set.
Images obtained
by median filter
K.I.E.T, Ghaziabad
31. Filter the Gaussian noise using cellular
automata
Fig 11:- Input Images of size 256x356 gray a (Hand), b (2Hand) ,c ( Pslv) and their binary
images d , e and f.
(a- Hand) (b-2Hand) (c- Pslv)
(d- Hand) (e-2Hand) (f- Pslv)
8/27/2018 31K.I.E.T, Ghaziabad
32. (a- Hand) (b-2Hand) (c- Pslv)
Fig 12:-Gaussian affected images with probability (0.01) in images a,
b,c and filtered with CA in images d, e and f in compare to median
filter in images g ,h and i.
(d- Hand) (e -2Hand) (f- Pslv)
(g- Hand) (h -2Hand) ( i- Pslv)
33. Train the CA in thinning and thickening
operations with binary images.
Thinning and Thickening of binary images
Same procedure is used in both morphological
Operations where rules set works as structuring
elements.
Thinning
Thickening
8/27/2018 33K.I.E.T, Ghaziabad
34. Train the CA in thinning and thickening
operations with binary images.
PROCEDURE
Procedure: CA thinning
Input: image A
Output: Thinned image B
Begin
Step 1: initialization
m 0
B A
Set Encoded 51 rules
Step 2: m m+1
C B
for every cell C[i][j] and Rule number = m in Set
8/27/2018 34K.I.E.T, Ghaziabad
35. begin
make 8 bit string S from 3x3 neighbours of C[i][j] and Set[m]which
are S1 and S2 respectively.
Step 3:
If C[i][j] = white and S1 NOT matched with S2
Then invert C[i][j]
Step 4: thin the images by standard function bwmorph(),
E bwmorph( B)
Step 5: Compute matchedcount as
Number of matching pixels in B and E
Size of B
Repeat from step 2 to 5 for all 51 rules.
Step 6: Select the rule with maximum matchedcount and
thinned image C.
Step 7: B C
Step 8 : end
8/27/2018 35K.I.E.T, Ghaziabad
MatchedCount =
37. (g) Rice (h) Cameraman (i) Hand
Fig7:- Graphs showing the rules corresponding to MatchedCount values in (a),
(b) and (c), input images thinned by CA in (d),(e) and (f) and in compare to
thinned by standard function bwmorph() in figure (g),(h) and (i).
Images CPU Time Maximum
Matching Pixels
value
Rule with
maximum
matched count
Cameraman 1.361218e+003 0.9792 51
Rice 1.452681e+003 0.9665 51
Hand 1.442251e+004 0.9938 51
Table 1:- Representing the rules of cellular automata at which maximum
MatchedCount is occurred in corresponding to standard function to thin the
images in training procedure.
38. Training of cellular Automata in Thickening of
images
EXPERIMENTAL RESULTS
(a) Cameraman (b) Hand (c) Circle
Fig 6: Input images (a) Cameraman , (b) Hand and (c) Circle.
(a) Cameraman (b) Hand (c) Circle
8/27/2018 38K.I.E.T, Ghaziabad
39. (a) Cameraman (b) Hand (c) Circle
(a) Cameraman (b) Hand (c) Circle
Fig7:- Graphs showing the rules corresponding to MatchedCount values in (a),(b) and (c),
input images thicken by CA in (d),(e) and (f) and in compare to thicken by standard
function bwmorph() in figure (g),(h) and (i).
8/27/2018 39K.I.E.T, Ghaziabad
40. Table 2:- Representing the rules of cellular automata at which
maximum MatchedCount is occurred in corresponding to
standard function to thick the images in training procedure.
Images CPU Time Maximum
Matched count
value
Rule with
maximum
matched
count
Cameraman 1.238445e+003 0.8932 51
Hand 3.274617e+002 0.9935 51
Circles 1.511689e+004 0.9763 51
It has been analyzed that the aim to train the cellular
automata is providing simplicity to solve the complex
processes which has been fulfilled in our experiments.
8/27/2018
40K.I.E.T, Ghaziabad
41. Conclusion
Training of cellular automata provided a learning strategy
for best rule selection in image-understanding processing,
which can be used to implement various image-
understanding applications in the fields of medical imaging,
intelligent transportation systems, robotics, multimedia,
human interface, entertainment, image coding, and so forth.
It is found that the results for the image processing
application filtering, thinning and thickening of binary
images through cellular automata rules are hopeful. The
resulting rule sets provides comparable better result in case
of low noise density with minimum rules set as well as in
thinning and thickening as compared to the standard
function bwmorph().
42. Future work
We will perform the cellular automata rules
with respect to morphological operations such
as-
Finding the convex hull of images in image
processing environment.
Compare the results with standard methods
8/27/2018 42K.I.E.T, Ghaziabad
43. Publication
“Survey Paper on Training of Cellular Automata for Image Processing” International
Journal of Engineering and Computer Science ISSN: 2319-7242 Volume 2 Issue 4 April,
2013 Page No. 980 -985.
“Survey Paper on traffic flow control using Cellular Automata”, International Journal
of IT, Engineering and Applied Sciences Research (IJIEASR) ISSN: 2319-4413 Volume
2, No. 6, June 2013.
“Training of Cellular Automata for Image Filtering” CSA 2013, LNCS pp. 86-95, 2013.
Communication and Information Science 2013, The Second International Conference
on Advances in Computer Science and Application – organized by ACEEE, Springer
and available in Springer Link Digital Library.
“Training of Cellular Automata for Image Thinning and Thickening” 4th International
Conference in association with EMC Corporation (IEEE Corporation) presented
Confluence 2013 at Amity School of Engineering and Technology, Noida.
8/27/2018 K.I.E.T, Ghaziabad 43
44. References
[1] Ulam,S. Some ideas and prospects in bio mathematics. Anm. Rev.Biophys.Bioengin. 1
:27729 1, 1963
[2] Von Neumann. J. Theory of Self-Reproducing Automata. University of Illinois Press, IL,
1966
[3] S. Wolfram. A New Kind of Science. Wolfram Media, Inc, 2002.
[4] M. Sipper .The evolution of parallel cellular machines toward evolware.BioSystems, vol. 42,
pp. 29–43, 1997.
[5] Computation, Dynamics and the Phase Transition, by J.Avnet, Santa Fe Institute. 2000.
[6] A. Albicki and M. Khare. Cellular Automata used for Test Pattern Generation. In Proc. ICCD,
pages 56-59, 1987.
[7] A. Albicki, S. K. Yap, M. Khare, and S. Pamper. Prospects on Cellular Automata Application
to Test Generation. Technical Report EL-88-05, Dept. of Electrical Engg., Univ. of
Rochester, 1988.
[8]Computation, Dynamics and the Phase Transition, by J.Avnet, Santa Fe Institute. 2000.
[9] Paul L. Rosin “Training Cellular Automata for Image Processing” IEEE transactions on
image processing, vol. 15, no. 7, july 2006
8/27/2018 44K.I.E.T, Ghaziabad