2020 RISP International Workshop on Nonlinear Circuits,Communications and Signal Processing (NCSP 2020)
Honolulu, Hawaii, USA, February 28 - March 2, 2020

Edge Detection and Noise Removal in Cellular Neural Networks
Using Switching Two-Type Templates
Sosuke Nakano, Kodai Kitamura, Yoko Uwate and Yoshifumi Nishio
Department of Electrical and Electronic Engineering, Tokushima University
2-1 Minami-Josanjima, Tokushima 770–8506, Japan
E-mail: {nakano, kitamura, uwate, nishio}@ee.tokushima-u.ac.jp

Abstracttemplate. Each cell is influenced from its neighboring cells
and its value is updated by the template. The performance ofIn 1998, Cellular Neural Networks (CNN) were developed CNN depends on the template. Thus, various applications forby Chua and Yang. The main characteristics of the CNN are image processing and pattern recognition of CNN have been
the local connection and the parallel signal processing. The reported [3]- [6].
CNN consists of cells connected each other. The performance
In this study, we propose switching two-type templatesof the CNN depends on the parameters which is called the CNN. In our proposed method, Edge Detector template andtemplate. When the template has a good influence for pro- Proposed template similar to Small Object Remover templatecessing, the CNN can perform complex processing. In this are switched. We investigate this method in edge detection
study, we propose Switching Two-Type Templates CNN. In and noise removal. In CNN processing, Edge Detector temour proposed method, Edge Detector template and Proposed plate and Small Object Remover template have merit and detemplate with reference to Small Object Remover template merit. Processing with Edge Detector template can detectare switched according to the output values around a cell in edge lines but noise remains. On the other hand, processprocessing. Then edge detection and noise removal template ing with Small Object Remover template can remove noise
process from a certain number of calculation. We investigate but cannot detect edge lines. In order to confirm the effecthe performance of our proposed method by some simula- tiveness of our proposed method, we perform edge detection
tions.
and noise removal with our proposed method.
2. CELLULAR NEURAL NETWORKS1. INTRODUCTION
Recently, many information have been existed in our life.
Therefore, processing method is demanding the performanceof parallel signal and high speed processing of large amountof data. In general, digital circuits are used for information
processing. However, digital circuits cannot process many
information in real time. Therefore, in order to conduct parallel signal and flexible processing like human, Neural Networks were proposed. The Neural Networks was based on
the human’s nervous system. Then, Cellular Neural Networks (CNN) was introduced by L. O. Chua and L. Yang in1988 [1]. The idea of CNN was inspired from the architecture of the cellular automata and Neural Network. Differences between the conventional neural network and CNN are
local connectivity property and high speed parallel processing. Moreover, CNN resembles the structure of the retina.
CNN has been successfully used for various high-speed parallel signal processing applications such as image processing,pattern recognition and so on [2]. CNN is composed of thebasic analog circuit unit called cell. Each cell is connected
to its neighboring cells, according to the parameter called theIn this section, we explain the structure and processing flowof CNN. Basic unit circuit of CNN is called cell. The cell consists of linear capacitors, linear resistors, linear and nonlinear
controlled sources. The CNN contains an array in a reticular pattern of many cells. We show a two dimensional arraycomposed of M × N identical cells arranged in M rows andN columes. Figure 1 shows the circuit of cell. The array ofthe CNN is shown in Fig. 2.

Figure 1: The circuit of cell.
A cell is coupled with only adjacent cells. Adjacent cells
interact with one another. Cells which do not couple with563

In Eq (1), A is feedback template, B is feedforward template, T is threshold. These value determine performance ofCNN.

(a)3×3(b)5×5Figure 4: System of neighborhood.
Figure 2: The structure of CNN.

only adjacent cells have an indirect influence. The range
which some cells have influenced one cell is defined by neighborhood. We describe state equation of cell and output equation of cell below.
State Equation :dvx(ij)dt=−vx(ij) +i+r
Xj+r
X

When we process the image with CNN, we should determine the size of system of neighborhood. When this size isbig, the amount of information in system of neighborhood isincreasing. However, noise works easily. Figure 4 shows thesize of system of neighborhood, 3×3, and 5×5. Generally,
the size which is used for image processing is 3×3. In thisstudy, we use 3×3. Figure 5 shows block diagram of image
processing with CNN.

A(i,j;k,l) vy(kl) (t)k=i−r l=j−r
i+r
X+j+r
X

B(i,j;k,l) vu(kl) (t) + T. (1)k=i−r l=j−rOutput Equation :vy(ij) (t)=1(|vx(ij) (t) + 1| − |vx(ij) (t) − 1|). (2)2Figure 5: Block diagram.

vx , vy and vu are state value, output value and input value.
Output equation represents piece-wise nonlinear function isshows in Fig 3.

3. PROPOSED METHOD

Figure 3: Piece-wise nonlinear function.

Our proposed method is switching two-type templates
CNN. First, we calculate the state value of the all cells in theoutput image. Second, we calculate the output value of thecenter cell yij and the output value of the cells around it ykl .
Third, we calculate the difference value |yij − ykl | in 5 × 5neighborhood. Fourth, compare the difference value with thethreshold and increase the count. Then switch Edge Detector
template and proposed template according to the count. Last,
process yij using the chosen template. This process is conducted in all cells every number of calculation n. Switchingcondition depends on the difference value between the output value of the center cell and the output value of the cells
around it yij and ykl of each 5 × 5 neighborhood and is given
as follows:564

|yij − ykl | > a.

(3)b ≤ count < c.

(4)

Small Object Remover template :


1 1 1
A =  1 2 1 ,
1 1 1


0 0 0
B =  0 0 0  , I = 0.
0 0 0

(6)

Proposed template:
AB


1 1 1
=  1 2 1 ,
1 1 1


0 0 0
=  0 6 0  , I = 0.
0 0 0

(7)

Figure 6: Process of calculation.

We fix certain threshold a, b and c. Equation (3) isused to determine the color difference between yij and ykl .
Equation (4) is used to determine whether yij is noise, edge,or other. When the inequality of Eq. (3) is satisfied, thedifference value |yij − ykl | become more than a, we increase
the count by one. When the inequality of Eq. (4) is satisfied,the count become b or more and less than c, process yij
using Edge Detection template. Otherwise, process yij using
the proposed template. This switching process is conductedin all cells every certain number of calculation n. In thisstudy, the number of calculations is defined 50000 in thissimulation. Switching process with our proposed method isconducted in all cells every number of calculation 10 until
the number of calculation 25000. Then proposed template
processes until the number of calculation 50000.
4. SIMULATION RESULTS
In this section, we show simulation results of the edge detection and noise removal for using our proposed method andthe conventional CNN. The proposed template is modified toreduce the amount of noise removed than Small Object Remover template. Using Edge Detection template, Small Object Remover template and proposed template of the edge detection and noise removal is described as follows.
Edge Detection template :0 0 0
A =  0 1 0 ,0 0 0
−1 −1 −1B =  −1 8 −1  , I = −1.
−1 −1 −1

(5)

(a)

(b)

(c)

(d)

Figure 7: Simulation results 1. (a) Input image. (b) Simulation result ofusing Edge Detector template (c) Simulation result of using Small Object
Remover template. (d) Simulation result of using the proposed method (a =0.32, b = 6, c = 17, n = 50000).

In one instance, Fig. 7 shows images which are processedwith CNN. Figure 7(a) shows an input image. The input image has the indistinct portions and noise. Indistinct portions
are the vertical line on the right-side, numbers and letters.
Noise are inside them. Figure 7(b) shows the simulation result of using Edge Detector template. Figure 7(b) shows todetect edge lines of rectangle positioned up and down. However, noise remains inside numbers and letters. Figure 7(c)shows the simulation result of using Small Object Removertemplate. Figure 7(c) shows to remove noise inside numbers and letters. However, edge line of numbers and letters565

5. CONCLUSION(a)

In this study, we proposed new method of switching twotype templates by the magnitude of difference values in cells
and the certain number of calculation n for CNN. In order toconfirm the effectiveness of our proposed method, we applied
our proposed method to edge detection and noise removal. As
a result, our proposed method is more effective than the conventional CNN in edge detection and noise removal. In futurework, we will confirm that the proposed method is effective
for noise removal. In addition, we will confirm switching
three-type templates.

(b)

References(c)[1] L. O. Chua and L. Yang, “Cellular Neural Networks Theory.” IEEE Trans. Circuits Syst., vol. 35,
pp. 1257-1272, 1988.

(d)Figure 8: Simulation results 2. (a) Input image. (b) Simulation result ofusing the Edge Detector template (c) Simulation result of using the Small Object Remover template. (d) Simulation result of using the proposed method(a = 0.32, b = 6, c = 17, n = 50000).

is indistinct and some noise remains inside big letter. Figure 7(d) shows the simulation result of the proposed method.
Figure 7(d) shows to remove noise the vertical line, numbers
and letters compared to Fig 1(b). In addition, Fig 7(d) shows
to detect edge lines of indistinct portions of numbers compared to Fig. 1(c). Still, some noise remains inside big letter.
We process another image for edge detection and noise removal with our proposed method. Figure 8(a) shows an input
image. The input image has indistinct portions and noise.
Indistinct portion is back side letters on book cover. Noiseis inside letters. Figure 8(b) shows the simulation result ofusing Edge Detector template. Figure 8(b) shows to detectedge lines of front letters in book cover. However, on distinct points remains in the back side letters on book cover.
Figure 8(c) shows the simulation result of using Small Object Remover template. Figure 8(c) shows to remove noise
inside letters on book cover. However, the letters are crushed
on book cover. Figure 8(d) shows the simulation result of theproposed method. Figure 8(d) shows to detect edge lines ofindistinct portions and to remove noise on book cover letterscompared to Fig. 8(b) and Fig. 8(c). However, the backside
letters are crushed on book cover. From the simulation results, our proposed method is more effective than the conventional CNN in edge detection and noise removal.

566[2] Z. H. Yang, Y. Nishio and A. Ushida,“Image processing of twolayer CNNs applications and stability,” IEICE Trans. Fundamentals, vol. E85-A, no. 9, pp. 20522060, 2002.
[3] M. Hänggi and G. S. Moschytz, “Cellular Neural Networks Analysis, Design and Optimization.” Kluwer
Academic Publishers Norwell, 2000.
[4] F. Dirk and T. Ronald, “Coding of Binary Image Data using Cellular Neural Networks and Iterative Annealing,” Proc. of ECCTD’03, vol. 1, pp. 229232, Sep. 2003.
[5] Z. H. Yang, Y. Nishio and A. Ushida,“Image processing of twolayer CNNs applications and stability,” IEICE Trans. Fundamentals, vol. E85-A, no. 9, pp. 20522060, 2002.
[6] T. Kozek, K. R. Crounse, T. Roska and L. O. Chua,“Smart Image Scanning Algorithms for the CNN Universal Machine,” Proc. of NOLTA95, vol. 2, pp. 707712, 1995.
[7] T. Ando, Y. Uwate and Y. Nishio “Cellular Neural Networks with Switching Two-Type Templates for Image Peocessing.” TJCAS. Aug. 2016.