2007 International Symposium on Nonlinear Theory and itsApplications
NOLTA'07, Vancouver, Canada, September 16-19, 2007

A Method of Edge Detection Using Small World Cellular Neural Network
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

tection, small object removers, etc.) come to learn to react
more adaptable. We have clarified that we could control theA few years ago, Tsuruta et al. have proposed Small World performance of the SWCNN by changing the characteristics
Cellular Neural Networks (SWCNN). SWCNN is the sys- of the shortcuts (the length, the number, and the direction) in
tem that shortcut connections are introduced into the original the SWCNN [5].
CNN and can be applied to some image processing tasks. We
In this article, we propose a new SWCNN system for better
have investigated the performance of the SWCNN by chang- edge detection of gray scale images. We investigate the charing the structure of the network keeping the number of all acteristics of our SWCNN by applying them to edge detection
branches same and have clarified that the SWCNN can real- of gray scale images and show some interesting results. Furize edge detection of gray scale images. In this article, we ther, we propose some improvements of the method.
propose a new SWCNN system for better edge detection ofgray scale images.
2. Original CNN and edge detection

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 processing
applications such as image processing, pattern recognition as
well as modeling of various phenomena in nonlinear systems.
However, in many cases in real life, many network topologies such as biological, technological and social networks areknown 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 [2] as the small-worldmodel. 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 short characteristic path length of typical random networks. Interesting examples are shown by collaboration of movie stars, connectivityof Internet web pages or neural nets, etc.
Recently, Tsuruta et al. have proposed the Small World
Cellular Neural Network (SWCNN) [3][4]. They have reported that several kinds of image processing (e.g. edge de-The edge detection is one of very important image processing tasks. By using CNN, we can realize to conduct the task
on analog processing. Our proposed system has the same baseof the original CNN. In this section, we describe the structureof the original CNN and the simulation results for gray scaleimages.

Figure 1: Structure and basic network topology of CNN.

The CNN has nonlinear processing units called cells. 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 j which denotes horizontal position.

- 71 -

The state equation of the cell is represented as follow.
Xẋij (t) = −xij (t) + I +A(i, j; k, l)ykl (t)C(k,l)∈N r(i,j)+X

B(i, j; k, l)ukl (t)(1)

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

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

yij (t) =Nr (i, j) = {C(k, l)| max |k − l|, |l − j| < r,
1 < k < M; 1 < l < N}

(a)

(b)

(c)

(d)

(2)

(3)

In the state equation, x, y and u are state, output, and input,respectively. And, A(i, j; k, l), B(i, j; k, l) and I are constantparameters and we call them the template.
CNN can conduct various kinds of image processing tasks
by setting the values of the template. The template for edge
detection designed for binary images is as follows.

Figure 2: Edge detection of a gray scale image using the original CNN with different threshold values I. (a) Input image.
(b) I = −1.0. (c) I = −0.8. (d) I = −0.3.

−1 −1 −10 0 0
A =  0 1 0  , B =  −1 8 −1  , I = −1.
−1 −1 −10 0 0(4) neighboring connection with the same direction must be cut.
We assume that the length of the shortcut connections is thesame and is denoted by the parameter Lm.
Figure 2(b) shows the result of the edge detection usingThe shortcut connections of C(i, j) can be made, if thethe original CNN with the template (4). We can say that the inputs of neighboring cells included in Nr (i, j) in Eq. (3)result is not good. A simple method to improve the perfor- satisfy the below condition (5).
mance is changing the threshold value. Figures 2(c) and (d)show the results for different threshold values I. We can obumin ≤ |uij − ukl | ≤ umax
(5)tain the improved results. However, at the same time much
0noise appears. As a major factor of this phenomenon, it was The neighboring set Nr (i, j) is modified to Nr (i, j) by rethought that the cells in the CNN only have the connection moving the neighbor cell C(k, l) and adding the destination
to adjoin cells. In gray scale images, the edges included in cell C(a, b), which is the cell located Lm away from C(i, j)
the image have a margin of obscurity, therefore the difference to the same direction as C(k, l).
The state equation is rewritten as follows:
between adjoin cells existing in the obscure edge does not
become larger than the expected value. For this reason, theXẋij (t) = −xij (t) + I +A0 (i, j; k, l)ykl (t)performance of the edge detection by using the original CNN
C(k,l)∈N r 0 (i,j)
is not good.
X+B 0 (i, j; k, l)ukl (t)(6)
03. Network topology of SWCNN
C(k,l)∈N r (i,j)
To solve the above problem, we must spread the neighboring connections of the cell. However, if we spread the neighboring connections, then the wirings in the CNN become verycomplex. So we propose a new SWCNN system which is theCNN with a few shortcut connections. In our SWCNN system, shortcut connections can be made one per one direction
Therefore, the shortcut connections of one cell can be eightat the maximum. If a shortcut connection is made, then thewhere A0 (i, j; a, b) = A(i, j; k, l) and B 0 (i, j; a, b) =B(i, j; k, l). A0 (i, j; k, l) and B 0 (i, j; k, l) are the parameters corresponding to the shortcuts. Note that the distance
between C(a, b) and C(i,√j) when C(k, l) is in diagonal position is calculated by 1/ 2 × Lm.
Figure 3 shows an example of Nr0 (i, j) with an input forthe parameters umin = 0.1, umax = 0.2 and Lm = 4. For
example, since the input of the left upper neighboring cell- 72 -

-0.1 0.4 0.1
0.2 0.3 0.5
0.4 0.3 0.6
(a)

(b)

Figure 3: Network topology example (b) of Nr0 (i, j) with aninput (a) for the parameters umin = 0.1, umax = 0.2, and Figure 5: Output image using the SWCNN system with difference inputs. The parameters are I = −0.53, umin =Lm = 4.
0.001, umax = 0.2 and Lm = 4.
dose not satisfy the condition (5), the connection to the neighboring cell is preserving. However, since the input of upperneighboring cell satisfies the condition (5), the connection to
the neighboring cell was cut and reconnected to the cell Lmaway by a shortcut.

Figure 5 shows the simulation result using the above system with parameters I = −0.53, umin = 0.001, umax = 0.2,and Lm = 4. From the result, the detected edges are very
thick. To solve the problem, we further improve the state
equation as follows.
ẋij (t) = −xij (t) + I +X

A0 (i, j; k, l)ykl (t)C(k,l)∈N 0 r(i,j)−

B 0 (i, j; k, l) × |uij − ukl |C(k,l)∈N r(i,j)
C(i, j) ∈/ N r(i, j)− C0 ×Figure 4: Output image of the proposed SWCNN with I =−1.0, umin = 0.001, umax = 0.2, and Lm = 4. the proposed SWCNN with
Figure 4 shows the result usingXX

B 0 (i, j; k, l)ukl (t) .

(8)

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

parameters I = −1.0, umin = 0.001, umax = 0.2, andLm = 4. In this result, the obscure edges are detected well The state equation has an additional fifth term newly. Thewith less noise.
new term can thin down the thick detected edges.
4. Difference input system

In the case of gray scale input images, we should consider
that the edges in the image have some kinds of obscurity.
Therefore, there is a possibility that the fourth term of thestate equation (6) approaches zero though the cell exists on
the edges. If the absolute values of the differences are inputted by the feedback, this problem will be solved. Hence,
we modify our SWCNN as follows:Xẋij (t) = −xij (t) + I +A0 (i, j; k, l)ykl (t)C(k,l)∈N 0 r(i,j)−

X

B 0 (i, j; k, l) × |uij − ukl |C(k,l)∈N 0 r(i,j)
C(i, j) ∈/ N r(i, j)

Figure 6: Output images of the SWCNN (8).

(7)

Figure 6 shows the result using the above state equation (8).
However, the once-detected edges which correspond to clear- 73 -edges in the input image disappear. To solve this problem, wechange the network characteristic of the cells existing nearclear edges. So, we define that the shortcut connections are
not made, if the characteristics of the input satisfy the below
condition.
|uij − ukl | < uall ,∀N r(i, j)[5] M. Nakano and Y. Nishio “Analysis of Edge Detection
using Direction-Preserving Small World Cellular NeuralNetworks,” Proceedings of RISP International Workshop
on Nonlinear Circuits and Signal Processing (NCSP’07),
pp. 145-148, Mar. 2007.

(9)

Figure 7: Output images of the SWCNN using condition (9)with uall = 0.3.
Figure 7 shows the result using the condition (9). In thisresults, the proposed system realizes to detect the edges ofboth of obscure edges and high tone edges successfully.
5. Conclusions
In this article, we have proposed new network topology ofSWCNN and have investigated the features and the usefulness. We have applied the proposed SWCNN to edge detection of gray scale images and have confirmed its efficiency.
References[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] D.J. Watts and S.H. Strogatz, “Collective Dynamics Of
Small-World Networks,” Nature, 393, pp. 440-442, 1998.
[3] K. Tsuruta, Z. Yang, Y. Nishio and A. Ushida, “SmallWorld Cellular Neural Networks for Image Processing
Applications,” Proceedings of European Conference onCircuit Theory and Design (ECCTD’03), vol. 1, pp. 225228, Sep, 2003.
[4] K. Tsuruta, Z. Yang, Y. Nishio and 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.

- 74 -