Motion Picture Processing
by Two-Layer Cellular Neural Networkswith Switching Templates
Kazushige Natsuno

Yoko Uwate

Yoshifumi Nishio

Dept. of Electrical Engineering
Dept. of Electrical Engineering
Dept. of Electrical Engineering
Tokushima University
Tokushima University
Tokushima University
Minami-Josanjima, Tokushima, 770-8506 Minami-Josanjima, Tokushima, 770-8506 Minami-Josanjima, Tokushima, 770-8506
Email: natsushige@ee.tokushima-u.ac.jp
Email: uwate@ee.tokushima-u.ac.jp
Email: nishio@ee.tokushima-u.ac.jp

Abstract—In this paper, we investigate characteristics of output values by a proposed new system of two layer cellular neuralnetworks (two-layer CNN). In a general way, image processingof using conventional cellular neural networks is still imageprocessing. On the other hand, it is few for motion picture
processing. Therefore, we propose the new system which iseffective structure for motion picture processing. From simulation
results, we confirm that the proposed system makes it possible
to characterize the time course characteristic of moving object.

values. From simulation results, we confirm that the proposedsystem can effectively process for motion picture.
II.

C ELLULAR N EURAL N ETWORKIn this section, we explain the single-layer CNN and thetwo-layer CNN.
A. Single-Layer CNNI.

I NTRODUCTION

We human beings get many information on a daily basis.
It mostly depend on information obtained from eyes. Oneof the component of eyes, retina convert optical image into
neural signal. Structure of cellular neural networks is similar
to retina. Cellular Neural Networks (CNN) were introduced byChua and Yang in 1988[1]. The idea of the CNN was inspired
from the architecture of the cellular automaton and the neuralnetworks. Unlike the conventional neural networks, the CNN
has local connectivity property. And, the structure of CNN
resembles that of animals’ retina which is grating couplingof basic analog circuit units. Therefore, CNN can be used forvarious image processing applications [2]-[6]. The basic analog
circuit is called a cell that has an effect on each other. The cell
circuit is constructed from linear capacitor, linear resistors,
independent voltage source, linear and nonlinear controlled
sources. Mostly, image processing of using CNN is still image
processing. Though, it is few for motion picture processing.
Whereat, we consider the effective system that can be process
the motion picture by using the input image and the previous
output image of other layer.
In this study, we propose the new system which is effective
structure for motion picture processing. The proposed system
is based on the two layer CNN. In the two-layer CNN, output
values of both layer are transfered for other layer by two
coupling templates. In some image processing, the two-layer
CNN is better than the single-layer CNN [7]. Also, in theproposed system, new input image and previous output image
are input in each layer CNN. The switching template can
execute different task by provided condition. Therefore, CNN
with switching template is better than the single-layer CNN[8]. The switching template is mounted in proposed system
in order to characterize new input values and previous output

In this subsection, we explain the basic structure of theCNN. A block diagram of the conventional single-layer CNN
is shown in Fig. 1. The conventional single-layer CNN uses
two templates A and B in processing. Templates A and B areused in weighting of feedback of output value and input value.

Fig. 1.

Block diagram of the single-layer CNN.

The state equation and the output equation are describedas follows.
State equation of the conventional single-layer CNN :
dvxij
dt

=−vxij +i+r
∑

j+r
∑

A(i,j;k,l) vxkl (t)k=i−r l=j−r+i+r
∑

j+r
∑

B(i,j;k,l) vukl (t) + I

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

(1)

Output equation of the conventional single-layer CNN :vyij (t) =1(|vxij (t) + 1| − |vxij (t) − 1|).
2(2)

B. Two-Layer CNN
Figure 2 shows the block diagram of the conventional twolayer CNN. The conventional two-layer CNN is constructed
two conventional single-layers 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.

Switching rule of templates :v2yij < v1uij : A21 , B21 and C1 templates.
v2yij ≥ v1yij : A22 , B22 and C2 templates.

(3)

STEP 2 : The value of each cell in the first-layer CNN isupdated. The state equation and the output equation of firstlayer are described as follows.
State equation of the first-layer CNN :dv1a xijdt= −v1a xij +i+r∑j+r∑A1(i,j;k,l) v1a ykl (t)k=i−r l=j−r+i+r∑j+r∑

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

CS (i, j; k, l)v2a ykl (t) + I1

k=i−r l=j−r(|i − k| ≤ 1 , |j − l| ≤ 1), (a = 1, 2, 3, 4, ...).

Fig. 2.

Block diagram of the two-layer CNN.
III.

Output equation of the first-layer CNN :1(|v1a xij (t) + 1| − |v1a xij (t) − 1|)v1a yij (t) =2(a = 1, 2, 3, 4, ),(4)(5)

P ROPOSED T WO -L AYER CNN

In this section, we explain the system of the proposed twolayer CNN. Figure 3 shows the block diagram of the proposedsystem. The structure of the proposed system is based on theconventional two-layer CNN. Though, the proposed systemdiffers the conventional system to the extent of one coupling
template and the switching templates. In particular, the featureof the proposed system, the outputs of second-layer have aneffect on processing of first-layer CNN. Also, the templates(AS , BS ) of second-layer and the coupling templates (CS ) areswitched by the input values of first-layer and output values ofsecond-layer. Input values of each layer are switched every 10[τ ]. After 10 [τ ], the previous output values of the first-layer
CNN are inputed in the second-layer CNN.

where, a means number of input and output images.
The value of each cell in the second-layer CNN is updated.
Until 10 [τ ] the state and the output equations are described
Eqs. (6) and (7), respectively. After 10 [τ ] the state and theoutput equations are described Eqs. (8) and (9), respectively.
State equation of the second-layer CNN (until 10 [τ ]):dv21 xij
dt= −v21 xij +i+r∑j+r∑AS(i,j;k,l) v21 ykl (t)k=i−r l=j−r+i+r∑j+r∑BS(i,j;k,l) v21 ukl (t) + I2

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

(6)

Output equation of the second-layer CNN (until 10 [τ ]):1
v21 yij (t) =(|v21 xij (t) + 1| − |v21 xij (t) − 1|). (7)2State equation of the second-layer CNN (after 10 [τ ]):dv2xijdt= −v2b xij +i+r∑j+r∑AS(i,j;k,l) v2b ykl (t)k=i−r l=j−r+i+r∑j+r∑BS(i,j;k,l) v1b−1 ykl (t) + I2

k=i−r l=j−r

Fig. 3.

Block diagram of the proposed two-layer CNN.

The algorithm of the proposed system is shown as follows.
STEP 1 : We determine the switching templates AS , BS and
CS by output and input valuers. If v2yij is smaller than v1uij ,templates A21 , B21 and C21 are used. On the other hand, Ifv2yij is bigger than v1uij , the templates A22 , B22 and C22 areused. The switching rule of templates are shown as follows.

(|i − k| ≤ 1 , |j − l| ≤ 1), (b = 2, 3, 4, ...).

(8)

Output equation of the second-layer CNN (after 10 [τ ]):1v2b yij (t) =(|v2b xij (t) + 1| − |v2b xij (t) − 1|),2
(b = 2, 3, 4, ...),(9)
STEP 3 : The steps 1 and 2 are repeated every 0.005 [τ ].

IV.

S IMULATION R ESULTS

In this section, we show simulation result of the motion
picture processing with four input images by using the proposed system. For simulation, we use four types of templates
which are found in [9]. Templates of each layer and coupling
are assigned as follows.
Template of first-layer:[A1B10−0.1=0[0 00 1=0 0−0.1
00.5 −0.1−0.10]
00 , I = 0.
0(a)]
,(10)

Two types of templates of the second-layer:
[A21=

B21=

A22=

B22=]
0 0 00 0.2 0 ,0 0 0][−0.2 −0.2 −0.2−0.2 1.6 −0.2 , I1 = 0.
−0.2 −0.2 −0.2][0000 −0.2 0 ,000][0 0.1 00.1 0.2 0.1 , I2 = 0.
0 0.1 0.1

C1C200.1=0[00.1=0]0.1
00.35 0.1 ,0.10]
0.1 0−1 0.1 .
0.1 0

(c)

(d)

(e)

(11)

(12)

Input and initial state images. (a) Initial state of eachlayer and input image of second layer From 0 to 10 [τ ],(b) Input image of first-layer from 0 to 10 [τ ], (c) Input imageof first-layer from 10 to 20 [τ ], (d) Input image of first-layerfrom 20 to 30 [τ ], (e) Input image of first-layer from 30 to 40[τ ].
Fig. 4.

Two types of coupling template:[(b)(13)

Figures 4(b) to (e) show the four types of input images of first-layer.
Figure 4(a) shows the first input image of second-layer andinitial state images of each layer. In Fig. 4, a parson is moving
on to right side from left side.
Figures 5 and 6 show the simulation results using theproposed system. Figure 5 shows the output images of thefirst-layer. In Figs. 5(b) to (d), moving objects of previous
outputs are appeared. In Fig. 5(b), moving object of Fig. 5(a)is appeared. Gray scale values of moving object are diluter thanoriginal object in Fig. 5(a). Next, in Fig. 5(c), the two moving
objects of the previous outputs are appeared. In addition, edgelines of the most right side moving object are accented. In asimilar way, in Fig. 5(d), the all moving objects of previous
output are appeared about same characteristic.
Figure 6 shows the output images of the second-layer. In
Fig. 6, the output value translate into similar gray scale value.
In Figs. 6(b) to (d), moving object of previous outputs areappeared. Also, in Figs. 6(b) and (c), we can discern edges ofmoving object and right side object in back ground. And, inFig. 6(d), edges of right side moving object are more accent
than other moving object.
Figure 7 shows the variation of cell values of firstlayer. Point of Vy(30,30) corresponds to the pixel of background. Point of Vy(220,70) corresponds to the pixel of headin first appeared moving object. Point of Vy(204,170) andVy(211,127) correspond to the pixel of edge line in firstappeared moving object. Slope of Vy(30,30) is little change atevery switching input images. On the other hand, other slopes
are large change at every switching input images. Slope ofVy(204,170) and Vy(220, 70) are changed high scale values
at every switching input images. That is to say, the edge ofmoving objects is accented at every switching input images.
Therefore, the edge of old moving object is more accent than
new moving object.
From simulations result, the proposed system could beappeared about characteristic of moving object. Also, the timecourse of moving object could be discerned by the accent of
the edge lines.

(a)

(b)

(a)

(b)

(c)

(d)

(c)

(d)

Fig. 5. Simulation results of the first-layer. (a) 0 [τ ], (b) 10[τ ], (c) 20 [τ ], (d) 30 [τ ].

V.

C ONCLUSION

In this study, we have proposed two-layer CNN withswitching templates of second-layer. The feature of the proposed system are only coupling template and the switching
templates. The first-layer and the second-layer were connected
only coupling template. Outputs of second-layer CNN have aneffect on processing of first-layer CNN.
From simulation results, the proposed system could bedetected about characteristic of moving object. Therefore, wecould say that the proposed system makes it possible tocharacterize the detection of moving objects. In the future
works, we would like to process detection of moving object
in image that is changed background.
ACKNOWLEDGMENT
This work was partly supported by JSPS Grant-in-Aid forYoung Scientists 23700269.
R EFERENCES
[1]
[2]

[3]

[4]
[5]

Simulation results of the second-layer. (a) 0 [τ ], (b) 10[τ ], (c) 20 [τ ], (d) 30 [τ ].

Fig. 6.

L. O. Chua and L. Yang, “Cellular Neural Networks: Theory,” IEEE
Trans. Circuits Syst., vol. 35, pp. 1257-1272, Oct. 1988.
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.
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.
H. Koeppl and L. O. Chua, “An Adaptive Cellular Nonlinear Network and its Application,” Proc. of NOLTA’07, pp. 15-18, Sep. 2007.
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.

Fig. 7.

Change of cell values of first-layer.

[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] 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.