2009 International Workshop on Nonlinear Circuits and Signal Processing
NCSP'09, Waikiki, Hawaii, March 1-3, 2009

Simple Template Design Method ofCellular Neural Networks by Combining Templates
Takashi Inoue† and Yoshifumi Nishio††Tokushima University
2-1 Minami-Josanjima, Tokushima, Japan
Phone:+81-88-656-7470, FAX:+81-88-656-7471
Email: : {takashi, nishio}@ee.tokushima-u.ac.jp

Abstract

mixture template using two or more diﬀerent CNN templates.
In this study, we propose a simple template design method
In this study, we propose a simple template design method of CNN by combining two existing templates. We investiof cellular neural networks by combining two existing tem- gate the output characteristics of simple image processing usplates. In this article, we investigate the output characteristics ing the proposed template design method and show its eﬀecof simple image processings using the proposed template de- tiveness with some simulation results. Because the produced
sign method and show its eﬀectiveness with some simulation templates have the eﬀects of the two original templates, itresults.
may be useful to reduce the number of the successive processing for some kinds of image processing tasks.
In the Sec. 2, we review the basic of the standard CNN.
1. Introduction
In the Sec. 3, we show the algorithm of the propose template
design method. In the Sec. 4, we show some computer simuCellular Neural Networks (CNN) [1] were introduced bylated results. Section 5 concludes the article.
Chua and Yang in 1988. The idea of the CNN was inspired
from the architecture of the cellular automata and the neural networks. Unlike the conventional neural networks, the 2. Cellular Neural Networks [1]
CNN has local connectivity property. Since the structure of
In this section, we describe the basic structure of the CNN.
the CNN resembles the structure of animals’ retina, the CNN
The CNN has M by N processing unit circuits called cells
can be used for various image processing application [2]-[4]as Fig. 1. Cells are arranged in a reticular pattern to M line
including character extractions [5].
N row. We represent a cell C(i, j) using a variable i which
Wiring weights of the cells are established by parameters denotes vertical position and a variable j which denotes horicalled the template. The performance of the CNN is decided zontal position. The cell contains linear and nonlinear circuitby the template. If the templates of all the cells in the CNN elements. The CNN is an array of cells. Each cell is conare identical, the system is called space-invariant, while if nected to its neighboring cells according to a template. Usuthe templates of all the cells in the CNN are not identical, ally, the template is the same for all cells except for boundary
the system is called space-varying. Typically, space-invariant cells. The CNN has the features of time continuity, spatialsystem is mainly used in the studies of the CNN, because the discreteness, nonlinearity and parallel processing capability.
implementation cost is cheap. There are some major template
The state equation and the output equation of the cell aredesign methods such as template learning [6]. However, the shown as follows.
template leaning takes a long time to find desired template.
State equation:
In the previous study, we have proposed the cellular neuj+ri+r ∑∑dv xi jral networks using mixture template [7]. In the first mixing
A(i, j;k,l) vykl (t)=−v+xi jmethod, we prepared two diﬀerent CNN templates and chosedt
k=i−r l= j−r
one of them for each cell at random. In the second mixj+ri+r ∑∑ing method, we prepared two diﬀerent CNN templates, but
B(i, j;k,l) vukl (t) + I+(1)chose some elements of them for the matrices and the threshk=i−r l= j−rold I at random. As the first step of the investigation of themixing two templates, we could confirm the eﬀects of the Output equation:
both templates in the proposed two mixing methods. In order
1vyi j (t) = (|v xi j (t) + 1| − |v xi j (t) − 1|)(2)
to broaden this concept, we should consider another type of2- 487 -where v x , vy and vu represent a state, an output and an inputof cell, respectively. In the equation (1), A is the feedback
template and B is the control template. These and bias I arecollectively called general template.
The r − neighborhood of the cell C(i, j) in the CNN is defined byNr(i, j) = {C(k, l) | max { |k − i| , |l − j| } ≤ r,1 ≤ k ≤ M; 1 ≤ l ≤ N}

(a)

(b)

(3)

where r is a positive integer number. In our study, we fix thevalue of r as 1.
3. Template Design Method(c)

In this section, we propose a template design method of theCNN.
In our template design method, we simply prepare twokinds of 3 × 3 diﬀerent templates;

The following is an example of the procedure.

T emplate 1 : 1
 a11
A1 =  a121
 1

a112

T emplate 2 : 2
 a11
A2 =  a221
 2a212a31

a31

Figure 1: Combining two templates. (a) Template 1 (3 × 3).
(b) Template 2 (3 × 3). (c) Combination template (5 × 5).

a122
a132

a222
a232

 1

 b11

 1

1

a23  , B1 =  b21

11a113b112

a33

b122b132b31

 2 b11 , B2 =  b221
a223 
 2

2a213

b31

a33

b212b222b232




1b23 
 , I1 .
1b113(4)b33

b223  , I2 .
2b213

(5)

b33

T emplate 1 : 1 1

A1 =  1 2

1 1(8)

I2 = 4.5.

(9)

p = 0.8.

(10)Mixing Rate:p (0 ≤ p ≤ 1.0)

(6)

Finally, we create a new 5 × 5 combination template from Combination T emplate:
the two 3 × 3 templates with the mixing rate; 0.8 0Combination T emplate: 00 0.8 0.1
 1A=
11pa120pa13  pa11 0
0
 0222
 0(1−p)a(1−p)a(1−p)a0111213
0.80
121221A =  pa21 (1−p)a21 pa22 +(1−p)a22 (1−p)a23 pa23  ,222 0(1−p)a33 0
320
 1 (1−p)a31 (1−p)a 0.8pa32 0pa1320pa133
 0 0.04
0B =  1.6
 111pb0pb0pb 11
 0 0.04
1213 
 0(1−p)b211 (1−p)b212(1−p)b213 00.80
B =  pb121 (1−p)b221 pb122 +(1−p)b222 (1−p)b223 pb123  , 0
I = 0.9.
(1−p)b231 (1−p)b232(1−p)b233 0
1
11pb32
1 
2  , I1 = 0.

1T emplate 2: 0.2 0 0.2  0 0.5 0 




A2 =  0.5 4 0.5  , B2 =  0 1 0  ,
0.2 0 0.20 0.5 0Next, we choose the mixing rate;
Mixing Rate: 1 21 
1  , B1 =  2 0

1 210pb32

I = pI1 + (1 − p)I2 .

0


0.8 0 0.8 
0.1 00 

2.4 0.1 0.8  ,
0.1 00 
0.8 0 0.8

1.6
00.8 

0 0.04 0 
0.2
01.6  ,
0 0.04 0 
1.6
00.8(11)

pb33

(7)

The schematic picture of the procedure is shown in Fig. 1.
In Fig. 1(c), the white elements are 0.

4. Simulation results
In this section, we show some simulation results. All theoriginal templates in this section are found in [8].

- 488 -

4.1. Noise Reduction

Figure 2 shows the simulation results using combination
template. Figure 2(b) shows the simulation results using only
First, the eﬀective noise reduction results using combina- “Small Object Remover” template for an input image withtion template are shown. The original templates are “Small various size of spot noises. We can see that the “Small ObObject Remover” template and “Patch Maker” template. We ject Remover” template cannot remove relatively large spotset the “Small Object Remover” template as Template 1 and noises at all. Figures 2(c), (d), (e) and (f) show simulation rethe “Patch Maker” template as Template 2.
sults using combination template with diﬀerent mixing rates.
In Fig. 2(c), all noises removed and the two large objects are
S mall Ob ject Remover (T emplate 1) :little distorted. However, when the ratio of the “Patch Maker”

template is larger than 30%, the output image becomes com 1 1 1  0 0 0 
A1 =  1 2 1  , B1 =  0 0 0  , I1 = −1. (12) pletely black.

Remark: In this simulation, the mixing rate p=1.0 gives al1 1 10 0 0
most similar identical output image to the case that the stanBy using this template, large objects remain and small objects dard CNN with the “Small Object Remover” template is used.
are removed from input binary images.
However, the output is not always the same even if we choose
p=1.0. Because the template 1 is expanded to 5x5 size andPatch Maker (T emplate 2):
this can cause a diﬀerent eﬀect to the image. This meansthat the choice of template 1 or 2 is important in this tem 0 0 0 
 0 1 0 

A2 =  1 2 1  , B2 =  0 1 0  , I2 = 4.5. (13) plate design method. In this noise reduction performance, we
consider that the large noises can be removed by setting the0 0 00 1 0“Small Object Remover” template outside of the combination
By using this template, black objects are expanded without template.
limit.
4.2. Edge Detection
Secondly, the eﬀective edge detection results using combination template are shown. The original templates are “EdgeDetection” template and “Optimal Edge Detector” template.
We set the “Edge Detection” template as Template 1 and the“Optimal Edge Detector” template as Template 2.
(a) Input image(c) p = 0.8.

(b) p = 1.0.

(d) p = 0.7.

Edge Detection (T emplate 1) : −1 −1 −1 0 0  , B1 =  −1 8 −1  , I1 = −1.

−1 −1 −10(14)By using this template, the edges in binary images can bedetected.
 0A1 =  0
0010

Optimal Edge Detector (T emplate 2):

A2

=I2

=

 0 000.

000 −0.11 00 
0  , B2 =  −0.28 0−0.11 00
0.11 

0.28  ,0.11(15)

By using this template, output images become gray-scale andedges in horizontal direction are enhanced.
Figure 3 shows the simulation results using combination(e) p = 0.6.
(f) p = 0.5.
template. Figure 3(b) shows the simulation result using only
Figure 2: Simulation results using combination template of the “Optimal Edge Detector” template. In this result, we canSmall Object Remover Template (Template 1) and Patch see that the edge of the mast in the left region of the input
Maker Template (Template 2) with diﬀerent mixing rates.
image can be detected. Figure 3(c) shows the simulation result using only the “Edge Detection” template. In this result,- 489 -5. Conclusions
In this study, we have proposed the template design methodof the CNN by combining existing templates. By computer
simulations of simple image processing tasks for both binary
images and gray-scale images, we investigated the basic output characteristics of the proposed systems. As we expected,
we could confirm the eﬀects of both templates by combining them. At the moment, we do not say that the proposed
method exhibited a superior performance than the original
CNN. However, we feel that we obtained some results tobroaden the research on the CNN design.

(a) Input image.

Acknowledgment(b) p = 0.

(c) p = 1.0.

This research was partly supported by the found of Open Research Center Project from MEXT of Japanese Government(2007-2011).
References(d) p = 0.8.

[1] L.O. Chua and L. Yang, “Cellular Neural Networks:Theory,” IEEE Trans. Circuits Syst., vol. 32,
pp. 1257-1272, Oct. 1988.

(e) p = 0.6.

[2] F. Dirk and T. Ronald, “Coding of Binary Image Datausing Cellular Neural Networks and Iterative Annealing,”
Proc. of ECCTD’03, vol. 1, pp. 229-232, Sep. 2003.

(f) p = 0.4.

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

(g) p = 0.2.

Figure 3: Simulation results using combination template ofEdge Detection Template (Template 1) and Optimal Edge Detector Template (Template 2) with diﬀerent mixing rates.

we can see that the edges of the input image are not visible
clearly. Figures 3(d), (e), (f) and (g) show simulation results
using combination template with diﬀerent mixing rates. InFig. 3(e), the edge of the mast in the left region of the input
image can be detected more clearly than using only the “EdgeDetection” template. From these results, we can say that theedge detection performance is improved by the both eﬀects
of the two templates.
We should mention that the proposed designing method
create new templates but the created templates are normal
5x5 space-invariant template. This means that the theory ofthe standard CNN can be applied to the CNN using proposed
template design method.

[4] H. Koeppl and L.O. Chua, “An Adaptive Cellular Nonlinear Network and its Application,” Proc. of NOLTA’07,pp. 15-18, Sep. 2007.
[5] J. Kishida, C. Rekeczky, Y. Nishio and A. Ushida, “Feature Extraction of Postage Stamps Using an Iterative
Approach of CNN,” IEICE Trans. on Fundamentals,
vol. E79-A, no. 10, pp. 1741-1746, Oct. 1996.
[6] Á. Zarándy, “The Art of CNN Template Design,” Int. J.
Circ. Theor. Appl., vol. 27, no. 1, pp. 5-23, Jan.-Feb.
1999.
[7] T. Inoue, M. Nakano and Y. Nishio, ”Output Characteristics of Cellular Neural Networks Using Mixture Template,” Proc. of IJCNN’08, pp. 4124-4129, Jun. 2008.
[8] Cellular Sensory Wave Computers Laboratory Computerand Automation Research Institute Hungarian Academyof Sciences, “Cellular wave Computing Library (Template, Algorithms, and Programs) Version 2.1”

- 490 -