We propose a new algorithm based on cellular automation (CA) for preserving
The cellular automata (CA) can be considered as an alternative way of computation based on local data flow principles. The concept of CA was first proposed by Neumann in 1950s through self-reproducing systems [
A CA can be informally represented as a set of regularly and locally connected identical elements. The elements can be in a finite set of states. The CA evolves in discrete time steps, changing the states of elements according to a local rule, which is the same for all elements. The new state of each element depends on its previous state and on the state of its neighbourhood. The neighbourhood is composed of all directly connected elements. The characteristic properties of CAs are therefore locality, discreetness, and synchrony.
Identification of isolated regions in binary images is important problems in image processing, machine vision, porous materials analysis, and many other fields of science. The shrinking of binary picture patterns, which is a step towards the recognition of image objects, has been first investigated, using CAs, by Neumann [
In this paper we propose a new algorithm for thinning of an arbitrary binary rectangular grid. The algorithm preserves 2 or more levels of connectivity of all components on the grid. Hence, the number of isolated parts is preserved. Also, the thinning is maximal in sense of
The rest of the paper is organized as follows. In Section
We consider a cellular automation (CA) as a 2-dimensional lattice network of square cells (grid). Each cell can exist in two different sates, 0 or 1. Usually, state 0 is commonly called “white” and state 1 is commonly called “black.”
Cells of the lattice network change their states in discrete moments in time, time steps. Cell’s next state is defined by
Moore neighbourhood and its enumeration.
Configuration
Two cells
Similary, black (white) cells
For the moment, suppose that we have just one component
(a) A configuration
Local states which define local transition function for CA
Let
We solve the problem of thinning an initial configuration to a configuration with the same number of holes.
Define a CA
Applying the local transition function to all cells of an configuration simultaneously, we get the sequence of configurations
Let A finite number of time steps For each There is Let the configuration
Notice, those white cells remain always white (
Let
Let
If
Suppose that
So, we suppose that all cells have no more than 2 adjacent white cells. Traversing boundary cells in negative direction (component is always on the left side), we create a closed path
Supose that we observe a time step
We consider two cases: cells some of cells
In case 1, cells
In case 2, there exists a closed path
With this we proved Theorem
All neighbourhoods from Figure
Because of finiteness of components and deterministic rules, Theorem
Suppose that black cell cell cell
If we have case 1, then cell
Same consideration holds for case 2.
Now, we will prove that cell Cell
In case (a), cell Cell Cell
Hence, in every case we have two white cells in the neighbourhood of the cell
If these two neighbours are weakly connected in the configuration
If these two neighbours are not weakly connected in the configuration
(a) Component
Now, we consider the theoretical complexity of the algorithm by means of the required number of time steps. Let
The worst case complexity of the CA
Implementations of the algorithm are made in NetLogo 5.0.4 (agent-based programming language and integrated modelling environment). The CA model is represented by 2-dimensional grid of square cells and each cell can exist in two different sates, white or black. Any cell is coloured black with probability
In Figure
Examples of grids with resolution 201 × 201. Left is original and right is after CA
Probability for black cell is 0.55
Probability for black cell is 0.60
Probability for black cell is 0.65
We proposed a new CA algorithm for thinning with property of preserving
The authors declare that there is no conflict of interests regarding the publication of this paper.