This action might not be possible to undo. Are you sure you want to continue?
Neural Network for Connected Component Detection.
S. ElDin, A. K. Abol Seoud, and A. ElFahar
Electrical Engineering Department
University of Alexandria
Alexandria, Egypt.
Email: eng_salah_alx@yahoo.com
ABSTRACT In this paper, we describe an analog VISI
implementation of a Cellular Neural Network (CNN) for
Connected Component Detector (CCD) applications. In this
implementation, a novel compact network architecture based on
a lowpower CMOS realization has been employed. The
functionality of the proposed network has been verified through
SPICE simulations for 1D vectors of arbitrary blackandwhite
pixels.
Keywords: Cellular Neural Network, Lowpower CMOS, Connected
Component Detector.
I. INTRODUCTION
The connected component detector (CCD) (alternatively
called connected component analysis, blob extraction, blob
discovery, region labeling, or region extraction) is an
algorithmic application of graph theory, where subsets of
connected components are uniquely labeled based on a given
heuristic. The CCD is used in computer vision to detect
connected regions in binary digital images, although color
images and data with higherdimensionality can also be
processed [1, 2]. When integrated into an image recognition
system or humancomputer interaction interface, the CCD can
operate on a variety of information [3, 4]. Blob extraction is
generally performed on the resulting binary image from a
threshold step. Blobs may be counted, filtered, and tracked.
Blob extraction is related to but distinct from blob detection
[5]. In this paper, starting from the function of Connected
Component Detection [6], and through the proposed low
power CNN cell circuit with oppositesign templates [7, 8], we
can realize a complete pattern for VLSI CCD. By using a
bipolar pattern [9], we can represent the transient behavior.
Performance of the transient behavior is evaluated using
PSPICE simulation.
II. CONNECTED COMPONENT DETECTION
FUNCTIONALITY
For VLSI implementation of CNNs, it is usual to consider
simplified versions of the ChuaYang model in order to reduce
circuit complexity [10]. A cellular system was defined as a
structured collection of identical elements called cells.
Consider the analog processing cell circuit, henceforth called a
cell, as shown in Fig.1(a), with only one nonlinear element
whose characteristics is shown in Fig.1(b). This cell is located
M. ElSayed Ragab
School of Electronics, Comm. and Computer Eng.
EJUST.
Alexandria, Egypt.
Email: m.ragab@ejust.edu.eg
in the ( i , j ) position of a twodimensional regular array of
N M × cells. The rneighborhood ( ) j i
Nr
, of a typical
cell ( ) j i C , is defined as:
( ) ( ) ( ) { } ) ( , max , , , eger t in r j l i k l k C j i
Nr
= ÷ ÷ = (1)
An r =1 neighborhood of a cell within a cell array consists of
all those cells shown shaded in Fig.1(c).
(a)
(b) (c)
Figure 1. The cell circuit model and its neighborhood in a cell array. (a) The
cell circuit model (b) The characteristics of the single nonlinear element of the
cell (a voltagecontrolled current source). (c) An r =1 neighborhood in a part
of a cell array.
The dynamical system equations describing the ChuaYang
CNN model shown in Fig. 1, are expressed as:
1) State equation:
¯
¯
e
e
+ +
+ ÷ =
) , ( ) , (
) , ( ) , (
) ( ) , ; , (
) ( ) , ; , ( ) (
1
j i l k C
ukl
j i l k C
ykl xij
x
xij
N
I t l k j i B
N
t l k j i A t
dt
C
r
r
V
V V
R
dV
(2)
where . 1 ; 1 N j M i s s s s
2) Output equation:

.

\

÷ ÷ + = 1 ) ( 1 ) ( 5 . 0 ) ( t t t
V V
V
xij xij
yij
(3)
(IJCSIS) International Journal of Computer Science and Information Security,
Vol. 9, No. 6, June 2011
148 http://sites.google.com/site/ijcsis/
ISSN 19475500
3) Constraint conditions:
. 1 ; 1 ) 0 ( s s
V V
uij xij
and
where u, x and y refer to the input, state, and output,
respectively.
It is noted that the network defined by the above set of
equations is completely stable if the selffeedback coefficient
1 ) , ( > j i A and the symmetry conditions
) , ; , ( ) , ; , ( j i l k A l k j i A = are satisfied [10]. However, from
an applications point of view, nonsymmetrical templates are
also of interest and the associated stability properties have to
be considered. An interesting class of CNN with oppositesign
templates is defined by the Atemplate values satisfying the
following structures and sign conditions:
÷ =
0 0 0
0 0 0
s p s A (4)
where 1 > p and 0 > s . Moreover, because the stability of
the network is controlled by matrix A, the part of state
equation (2), given by
, ) ( ) , ; , (
) , ( ) , (
I t
N
l k j i B
j i l k c
ukl
r
V
+
¯
e
is
not of interest and can be taken equal to zero. In such a type of
networks, three important subclasses have been investigated
depending on the relationship between the coefficients p and s
[6]:
i) If s > p1, the network will have no stable equilibrium
states.
ii) If s < (p1)/2, the network is completely stable.
iii) If s is in the interval ((p1)/2,(p1)), the complete stability
is strongly conjectured because in some saturation regions, in
which , 1 >
Vxij
there exists no equilibrium states.
The network subclass (iii) has led to an interesting application
in digital image processing, the connected component
detection (CCD), in which the dynamics of a cell chain
consisting of black ) 1 ( >
Vxi
and white ) 1 ( ÷ <
Vxi
pixels, with an initial pattern, will converge to a final pattern
having the CCD properties. To be specific, we consider the
following two basic combinations in the cell chain:
the combination tends toward ; and
the combination tends toward .
In fact, the natural results of this dynamical behavior have led
to the functionality of the CCD, as follows
Each onecolored connected region of cells will be shifted to
the right and finally compressed into a single cell with this
same color. Then these compressed cells will line up at the
right hand end of the cell chain. Finally the one –colored
leftmost region will expand to the alternatingcolored cells at
the right.
Fig. 2 shows two examples of two CCD operations in two
different cell chain
{ } 1 , 1
12
÷
, and
{ } 1 , 1
25
÷
.
initial pattern
final pattern
(a)
nitial pattern
final pattern
(b)
Figure 2. The initial states and final states of a CCD
(a) for
{ } 1 , 1
12
÷
cell chain.(b) for
{ } 1 , 1
25
÷
cell chain.
III. LowPower CMOS Implementation of a CNN cell.
In this section, a practical low power VLSI implementation of
a simplified version of the CNN model is presented, together
with simulation results. Fig. 3 shows a block diagram for the
CNN cell model.
Figure 3. Block diagram of CNN cell.
It includes an integrator that has as inputs weighted
contributions of the outputs and inputs of the set of m cells in a
neighborhood of cell c. V
xij
is the state of cell C
ij
, with an
initial condition V
xij
(0), R
x
C conforms the integration time
constant of the system. The cell output is V
yij
(t) = f (V
xij
(t)),
where f can be any convenient nonlinear function. The block
A can be implemented using a set of four quadrant multipliers
whose inputs are the outputs of the cells within the assumed
neighborhood and the template A values. Similarly, block B
can be implemented using a set of four quadrant multipliers
whose inputs are the inputs of the cells within the assumed
neighborhood and the template B values. The outputs of
blocks A and B are (in the current form)
I xy
and
I xu
,
respectively. Those currents are summed with the bias current
I of the cell and then integrated in the R
x
C circuit, to result in
the cell state voltage V
xij
. The output voltage of the cell Vy
ij
is
obtained through the limiting transfer function f(V
xij
).
Alternatively, the nonlinear transfer function f(V
xij
) can be
incorporated in the multiplier circuits themselves, resulting in
a small area CNN cell. This can be realized using lowpower
(IJCSIS) International Journal of Computer Science and Information Security,
Vol. 9, No. 6, June 2011
149 http://sites.google.com/site/ijcsis/
ISSN 19475500
B
B0 B1 B2 B3 B4
I0
I0 I1 I2 I3 I4
Vdd
Vgg
Ib
V1 V2
V3 V3
I1
I2
Io
Vdd Vdd
V4
Vdd Vdd
Va
CMOS four quadrant multipliers operating in weak inversion
regime. The basic difference with respect to the original Chua
Yang model is that a sigmoidlike function, instead of the
conventional piecewiselinear function, is used to generate the
cell output.
The proposed circuit of a programmable lowpower CMOS
four quadrant multiplier and its circuit symbol are shown in
Fig. 4 [11]. It is composed of registers which store the weight
values, a linear DAC, and a tranconductance amplifier. The
cell has five bits. Each bit is controlled by a pass transistor.
Assuming weak inversion operation for all MOS devices in the
multiplier circuit, it can be shown that the output current Io is
expressed as:
¦
¦
¹
¦
¦
´
¦
÷
÷
÷
+
= ÷ =
high is and low is if k
low is and high is if k
V V
V V
I
V V
V V
I
I I I
b
b
o
4 3
2 1
4 3
2 1
2 1
))
2
( tanh(
))
2
( tanh(
(5)
where
nUT
k
1
=
, with n is a slope factor ( in practice it lies
between 1 and 2 and is close to 1 for high values of gate
voltage), and U
T
is the thermal voltage whose value is 26mV
at room temperature. Current switching logic controlled by V
3
and V
4
enables the output to change sign. It is noted that the
output current is linearly proportional to one of the multiplier
inputs, I
b
, and varies nonlinearly with the other input, (V
1
V
2
).
The transfer characteristic of the multiplier circuit is shown in
Fig. 5
u
u
(a)
(b)
Figure 4. (a) circuit diagram of programmable lowpower CMOS four
quadrant multiplier and (b) its circuit symbol.
Figure 5. The transfer function of the proposed circuit
Fig. 6 shows a complete implementation of a CNN cell using
the proposed multiplier circuit. The sets of multipliers in the
lower and upper parts of Fig.3 represent the second and third
terms in the left hand side of equation (2), respectively. Each
multiplier in the lower set accepts one of the cells' outputs
within the given neighborhood, as one input, and the
corresponding template value A () as the other input. The A
template values are determined by the programmable tail
current sources I
b,y
and their signs are controlled by the
multiplier control inputs V
3
's and V
4
's. On the other hand, each
multiplier in the upper set accepts one of the cell's inputs
within the given neighborhood as one input, and the
corresponding template value B () as the other input. Also,
those B template values are determined by the programmable
tail current source, I
b,u
and their signs are controlled by the
corresponding multiplier control inputs V
3
's and V
4
's. The
output currents of the two multiplier sets are summed together
and applied to the R
x
C current integrator. The resistor R
x
is
implemented using the diodeconnected transistor M
r
.
Io,u1
Vu1
Vcom
Ib,u1
I
Mr C
Vx
Vdd
V4,u1 V3,u1
Vcom
Io,u2
Vu2
Vcom
Ib,u2
V4,u2 V3,u2
Vcom
Io,y2
Vy2
Vcom
Ib,y2
V4,y2 V3,y2
Vcom
Io,y1
Vy1
Vcom
Ib,y1
V4,y1 V3,y1
Vcom
Vun
Vyn
Cells’ inputs
u(Nr)
Cells’ outputs
y(Nr)
Figure 6. Complete CNN cell.
V1
V2
Io
Ib
V3 V4
(IJCSIS) International Journal of Computer Science and Information Security,
Vol. 9, No. 6, June 2011
150 http://sites.google.com/site/ijcsis/
ISSN 19475500
IV. SIMULATION EXAMPLE:
Fig. 7 shows three adjacent cells
C C C i i i 1 1
, ,
+ ÷
in a 1D
CNN with oppositesign templates.
Figure 7. Three adjacent cells in a 1D CNN with oppositesign template.
The cells" inputs and their bias terms are set to zero. The state
equations of the cell
Ci
can be described by:
) ( ) ( ) (
1 1 x x x x x i i i i i
f s f p f s
+ ÷
÷ + = +
(5)
Fig 8. shows a complete implementation of 1D oppositesign
template CNN of 12 cells. Note that in such an architecture the
cell's state voltage , ,
1 V V xi xi÷
and
Vxi 1 +
are directly
fedback to their cells and the nonlinear
functions ), ( ), (
1 x x i i
f f
÷
and ) (
1 xi
f
+
are already
embedded in the multipliers' transfer characteristics. As
previously stated, this would guarantee compact CNN design
architectures. The state equations resulting from such an
implementation are then expressed as:
) ( ) ( ) (
1
1 1 1 1 V I a V I a V I a V
R
V
xi bo i xi bo i xi bo i xi
x
xi
f f f
dt
d
C
+ + ÷ ÷
÷ + + ÷ =
(6)
where,
Rx
is the resistance of the diodeconnected transistor,
= ) (
Vx
f tanh
)
2
(
Vx
K
, and , ,
1 a a i i÷
and
ai 1 +
represent
the templateA values of the network.
Figure 8. Complete circuit of 12 cells 1D oppositesign template CNN.
The network of Fig.8 has been employed to function as a
CCD for the
{ } 1 , 1
12
÷
cell chain of Fig. 2(a). The
template
a a i i
,
1 ÷
and
ai 1 +
values are taken as [6,12]:
    1 2 1 , ,
1 1
÷ =
+ ÷ a a a i i i
(7)
which correspond to the stability criterion (iii) discussed in
section 2. The initial state condition of each cell is set by
adjusting the initial voltage of the capacitor at the cell output.
Figure 9. Transient Behavior of the
{ } 1 , 1
12
÷
cell chain of Fig. 2 (a).
Note that a "High" voltage corresponds to a "black" pixel and
a "Low" voltage corresponds to a "white" pixel. Fig.9 shows
the transient response of the cells' states obtained from SPICE
simulations. It is clear that the steady state behavior of the
cells conforms the expected CCD behavior of the example
shown in Fig. 2(a).
IV. Conclusion
Cellular neural networks (CNN's) with oppositesign templates
have been successfully applied in connected component
detection (CCD). A novel circuit architecture based on low
power CMOS fourquadrant multipliers has been employed to
realize such a type of networks. The proposed architecture has
been applied to the case of 1D CNN functioning as a CCD.
The CCD functionality of the network has been verified
through SPICE simulations.
(IJCSIS) International Journal of Computer Science and Information Security,
Vol. 9, No. 6, June 2011
151 http://sites.google.com/site/ijcsis/
ISSN 19475500
REFERENCES
[1] H.Samet and M.Tamminen "Efficient Component Labeling
of Images of Arbitrary Dimension Represented by Linear
Bintrees". IEEE Transactions on Pattern Analysis and
Machine Intelligence (1988).
[2] Michael B. Dillencourt, Hannan Samet, and Markku
Tamminen "A general approach to connectedcomponent
labeling for arbitrary image representations". J.ACM volume
39, issue 2, April 1992.
[3] Weijie Chen, Maryellen L. Giger and Ulrich Bick "A
Fuzzy CMeans (FCM) Based Approach for Computerized
Segmentation of Breast Lesions in Dynamic Contrast
Enhanced MR Images". Academic Radiology volume 13,
issue 1, pages 6372, January 2006.
[4] Kesheng Wu, Wendy Koegler, Jacqueline Chen and Arie
Shoshani "Using Bit map Index for Interactive Exploration of
large Datasets". 15 the Inter National Conference on Scientific
and Statistical Database Management, SSDBM, pp.65, 2003.
[5] Kenji Suzuki and Isao Horiba and Noboru Sugie "Linear
Time connectedcomponent labeling based on sequential local
operations". Computer Vision and Image Understanding
(2003).
[6] Fan Zou and Josef A.Nossek "Stability of Cellular Neural
Networks with OppositeSign Templates," IEEE Trans.
Circuits & Syst. vol. 38, mo. 6, June 1991.
[7] Hisashi Tanaka, Koichi Tanno, Hiroki Tamura and Kenji
Murao "LowPower CMOS CNN Cell and its Application to
an Oscillatory CNN," The 23
rd
International Technical
Conference on Circuits/Systems, Computers and
Communications (ITCCSCC 2008).
[8] L.O.Chua, Fellow, IEEE, and Tamas Roska,
Member,IEEE, "Stability of a Class of Nonreciprocal Cellular
Neural Networks," IEEE Trans. Circuits & Syst. vol., 37, no.
12, December 1990.
[9] T.MATSUMOTO, L.O.CHUA, and H.SUZUKI " CNN
Cloning Template : Connected Component Detector " IEEE
Trans. Circuits & Syst. Vol., 37, no. 5, May 1990.
[10] L.O.Chua and L.Yang, "Cellular Neural Network:
Theory," IEEE Trans. Circuits
& Syst., Vol. 35, no. 10, pp. 12571272, oct.1988.
[12] S.ElDin, M.ElSayed, A.K.A.EiSeoud, and A.ElFaher
"A LowPower Programmable CNN and its Application to
Stability of CNN with OppositeSign Templates". Accepted
for publication international Journal of Computer Science and
Information Security vo l9, no 5, May 2011.
[12] J.M.Cruz and L.O.Chua, "A CNN chip for connected
component detection," IEEE Trans. Circuits Syst., Vol. 38, pp.
812816, July 1991.
(IJCSIS) International Journal of Computer Science and Information Security,
Vol. 9, No. 6, June 2011
152 http://sites.google.com/site/ijcsis/
ISSN 19475500