IEEE Workshop on Nonlinear Circuit Networks
December 9-10, 2016

Cellular Neural Networks with SwitchingThree-Type Templates for Edge Detection
Takahisa Ando, Yoko Uwate and Yoshifumi Nishio
Department of Electrical and Electronic Engineering, Tokushima University
2-1 Minami-Josanjima, Tokushima 770–8506, Japan
E-mail: {ando, uwate, nishio}@ee.tokushima-u.ac.jp

Abstract—In 1998, Cellular Neural Networks (CNN) weredeveloped by Chua and Yang. The main characteristics of theCNN are the local connection and the parallel signal processing.
The CNN consists of cells connected each other. The performanceof the CNN depends on the parameters which is called thetemplate. When the template has a good influence for processing,
the CNN can perform complex processing. In this study, we
propose Switching Three-Type Templates CNN. In our proposed
method, 3×3 template and 5×5 template are switched according
to the output values around a cell in processing. Then noise
removal template process from a certain number of calculation.
We investigate the performance of our proposed method by somesimulations.

to our previous method. In order to confirm the effectivenessof our proposed method, we perform edge detection.
II. CELLULAR NEURAL NETWORKSIn this section, we explain the structure and processing flowof CNN. Basic unit circuit of CNN is called cell. The cellconsists of linear element and nonlinear element. The CNN
contains an array in a reticular pattern of many cells. We show
a two dimensional array composed of M × N identical cells
arranged in M rows and N columes. The array of the CNN isshown in Fig. 1. Figure 2 shows the circuit of cell.

I. INTRODUCTION
Recently, many information have been existed in our life.
In general, digital circuits are used for information processing.
However, digital circuits cannot process many informationin real time. Therefore, Neural Networks were proposed.
The Neural Networks was based on the human’s nervoussystem. The Cellular Neural Networks (CNN) is introduced byreplacing neuron with cell. Hence, the CNN has been successfully used for various high-speed parallel signals processing
applications such as image processing, pattern recognitionand so on [1]. The CNN was paired Neural Networks withthe Cellular Automata by L.O.Chua in 1998 [2]. The CNN
consists of cells connected each other and the structure of
CNN resembles the structure of the animal’s retina. Thus
the CNN has been suitable for various image processing.
The performance of CNN depends on the parameters whichis called the template. The template represents strength ofconnection between cells. If the template influences exactly,
CNN can perform complex processing. Additionally, variousapplications for image processing and pattern recognition of
CNN have been reported.
In previous study, we have proposed the method of switching two-type templates CNN [5]. Two-type templates are 3×3template and 5×5 template. In CNN processing, 3×3 templateand 5×5 template have merit and demerit. Processing with
3×3 template is quick but the delicate process is difficult. On
the other hand, processing with 5×5 template is brady andeasy to receive noise effect but the delicate process is possible.
In simulation results with switching two-type templates, noise
effect is observed.
In this study, we propose switching three-type templates
CNN. Our proposed method is added noise removal template

Fig. 1. The structure of CNN.

Fig. 2. The circuit of cell.

A cell couples with only adjacent cells. Adjacent cells
interact with one another. Cells which don’t couple with
only adjacent cells have an indirect influence. The range-5-

which some cells have influenced one cell is defined byneighborhood. We describe state equation of cell and output
equation of cell below.

used for image processing is 3×3. In this study, we use 3×3
and 5×5 in combination. Figure 5 shows block diagram ofimage processing with CNN.

State Equation :dvx(ij)dt=−vx(ij) +i+r
Xj+rX

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

B(i,j;k,l) vu(kl) (t) + T.

(1)

1(|vx(ij) (t) + 1| − |vx(ij) (t) − 1|).
2

(2)

k=i−r l=j−r

Output Equation :vy(ij) (t)=Fig. 5. Block diagram.

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

Our previous method is switching two-type templates CNN.
First, we calculate cell’s output value. Second, we calculatecell’s maximum output value vymax and minimum output
value vymin in 5×5 neighborhood. Third, we calculate thedifference value |vymax − vymin |. Fig 6 is shown the process
which calculates the difference value |vymax − vymin |. In
the end, 3×3 and 5×5 templates are switched according tothe output values around cells in processing. This process
is conducted for all cells every number of calculation n.
Switching condition depends on the difference value between
the maximum and minimum output values vymax and vyminof each 5 × 5 neighborhood and is given as follows:(|vymax − vymin | ≤ a(3)|vymax − vymin | > a.

Fig. 3. Piece-wise nonlinear function.

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

(a)3×3(b)5×5

Fig. 4. System of neighborhood.
Fig. 6. Process of calculation.

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. Generally, the size which isWe fix a certain value a as threshold about switching
template. When the top inequality of (3) is satisfied, 3 × 3
template is used. In the other case, 5 × 5 template is used.

-6-IV. PROPOSED METHOD
Our proposed method is added noise removal template toour previous method. The number of calculation is defined
50000 in this simulation. Switching process with our previous
method is conducted for all cells every number of calculation
10 until the number of calculation 49900. Then noise removal
template processes until the number of calculation 50000.
(a)

(b)

(c)

(d)

V. SIMULATION RESULTS
In this section, we show simulation results of the edge
detection by using our proposed method and threshold value
a is defined to get results which can be observed edge line
and noise effect. We cite two instances. Using templates ofthe edge detection and noise removal are described as follows[3].
Edge detection template :
AB


0 0 0
=  0 1 0 ,0 0 0
−1 −1 −1=  −1 8 −1  , T = −1.
−1 −1 −1
A =B

=0 0 0 0 0 0
 0 0 1
 0 0 00 0 0
−1 −1
 −1 0 −1 0 −1 0−1 −1(4)(e)
Fig. 7. Simulation results 1. (a) Input image. (b) Simulation result of the3 × 3 CNN. (c) Simulation result of the 5 × 5 CNN. (d) Switching two-type(3×3 and 5×5) templates CNN (a = 0.6). (e) Our proposed method
00 0 ,0 000000−10
160−1


−1 −10 −1 
0 −1  , T = −1. (5)0 −1 −1 −1

Noise removal template:
A =B=0 30
0 00323060


03 ,000  , T = 1.
0(6)In one instance, Fig. 7 show images which are processedwith CNN. Figure 7(a) shows an input image. The input image
has the indistinct portions. Indistinct portions are the pillar ofthe left-side and an outline of a woman’s face. Figure 7(b)shows the simulation result of the 3 × 3 CNN. The 3 × 3 CNN
cannot detect edge lines of indistinct portions. Figure 7(c)shows the simulation result of the 5 × 5 CNN. The 5 × 5
CNN can detect edge lines of indistinct portions, however
image processed by this method receives the noise effect.
Figure 7(d) shows the simulation result of switching twotype template CNN (a = 0.6). Switcing two-type templatecan detect edge lines of indistinct portions and receive lessnoise effect compared to Fig. 7(c). In Fig. 7(e), dots which arecaused by noise effect are rarely found, especially woman’shat compared to Fig. 7(d).
We process another image for edge detection with our
proposed method. Figure 8(a) shows an input image. The input
image has indistinct portions. Indistinct portion is right-sidebuildings. Figure 8(b) shows the simulation result of the 3 × 3CNN. The 3 × 3 CNN cannot detect edge lines of indistinct
portions. Figure 8(c) shows the simulation result of the 5 × 5
CNN. The 5 × 5 CNN can detect edge lines of indistinct
portions, however image processed by this method receives
the noise effect. Figure 8(d) shows the simulation result ofswitching two-type template CNN (a = 0.3). In Fig. 8(d),-7-R EFERENCES

(a)

(b)

(c)

(d)

[1] 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.
[2] L. O. Chua and L. Yang, “Cellular Neural Networks Theory.” IEEE Trans. Circuits Syst., vol. 35, pp. 1257-1272,
1988.
[3] Martin Hnggi and George S Moschytz, “Cellular Neural Networks Analysis, Design and Optimization.”
Kluwer Academic Publishers Norwell,pp. 148. 2000
[4] K. Nakai and A. Ushida. “On a Design Technique of Cellular Neural Network.”IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences A Vel. J77 A No. 8. pp. 113. 1994
[5] Takahisa Ando, Yoko Uwate and Yoshifumi Nishio “Cellular Neural Networks with Switching Two-Type Templates for Image Peocessing.” TJCAS. Aug. 2016(e)Fig. 8. Simulation results 2. (a) Input image. (b) Simulation result of the3 × 3 CNN. (c) Simulation result of the 5 × 5 CNN. (d) Switching two-type(3×3 and 5×5) templates CNN (a = 0.3). (e) Our proposed method.

switcing two-type template can detect edge lines of indistinct
portions and receive less noise effect compared to Fig. 8(c).
In Fig. 8(e), dots which are caused by noise effect are rarely
found especially the sky compared to Fig. 8(d). From thesimulation results, our proposed method is more effective thanthe conventional CNN and the previous method.
VI. CONCLUSION
In this study, we proposed the new method of switching
three-type templates CNN. Three-type templates are 3×3 template, 5×5 template and noise removal template. 3×3 templateand 5×5 template are switched by the threshold a. After
that, noise removal template process. In order to confirm theeffectiveness of our proposed method, we tried our proposed
method as a method of edge detection. In output image, ourproposed method has detected edge of indistinct portions in theinput image. Moreover, noise removal effect can be observed
compared to the conventional CNN. As a result, our proposed
method is more effective than the conventional CNN and theprevious method in edge detection.
ACKNOWLEDGMENT
This work was partly supported by JSPS Grant-in-Aid for
Scientific Research 16K06357.

-8-