2010 IEEE Workshop on
Nonlinear Circuit Networks, Tokushima, Dec 3-4, 2010

Image Processing Using Two-Template CNN WithConventional Cloning Templates
Riichiro Yaname

Yasuteru Hosokawa

Yoshifumi Nishio

Dept. Information Business,
Shikoku University
Email: s1937090@edu.shikoku-u.ac.jp

Dept. Media and Information System,
Shikoku University
Email: hosokawa@keiei.shikoku-u.ac.jp

Dept. Electrical and Electronic Eng.,
Tokushima University
Email: nishio@ee.tokushima-u.ac.jp

Abstract— In this study, two kinds of cloning templates of adiscrete-time two-template CNN are proposed. Some conventionalcloning templates are applied to these cloning templates. Therefore, it is not difficult to design a new cloning template for twotemplate CNN. Additionally, it is shown that the image processing
capability is higher than a conventional CNN.

State equations of the discrete-time two-template CNN aregiven as follows.
1: Cell αxij (t + 1) =∑Aα (i, j; k, l)ykl (t)C(k,l)∈Nr (i,j)

I. I NTRODUCTION∑

Cellular Neural Network (CNN) [1]-[3] is one of mutual
coupling neural networks. There are many studies. One ofadvantage points is that cells are coupled only neighborhoodcells. Namely, IC implementation is easily.
Some kinds of modified CNNs are proposed by individualresearchers. One of modified CNNs is two-template CNN [4].
Two kinds of cloning templates of the two-template CNN canbe set up at once. Some interesting oscillatory phenomena
are observed in this system. Furthermore, the architecture oftwo-template CNN is almost same as a conventional CNN.
Therefore, the advantage of IC implementation is not lost.
In past studies, although image processing is suitable for
introducing the capability of the two-template CNN, there
is not an investigation of image processing using the twotemplate CNN. Additionally, though some cloning templates
for discrete-time CNN which have the same functions as
continuous-time CNN are shown [5], there is not an investigation of discrete-time two-template CNN.
In this study, we propose two kinds of cloning templates fordiscrete-time two-template CNN. These templates are based onsome conventional cloning templates. Additionally, the output
function is set as a step function. It means that binary outputs
are obtained in each iteration. Therefore, it is not difficult todesign these cloning templates.
By some computer simulations, it is shown that the image
processing capability is higher than a conventional CNN.

(1)
Bα (i, j; k, l)ukl + Iα

C(k,l)∈Nr (i,j)

2: Cell βxij (t + 1) =∑Aβ (i, j; k, l)ykl (t)C(k,l)∈Nr (i,j)∑(2)
Bβ (i, j; k, l)ukl + Iβ

C(k,l)∈Nr (i,j)

A{αβ} (i, j; k, l)ykl , B{αβ} (i, j; k, l)ukl , I{αβ} are called as
the feedback coefficient, the control coefficient and bias current, respectively.
The output equation is given as follows.
{1(xij (t) ≥ 0)yij (t) =(3)−1 (x (t) < 0)ij

By this function, output values are binarized.

II. T WO -T EMPLATE CNN
Figure 1 shows an architecture of the two-template CNN.
Cells α and β are arranged as a checkered pattern. Basically,
the architecture is same as a conventional CNN. A difference
between cell α and β is only values of cloning templates. The
number of cells is set as M × N. The cell which is arranged atith row and the jth column is called as C(i, j). We investigate
1-neighborhood only in this study.

-5-Fig. 1.

Architecture of two-template CNN.

III. S IMULATIONS
A. System Set-up
In this section, computer simulations are carried out. All
input images are gray scale images whose gradation is a 256
gradation shown in Fig. 2. The size is 256 × 256. Boundary
conditions are set as 1.

In this case, some white dots are removed. Namely, a noise
reduction is carried out. In order to realize these processing
on a conventional CNN, two cloning templates which are adither and a noise reduction are needed.

(a)

(b)

(c)

Fig. 3. Simulation results (Dither). (a) Input image. (b) Output image of theconventional CNN. (c) Output image of the two-template CNN.

Fig. 2.

256 gradation using in this study.

B. DitherFigure 3 shows simulation results of the conventional CNN
and the two-template CNN with following cloning templates.
(a)Conventional CNN:
0A = 00000−100 , B = −1−10−19−1
−1−1 , I = 0,−1(b)Fig. 4. Simulation results (Dither and noise reduction). (a) Input image. (b)Output image of the two-template CNN.

(4)

Two-template CNN:

0 0 000.1
000.1 , B α = 0 4 0 , Iα = −3.7,Aα = 0.10 0 000.10
−1 −1 −10 0 0
9−1 , Iβ = −0.
Aβ = 0 0 0 , B β = −1−1 −1 −10 0 0(5)where input state values are set as random numbers. Figure 3 (a) shows an input image. Figures 3 (b) and (c) show simulation results of the conventional CNN and the two-template
CNN, respectively. The cloning template of the conventional
CNN and cell β of the two-template CNN means a dither. Thecloning template of cell α of the two-template CNN meansa noise rejection. In the case of the two-template CNN, we
designed the cloning template by only coupling two cloning
templates for a conventional CNN. Therefore, the designing
method is a very simple. Additionally, the capability is higher
than a conventional CNN. In Fig. 3 (c), a area which looks
like gray is confirmed. This area is a checkered pattern. Thisarea size can be changed by changing Iα . Thus we consider
that a better output image can be obtained. This template hasan another capability. Figure 4 shows a simulation result of thetwo-template CNN. Figures 4 (a) and (b) show an input image
and a simulation result of the two-template CNN, respectively.

Now, the other results are shown. Figure 5 shows aninput image. Figure 6 shows a simulation result of the twotemplate CNN with the cloning template (5). Figure 7 showsa simulation result of the conventional CNN with the cloningtemplate (4) and cell α part of the cloning template (5) insequence. In Fig. 6, we can observe some gray-scaled area.
For instance, a camera, buildings, cameraman’s pants and soon looks like gray. These area are checkered patterns. On theother hand, in the case of the conventional CNN which twokinds of cloning templates is applied, these area are blacked
out. We consider that these results show the advantage of twotemplate CNN.

-6-Fig. 5.

Input image with noise.

(a)Fig. 6.
Simulation result of the two-template CNN. (Dither and noisereduction)

(b)

(c)

Fig. 8. Simulation results (Hole filling). (a) Input image. (b) Output imageof the conventional CNN. (c) Output image of the two-template CNN.



0 0 000.1
000.1 , B α = 0 4 0 , Iα = −3.7,Aα = 0.1
0 0 000.10
1 0 10 0 0
Aβ = 0 2 0 , B β = 0 4 0 , Iβ = −0.5
1 0 10 0 0(a) Dithered image of the input image.

(7)
Figure 8 (a) shows an input image. Figures 8 (b) and (c)show simulation results of a conventional CNN and twotemplate CNN, respectively. The cloning template of theconventional CNN means a hole filling. The cloning templateof cell α of the two-template CNN means a noise rejection.
The cloning template of cell β of the two-template CNN isbased on a hole filling for a conventional CNN. The original
matrix A of the cloning template is shown as follows.
0 1 0A = 1 2 1(8)
0 1 0(b) Noise rejected image of (a).
Fig. 7.

Simulation result of the conventional CNN.

C. Hole filling
Figure 8 shows simulation results of the conventional CNN
and the two-template CNN on following cloning templates.
Conventional CNN:
0A = 10121

001 , B = 000

Two-template CNN:040

00 , I = −0.5,0(6)By rotating 45 degree, matrix Aβ are obtained. This modifying
means that coupling of cell β is kept. Matrix Bβ and bias Iβ
are same as the original cloning template. In this case, we
designed the cloning template by coupling and modifying twocloning templates for a conventional CNN.
Advantages of two-template CNN are the transparency of ahole filling and a noise reduction. In Fig. 8 (b), we can not
see lines which pass though objects and all black dots areheld. In Fig. 8 (c), a hole filling is carried out as a checkered
pattern which looks like gray. Therefore, we can see the lines.

-7-Additionally, some black dots are removed. On the other hand,
there is a disadvantage. This cloning template can not work
as hole filling in the case that the border line width is one
dot. In particular, upper right side and upper left side objectsof Fig. 8 are not filled. The reason is that cell β is arranged
at checkered pattern. Though there are some advantage and adisadvantage, we consider that a two-template CNN is better
than a conventional CNN in total.
Here, the other results are shown. Figure 9 shows a simulation result of the two-template CNN with the cloning template(7). Figure 10 shows a simulation result of the conventional
CNN with the cloning template (6) and cell α part of thecloning template (7) in sequence. The input image of these
two results is Fig. 5. In Fig. 9, we can observe some checkered
pattern areas. Especially, the shade of cameraman’s pants isprocessed effectively. On the other hand, in the case of theconventional CNN which is applied two kinds of cloning
templates, These area is blacked out. In this case, we could
not say that there is the advantage of the two-template CNN.
However, we consider that the capability of the two-template
CNN can be introduced.

(a)(b)
Fig. 10. Simulation results of the conventional CNN (Hole filling and noiserejection). (a) Input image. (b) Output image of conventional Hole filling
template. (c) Output image of Hole filling and noise reduction.

In our future works, applying these cloning templates tosome famous images for image processing studies, templatevalues optimization, designing another cloning templates andso on are considered.
Fig. 9. Simulation results of two-template CNN (Hole filling and noisereduction).

D. Discussion
In above two subsections, we proposed two kinds of cloning
templates for two-template CNN. We consider that the common points are follows:• Initial state values are random numbers• The template of cell α is noise rejection• The template A of cell β is not connected with cell alphaInitial state values are random numbers
It is expected that cloning templates which satisfy these points
can be applied to two-template CNN. On the other hand, theinvestigation of cloning templates which do not satisfy thesepoints is needed.

R EFERENCES[1] L. O. Chua and L. Yang, “Cellular Neural Networks: Theory,” IEEE
Trans. Circuits Syst., vol. 35, no. 10, pp. 1257–1272, 1988.
[2] L. O. Chua and L. Yang, “Cellular Neural Networks: Applications,” IEEE
Trans. Circuits Syst., vol. 35, no. 10, pp. 1273–1290, 1988.
[3] L. O. Chua, M. Hasler, G. S. Moschytz and J. Neirynck, “Autonomous
Cellular Neural Networks: a unified paradigm for pattern formation andactive wave propagation,” IEEE Trans. Circuits Syst. I, vol. 42, no. 10,pp. 559577, 1995.
[4] J. Fujii, Y. Hosokawa and Y. Nishio, “Wave Phenomena in Cellular Neural
Networks Using Two Kinds of Template Sets,” Proc. of NOLTA’ 07, pp.
23–26, 2007.
[5] H. Saito, K. Jin’no and M. Tanaka, “Universality of DT-CNN,” IEICE
Technical Report, no. NLP96-72, pp. 65–72, 1996.

IV. C ONCLUSIONSIn this study, we proposed two kinds of cloning templates
for two-template CNN. The capabilities of these cloning
templates have were shown. Furthermore, that these cloning
templates could be designed easily.

-8-