2007 RISP International Workshop on Nonlinear Circuits and Signal Processing (NCSP'07)
Shanghai Jiao Tong University, Shanghai, China, Mar. 3-6, 2007

Analysis of Edge Detection Using Direction-Preserving Small World Cellular Neural Networks
Masaru Nakano and Yoshifumi Nishio
Tokushima University
2-1 Minami-Josanjima, Tokushima, Japan
Phone:+81-88-656-7470, Fax:+81-88-656-7471
Email: {nakano, nishio}@ee.tokushima-u.ac.jp

Abstract

In this article, we improve network topology of this DPSWCNN to find useful characters. Differences between TsuA few years ago, Tsuruta et al. have proposed Direction- ruta’s DP-SWCNN [4] and our DP-SWCNN are described
Preserving Small World Cellular Neural Networks (DP- in Section 2. We investigate the characteristic of our DPSWCNN). They investigated the performance of the network SWCNN by applying them to edge detection of gray scaleby changing structure of the network keeping the number images and show some interesting results.
of all branches. In this article, we propose an improved
DP-SWCNN with new network topology and investigate theavailability for edge detection of gray scale images.
2. Network topology of proposed DP-SWCNN
1. Introduction
Studies of network map are very important, because they
help us to understand the basic features and requirements ofvarious systems. So far many connection topologies of network assumed to be either completely regular or completely
random have been studied in the past. Cellular Neural Network (CNN) model invented by Chua and Yang in 1988 [1]is a typical of those completely local connectivities, which ispresented as a preferred implementation of locally and regularly coupled neural networks. The CNN has been successfully used for various high-speed parallel signals processingapplications such as image processing, pattern recognition as
well as modeling of various phenomena in nonlinear systems[1][2]. However, in many cases in real life, many network
topologies such as biological, technological and social networks are known to be not completely random nor completely
local but somewhere in between. This was modeled in an interesting work by Watts and Strogatz in 1998 [3] as the smallworld model. The model is a network consisting of many
local links and fewer long range Shortcut. Therefore, it has
a high clustering coefficient like regular lattices and a shortcharacteristic path length of typical random networks. Interesting examples are shown by collaboration of movie stars,
connectivity of internet web pages or neural nets, etc.
Recently, Tsuruta et al. have proposed Direction Preserving Small World Cellular Neural Network (DP-SWCNN) [4].
They have reported that several kinds of image processing(e.g. edge detection, small object removers, etc.) come tolearn to react more adaptable.

Figure 1: Structure and network topology of CNN.
In this section, we describe network topology of the proposed SWCNN with a two-dimensional M by N array structure. First, we explain structure of CNN simply. CNN has
M × N cell circuits as Fig. 1. Cells are arranged in a reticular pattern to M line N row. We represent a cell C(i, j) using
a variable i which denotes vertical position and a variable jwhich denotes horizontal position. Differences between Tsuruta’s DP-SWCNN [4] and our DP-SWCNN are as follows.
• The number of shortcuts of each cell is seven or less. (Inthe case of the boundary cells, the number is five, and in
the case of the corner cells, the number is three.)• The neighboring connections of both cells connected bya shortcut are cut if they have the same direction as theshortcut.

- 145 -• The distance between two cells connected by a shortcut
has a limitation length Lm.

1(|xij (t) + 1| − |xij (t) − 1|)2
i = 1, 2, ...., M, j = 1, 2, ...., N.

yij (t) =The probability p is defined by the following equation.

p=

total number of shortcuts
total number of connections

(3)

(1)
1.2

C(p)
L(p)

1

The number of shortcuts of the cells have are almost even.
Namely, if the value of p equals 0.5, the number of shortcutsof the cells is almost four. (if it equals 0.25, the number isalmost two, and if it equals 0.125, the number is almost one.)
Figure 2 shows some examples of the network topology ofC(i, j).

0.8

0.6

0.4

0.2

01e-04

0.001

0.01
p0.1

1

Figure 3: Characteristic path length L(p) and clustering coefficient C(p) of proposed DP-SWCNN.
(a)

(b)

(c)

In equation (2), Nr (i, j) are neighboring connected cells
Figure 2: Examples of network topology of C(i, j). Blackcell represents C(i, j). Gray cells represent the connected of C(i, j), while gij denotes the cells connected by shortcuts
cell with C(i, j) . (a) p = 0.5, Lm = 2. (b) p = 0.25, to C(i, j). a and b represent the positions of shortcuts.
Lm = 4. (c) p = 0.125, Lm = 8.
Next, in order to investigate the feature of the network, we
calculated the characteristic path length L(p) and the clustering coefficient C(p) as varying p. The characteristic path
length L(p) is defined as the number of edges in the shortest path between two vertices, averaged over all pairs of vertices. The clustering coefficient C(p) is defined as follows;
Supposes that a vertex v has kv neighbors; then at mostkv (kv − 1)/2 edges can exist between them. Let Cv denotethat fraction of these allowable edges that actually exist. Define C(p) as the average of Cv over all v. The results areshown in Fig. 3.
Next, we show the state equation of each cell C(i, j): A,
B, and I are real constants called as feedback template, control template and current, respectively; xij , yi,j , and ui,j denote the state, input and output of the cell, respectively.
ẋij (t) = −xij (t) + I +X

A(i, j; k, l)ykl (t)X

B(i, j; k, l)ukl (t)C(k,l)∈N r(i,j)++gij

A(i, j; a, b)yab (t) +X
gij

B(i, j; a, b)uab (t)Image processing is one of important applications of theCNN. Edge detect operation is one of them. In this section, we investigate the effect of applying the proposed DPSWCNN to edge detection.
3.1. Edge detection template
The edge detection extracts edges of objects in a binary
image where each black pixel with at least one white nearest
neighbor is defined to be an edge cell. Equation (4) is thetemplate which is designed for the original CNN to perform
edge detection of binary images.

0 0 0−1 −1 −1
A =  0 1 0  , B =  −1 8 −1  , I = −1.
0 0 0−1 −1 −1(4)3.2. Original CNN

C(k,l)∈N r(i,j)

X

3. Simulation(2)

Figure 4 shows the simulation results of edge detection ofa gray scale image using the original CNN with the template- 146 -

(4). Figure 4(a) is input image and (b) is output image. From
Fig. 4, it is clear that this processing is weak for the grayscale image. Because, the template (4) is designed to work
well for binary input images only. We can obtain different
outputs for different values of the threshold I in the template(4). Figure 5 shows the output images when the threshold Iis changed. As increases I, the edges are extracted clearer.
However, many noises are also extracted.

(a)3.3. DP-SWCNN
We apply the same template to the proposed DP-SWCNN
with different probability p and limitation length Lm. p and
Lm are parameters which characterize the DP-SWCNN. Figure 6 shows the simulation results with different Lm where
p is fixed to 0.5. From the results, we can say that the performance of the DP-SWCNN is better than the original CNN,
because fuzzy edges which the original CNN cannot extract
are able to be extracted. However, when Lm increases, theoutput image include more noises.
Figure 7 shows the simulation results with different p
where Lm is fixed to 4. From the results, we may say thathigher p gains better performance.
Next, Fig. 8 shows the simulation results with changing
threshold I where p = 1 and Lm = 4. From the results,
more fuzzy edges are extracted as I decreases, but a lot ofnoises are also extracted.

(b)

Figure 4: Input image and output image of original CNN. (a)Input image. (b) Output image.

(a)

(b)

(c)

(d)

(a)

(b)

(c)

(d)

(e)
(f)
Figure 5: Output images of original CNN with changing
threshold I.
(a) I = −0.8.
(b) I = −0.5.
(c) Figure 6: Output images of DP-SWCNN with changing Lm.
(a) Lm = 2. (b) Lm = 3. (c) Lm = 4. (d) Lm = 8.
I = −0.3. (d) I = −0.1.
(e) Lm = 20. (f) Lm = 50.

- 147 -

(a)

(b)

(a)

(b)

(c)

(d)

(c)

(d)

(e)

(f)

(e)

(f)

Figure 7: Output images of DP-SWCNN with changing p.
(a) p = 0.125. (b) p = 0.25. (c) p = 0.37. (d) p = 0.5. (e)p = 0.67. (f) p = 1.

Figure 8: Output images of DP-SWCNN with changing
threshold I where p = 1 and Lm = 4. (a) I = 0.8. (b)I = 0.6. (c) I = 0.4. (d) I = 0.2. (f) I = 0.1.

4. Conclusions[3] D.J. Watts and S.H. Strogatz, “Collective Dynamics Of
Small-World Networks,” Nature, 393, pp. 440-442, 1998.

In this article, we have proposed new network topology ofDP-SWCNN and investigated the features and the usefulness.
We have applied the proposed DP-SWCNN to edge detectionof gray scale images and have confirmed its efficiency.
References[4] K. Tsuruta, Z. Yang, Y. Nishio, A. Ushida, “Diffusion
Analysis of Direction-Preserving Small-World CNN,”
Proceedings of IEEE International Workshop on Cellular Neural Networks and their Applications (CNNA’04),
pp. 352-357, Jul. 2004.

[1] L.O. Chua and L. Yang, “Cellular Neural Networks: Theory And Applications,” IEEE Trans. Circuits & Syst., vol.
35, pp. 1257-1290, Oct. 1988.
[2] K. Tsuruta, Z. Yang, Y. Nishio, A. Ushida, “Small-World
Cellular Neural Networks for Image Processing Applications,” Proceedings of European Conference on Circuit
Theory and Design (ECCTD’03), vol. 1, pp. 225-228,
Sep, 2003.

- 148 -