Proceedings of NOMA'13 Workshop
September 3-4, 2013, Zaragoza, Spain

Two-Layer DT-CNN with Switching Template
Kazushige Natsuno, Yoko Uwate and Yoshifumi Nishio
Dept. of Electrical and Electronic Eng.,
Tokushima University,
2-1 Minami-Josanjima,Tokushima,
770-8506 JAPAN
Email: {natsushige, uwate, nishio}@ee.tokushima-u.ac.jp

Abstract— In this paper, we propose a new system of twolayer Discrete-Time Cellular Neural Network (DT-CNN) andinvestigate the output characteristics. The proposed system has
different structure of conventional DT-CNN. In particular, thestructure of proposed system is two-layer. Also two templates
are switched by outputs value of each layer. From simulation
results, we confirm that the proposed system is more effective
than the conventional CNN for some image processings.

I. I NTRODUCTION
Our society has a fair amount of information. At present,a personal computer has a higher processing ability than ahuman to the extent of computational speed. Though, thepersonal computer is lower than processing speed of human forimage and sound recognitions. Therefore, a neural network is
the focus of attention as new model of information processing.
The neural network bases on the concept of the processingof the cerebral nerve system. The key features of neuralnetwork are asynchronous parallel processing, continuous-timedynamics and global interaction of network elements.
Continuous Time Cellular Neural Network (CT-CNN) wereintroduced by Chua and Yang [1]. CT-CNN is used the conceptof cellular automata and neural networks. The structure ofCT-CNN is grating coupling of simple analog circuit. The
CT-CNN makes it possible to high-speed parallel processing.
Therefore, the CT-CNN can be used for various image processing applications [2]-[6]. The pattern of coupling is called
template that make a decision about behavior of CNN. The
CT-CNN has characteristics of local connection that provide
an advantage to implementation of VLSI. Though, the CTCNN has difficulty mounting at integrated circuit by the analogcircuit. However, the CT-CNN has difficulty implementing byanalog circuit. Therefore, the discrete-time CNN (DT-CNN)
is developed in order to process with discrete-time [7]. The
output of DT-CNN is expressed step function. In addition,
output of DT-CNN can extend in multiple values because ofoutputs function are shifted discrete value levels of multiplevalue. Also, the calculation of DT-CNN is easier than CT-CNN
because calculation of DT-CNN is described by difference
equation.
In this study, we consider DT-CNN with involvement of theeffective structure at the CT-CNN. Two-layer CNN is constructed two conventional single-layer CNNs by two-coupling
template. In processing of each layer, outputs of both layer
exert an effect on processing of each other. Also, CNN cannot

be process complex processing by space invariant template. In
CNN with switching template, template is switched by pixel
values of processing image. And, the CNN with switching
template is switched makes it possibility to be not spatiallyhomogeneous processing. In some image processings, thetwo-layer CNN and CNN with switching template are more
effective than the conventional CNN [8]-[9]. Therefore, weproposed two-layer DT-CNN with switching template. From
some image processings, we confirm that the proposed system
can be effective than the conventional DT-CNN.
II. C ELLULAR N EURAL N ETWORKIn this section, we explain about the conventional DT-CNN,
two-layer CNN and CNN with switching template.
A. DT-CNN
In this subsection, we explain about the conventional DTCNN. A block diagram of the DT-CNN is shown in Fig.1. The
processing of DT-CNN uses three types value that are input,
output and threshold values. Also, outputs characteristic of DTCNN are shown in Fig.2. Output characteristic of DT-CNN isexpressed the multiple-valued quantized function.

24

Fig. 1.

Fig. 2.

Block diagram of the DT-CNN.

The output characteristic of DT-CNN.

Proceedings of NOMA'13 Workshop
September 3-4, 2013, Zaragoza, Spain

The state equation and output equation are described asfollows.
State equation of the conventional DT-CNN :x(t + 1)

i+r
∑

=j+r
∑

A(i, j; k, l)vykl (t)k=i−r l=j−r+i+r∑j+r∑B(i, j; k, l)vukl (t) + T

k=i−r l=j−r(|i − k| ≤ 1 , |j − l| ≤ 1).

(1)

Output equation of the conventional DT-CNN :(ϵ ≤ vxij (t))
1vyij (t) =g(vxij (t)) (−ϵ < vxij (t) < ϵ)−1(vxij (t) ≤ −ϵ){∆[vxij /∆ + 1/2]
(L : odd)g(vxij (t)) =∆([vxij /∆] + 1/2) (L : even)∆=2ϵ/(n − 1).

template. Therefore, CNN with switching template is proposed. The CNN with switching template makes it possible
to perform complex processing. The CNN with switching
template is depend element as input values and output values.
The CNN with switching template can process more effective
image processing by using optimal switching condition.
III. P ROPOSED SYSTEM
In this section, we explain the system of the proposed twolayer DT-CNN. Figure 4 shows the block diagram of theproposed system. The structure of the proposed system basedon conventional two-layer CNN. Also, the proposed system
has two switching templates AS and CS that are switched byoutputs value of each layer. In the two switching templates,
AS , CS templates are switched two types by outputs value ofeach layer.

(2)

B. Two-Layer CNN
In this subsection, we explain about the two-layer CNN.
Figure 3 shows the block diagram of the conventional twolayer CNN. The conventional two-layer CNN is constructed by
two conventional single-layer CNN. Two conventional singlelayer CNN is coupled by two coupling templates C1 and C2 .
And the two coupling templates are used to transfer output
values between both layers. Also, the conventional two-layer
CNN has been confirmed to have more efficient structure forhigh performance image processing.

Fig. 4.

Block diagram of the proposed system.

The switching condition expression and state, output equation are shown as follows.
Switching condition expression :vy1ij (t)vy1ij (t)= vy2ij (t) : A21 andC21 templates
̸= vy2ij (t) : A22 andC22 templates

(3)
(4)

State equation of the first-layer CNN :x1 (t + 1)

=i+r
∑

j+r
∑

A1 (i, j; k, l)vy1kl (t)k=i−r l=j−r+i+r∑j+r∑

B1 (i, j; k, l)vukl (t)k=i−r l=j−r+i+r
∑

j+r
∑

Cs (i, j; k, l)vy2kl (t) + T1 ,k=i−r l=j−r(|i − k| ≤ 1 , |j − l| ≤ 1).
Fig. 3.

(5)

Block diagram of the two-layer CNN.

C. CNN with Switching Template
In this subsection, we explain about the switching template.
Dynamics of CNN is determined by template. Template ofCNN is consisted from three types element that are feedback
A, feedforward B and threshold T template. In generally,
CNN can not process complex processing by space invariant

25

Output equation of the first-layer CNN :(ϵ ≤ vx1ij (t))
1vy1ij (t) =g(vx1ij (t)) (−ϵ < vx1ij (t) < ϵ)−1(vx1ij (t) ≤ −ϵ){∆[vx1ij /∆ + 1/2](L : odd)g(vx1ij (t)) =∆([vx1ij /∆] + 1/2) (L : even)∆=2ϵ/(n − 1).

(6)

Proceedings of NOMA'13 Workshop
September 3-4, 2013, Zaragoza, Spain

State equation of the second-layer CNN :x2 (t + 1)

i+r
∑

=j+r
∑

As (i, j; k, l)vy2kl (t)k=i−r l=j−r+i+r
∑

j+r
∑

C12 (i, j; k, l)vy1kl (t) + T2 ,k=i−r l=j−r(|i − k| ≤ 1 , |j − l| ≤ 1).

(7)

(a)

Output equation of the second-layer CNN :(ϵ ≤ vx2ij (t))
1vy2ij (t) =g(vx2ij (t)) (−ϵ < vx2ij (t) < ϵ)−1(vx2ij (t) ≤ −ϵ){∆[vx2ij /∆ + 1/2]
(L : odd)g(vx2ij (t)) =∆([vx2ij /∆] + 1/2) (L : even)
2ϵ/(n − 1).

∆ =Fig. 5.

(b)Input and initial state images 1. (a) Lenna, (b) Cameraman,(8)

IV. S IMULATION RESULTIn this section, we show simulation results by using proposed system. In this simulation, we simulated edge detection
and binarization. Used templates are found in [10]. Templates
and thresholds of each layer are assigned as follows.
Template of binary:A=0 10121

01  , B = T1 = 0.
0(a)

(b)

(c)(d)(9)Template of edge detection:
A

=T1=0
 00−1.


0−10  , B =  −10−101
0−18−1−1−1  ,−1(10)Fig. 6.
Simulation results of binarization 1. (a) Simulation result ofbinarization by using conventional DT-CNN, (b) Simulation result of edgedetection by using conventional DT-CNN, (c) Simulation result for first-layerof proposed system. (d) Simulation result for first-layer of proposed system.

Template of first-layer, coupling template, thresholds:
A1=C12=0
 00
1
 1
1010181
0−1 −10  , B =  −1
80−1 −1
11  , T1 = T2 = 0.
1

−1−1  ,−1
000  , A22 =  000100  , C22 =  00000 ,010 .
0(11)Switching template:
A21

C21==0 00
0 000100100−100−10(a)

(12)

(b)

(c)(d)

Fig. 7. Closeup of simulation results. (a) Simulation result of binarizationby using conventional DT-CNN, (b) Simulation result of edge detection byusing conventional DT-CNN, (c) Simulation result for first-layer of proposedsystem. (d) Simulation result for first-layer of proposed system.

26

Proceedings of NOMA'13 Workshop
September 3-4, 2013, Zaragoza, Spain(a)Figures 8(a) and (b) show the simulation result by using
conventional DT-CNN. One the other hand, Figs 8(c) and(d) shows the simulation result by using proposed system.
In the Fig. 8(a), the indistinct portions can not be detected.
In addition, in the Fig. 9(a), a detail that the camera and theaspect of face can not be shown. Also, in the Fig. 8(b), theindistinct portions can be partially detected. In contrast, inthe Figs. 8(c) and (d), indistinct portions can be detected. In
addition, in the Figs. 9(c) and (d), the detail that the camera
and the aspect of face can be shown.
From simulation results, we can say that the proposed system
is more effective than the conventional DT-CNN.

(b)

V. C ONCLUSIONS

(c)

(d)

Fig. 8.
Simulation results of binarization 2. (a) Simulation result ofbinarization by using conventional DT-CNN, (b) Simulation result of edge
detection by using conventional DT-CNN, (c) Simulation result for first-layerof proposed system. (d) Simulation result for first-layer of proposed system.

(a)

(b)

(c)

In this paper, we have proposed two-layer DT-CNN with
two switching templates. The proposed system has that twotypes of templates (AS , CS ) are switched by outputs valueof each layer. From simulation results, the proposed system
could be detected about the indistinct and the detail portions.
Therefore, we could say that the proposed system is more
effective than the conventional DT-CNN.
In the future works, we would like to compare outputs
characteristic by quantitative investigation. In addition, wewould like to investigate about other image processings.
R EFERENCES[1] L. O. Chua and L. Yang, “Cellular Neural Networks: Theory,” IEEETrans. Circuits Syst., vol. 35, pp. 1257-1272, Oct. 1988.
[2] F. Dirk and T. Ronald, “Coding of Binary Image Data using Cellular Neural Networks and Iterative Annealing,” Proc. of ECCTD’03, vol. 1,
pp. 229-232, Sep. 2003.
[3] M. Namba and Z. Zhang, “Cellular Neural Network for Associative Memory and its Application to Braille Image Recognition,” Proc. of IJCNN’06,
pp. 4716-4721, Jul. 2006.
[4] H. Koeppl and L. O. Chua, “An Adaptive Cellular Nonlinear Network and its Application,” Proc. of NOLTA’07, pp. 15-18, Sep. 2007.

(d)Fig. 9. Closeup of simulation results. (a) Simulation result of binarizationby using conventional DT-CNN, (b) Simulation result of edge detection byusing conventional DT-CNN, (c) Simulation result for first-layer of proposedsystem. (d) Simulation result for first-layer of proposed system.

Figure 5 shows the input images. In the Fig. 5(a), the pastof background and a hat in the mirror are indistinct portions.
Also, in the Fig. 5(b), the buildings of the background areindistinct portions. The simulation results are shown in Figs. 6and 8. Closeup of simulation results are shown in Figs. 7 and9.
Figures 6(a) and (b) show the simulation result by using
conventional DT-CNN. On the other hand, Figs. 6(c) and (d)shows the simulation result by using proposed system. In theFig. 6(a), the indistinct portions can not be detected. Therefore,
in the Fig. 7(a), a detail that the decor of hat and the aspectof face can not be shown. Also, in the Fig. 6(b), the indistinct
portions can not be detected. In contrast, in the Figs 6(c) and(d), indistinct portions can be detected. In addition, in theFigs. 7(c) and (d), the detail that the decor of hat and theaspect of face can be shown.

[5] T. Kozek, K. R. Crounse, T. Roska and L. O. Chua, “Smart Image Scanning Algorithms for the CNN Universal Machine,” Proc. of NOLTA’95,
vol. 2, pp. 707-712, 1995.
[6] K. R. Crounse and L. O. Chua, “Methods for Image Processing and Pattern Formation in Cellular Neural Networks: A Tutorial,” IEEE Trans.
Circuits Syst., vol. 42, no. 10, pp. 583-601, Oct. 1995.
[7] 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. 2052-2060, Sept. 2002.
[8] Y. Kato, Y. Ueda, Y. Uwate and Y. Nishio, “Cellular Neural Networks with Switching Two Types of Templates,” Proc. of IJCNN’ 11,
pp. 1423-1428, Jun. 2011.
[9] H. Harrer, J. A. Nossek, T. Roska and L. O. Chua, “A current-mode
DTCNN universal chip, ” Proc. IEEE Int, Symp, Circuits Syst. (ISCAS’94), vol.4, pp. 135-138, 1994.
[10] L. Kek, K. Karacs and T. Roska, “Cellular Wave Computing Library(Templates, Algorithms, and Programs), Version 2.1, ” Cellular Sensory Wave Computers laboratory, Hungarian Academy of Sciencesk, Budapest, Hungary, 2007.

27