0% found this document useful (0 votes)
5 views

Algorithm Design, On-Chip Implementation, And Applications

Uploaded by

aqsahussain272
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Algorithm Design, On-Chip Implementation, And Applications

Uploaded by

aqsahussain272
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Pixel-Level Snakes on the CNNUM: Algorithm

Design, On-Chip Implementation and


Applications
David L. Vilariño∗ and Csaba Rekeczky+

Department of Electronics and Computer Science
University of Santiago de Compostela
E-15782 Santiago de Compostela, Spain
+
Analogical and Neural Computing System Laboratory
Computer and Automation Institute
Hungarian Academy of Sciences
Kende u. 13-17, H-1111 Budapest, Hungary

Abstract
In this paper, a new algorithm for the cellular active contour tech-
nique called pixel-level snakes is proposed. The motivation is twofold: On
the one hand a higher efficiency and flexibility in the contour evolution
towards the boundaries of interest are pursued. On the other hand a
higher performance and suitability for its hardware implementation onto
a Cellular Neural Network (CNN) chip-set architecture are also required.
Based on the analysis of previous schemes the contour evolution is im-
proved and a new approach to manage the topological transformations
is incorporated. Furthermore new capabilities in the contour guiding are
introduced by the incorporation of inflating/deflating terms based on the
balloon forces for the parametric active contours. The entire algorithm
has been implemented on a CNN Universal Machine (CNNUM) chip set
architecture for which the results of the time performance measurements
are also given. To illustrate the validity and efficiency of the new scheme
several examples are discussed including real applications from medical
imaging.

keywords: Cellular Neural Networks, CNN Universal Machine, Analogic


Algorithms, Cellular Active Contours, Deformable Models.

1
1 Introduction
Since they were introduced by Kass et al. [1] active contours have become a
popular tool in multiple image processing tasks like segmentation, tracking and
modelling. An active contour is defined as an elastic curve which deforms con-
trolled by image features and shape constraints to adapt itself to the boundaries
of the objects of interest. The active contour techniques are usually classified as
either energy-based (parametric models, [1]) or level-set based (implicit models,
[2], [3]). The first, also called snakes, are physically motivated and represent the
contours explicitly as parameterized curves in a Lagrangian formulation. The
second are based on the theory of curve evolution and implement the curves
implicitly as a level set of a higher order function which evolves according to an
Eulerian formulation. This classification obeys to the contour representation,
implementation and capabilities from the operation point of view (particularly,
the capability to manage changes in the contour topology). Nevertheless almost
all of them have in common high computational requirements which might limit
their use in those tasks needing fast time response. This inconvenience is alle-
viated by the development of new strategies for the numerical simulation of the
equations which govern the dynamic of the curve evolution [4, 5, 6, 7, 8] which
usually lead towards a compromise between processing speed and flexibility in
the contour evolution.
As a difference with the commented strategies the cellular active contours
(CAC) appear originally intended to resolve the high computational cost inher-
ent to the classical active contour techniques. They are based on a pixel-level
discretization of the contours and on a massively parallel computation on ev-
ery contour cell which lead to a high speed processing without penalizing the
efficiency of the contour location.
Up to the present two different cellular active contour approaches have been
proposed. In [9] an active wave computing approach is introduced. This consists
of a topographic non-iterative region propagation technique where the contours
are defined by the boundaries of trigger waves. Therefore, as in the level-set
approaches, the contour evolution is implicitly represented as a wavefront prop-
agation. This approach has demonstrated a high flexibility in the contour evo-
lution and like the implicit models gives a simple solution to the changes of
topology required when two different wavefronts collide. Nevertheless in this
kind of techniques sophisticated stop criteria are usually required to conve-
niently control the wave-front propagation which may increase considerably the
computation complexity in real applications.
In [10] the called pixel-level snakes (PLS) are addressed. They represent a
topographic iterative active contour technique where the contours are explic-
itly represented and evolve towards (local) minimal distance curves based on
a metric defined as a function of the features of interest. In the PLS method
contours are guided by local information and regularizing terms dependent on
the contour curvature.
Since PLS were introduced the associated algorithm has undergone differ-
ent improvements and new capabilities were incorporated in several steps. In
[11], a new guiding term derived from the contour itself was embodied allowing
to keep smooth the contour shape and providing a higher robustness against
noise. In [12], new modules were included allowing to handle the topological
transformations usually required when multiple active contours are evolving si-

2
multaneously.
Keeping in mind the characteristics of the commented CAC techniques, we
propose an improved algorithm for PLS which combines the contour evolution
of the previous PLS schemes with the region propagation addressed in [9]. The
result is a novel approach which performs a better contour evolution and a more
efficient management of the topological transformations.
All the steps of the proposed algorithm consist of simple local dynamic con-
volutions and morphological hit and miss operations together with simple arith-
metic and logical operations. Therefore the proposed system meets the require-
ments to be implemented on a Cellular Neural Network (CNN, [13, 14]) chip-set
architecture based on the CNN Universal Machine (CNNUM, [15]) concept. The
algorithm has been already tested on a 64x64 CNNUM chip (ACE4K, [16, 17])
within the ACE-BOX computational infrastructure [18]. All the examples used
to illustrate the capabilities of the algorithm are experimental results from the
on-chip implementation.
The remainder of the paper is organized as follows: In Section 2, a brief
revision of the PLS technique is addressed. In Section 3 the new algorithm is
introduced showing the contributions and comparing the efficiency of the pro-
posed algorithm with previous schemes. In Section 4 the projection on the
CNNUM is discussed. In Section 5 some real-life examples of application are
introduced. In Section 6 the performance of the PLS method against the con-
ventional active contour techniques is discussed and finally, the conclusions are
drawn in Section 7.

2 Pixel-Level Snakes
The PLS are primarily inspired by the energy-based deformable active con-
tours proposed by Kass et al. [1]. In this framework an active contour or snake
evolves from its initial shape and position as a combined action of external and
internal forces. The external forces lead the snake towards features of the im-
age, whereas internal forces model the elasticity of the curve. In a parametric
representation, the snake appears as a curve u(s) = (x(s), y(s)), s ∈ [0, 1], with
u(0) = u(1). Into this scheme of behavior, the active contour will evolve until
to reach a local minimum of the total energy:
 1   2  2 2   1
 ∂u  ∂ u
E(u) = α   + β  2  ds + Pext (u(s))ds (1)
0 ∂s ∂s 0

where the first integral term represents the internal energy of the model. It is
made up of two factors: the membrane energy, which weighs its resistance to
stretching, and the thin-plate energy, that weighs its resistance to bending. The
internal energy is balanced with the energy defined by an external potential
field (Pext ) derived from the image features (second integral term in Eq. 1).
The definition of the external potential depends on the particular applications.
Typical terms are [19, 20]: PI = ±I(u(s)) which attracts the curve to points
of high (or low) intensity, PG = −|∇(Gσ (u(s)) ∗ I(u(s)))|, for the attraction of
the curve towards high gradient points in the image convoluted with a Gaussian
2
filter for the elimination of noise, and PE = −e−d(u(s)) , where d(u(s)) is the
distance to the nearest boundary point, which pushes the contour to the border

3
points obtained by an edge detector filter. In accordance with the calculus of
variations, the contour u(s) which minimizes the energy functional of Eq. 1
must satisfy the Euler-Lagrange equation:
   2 
∂ ∂u ∂2 ∂ u
− α + 2 β 2 + ∇Pext (u(s, t)) = 0 (2)
∂s ∂s ∂s ∂s

In order to numerically compute a minimal energy solution the curve u(s) =


(x(s), y(s)), s ∈ [0, 1] is represented in terms of linear combinations of basis
functions. The most used methods are representations based on local-support
basis functions like the finite differences method [1], the finite elements method
[19] and the B-splines[7].
In the context of PLS, the active contours are discretizated at the same order
as the spatial variable in the image space (pixel-level discretization). The ac-
tive contours are represented as sets of 8-connected activated pixels in a binary
image called contour image. This binary image has the same dimensions as the
original image containing the objects or regions to be defined. The contour evo-
lution consists on an iterative process based on binary and local morphological
operations which perform a directional contour expansion of the active contours
followed by a directional contour thinning along the four cardinal directions.
The goal after each cycle (four iterations, one for each cardinal direction) is to
obtain new well-defined contours slightly shifted and/or deformed in order to
come closer and fit themselves to the boundaries which define the regions of in-
terest. To this end these operations are driven by external forces extracted from
the image under processing and internal forces derived from the contours them-
selves. Given a potential field P(x,y) defined in the image space the so-called
guiding forces which control the contour evolution will be:
∂P ∂P 
F = −∇P (x, y) = − i − j = Fxi + Fyj (3)
∂x ∂y
According with the snake formulation commented above, the contour should
evolve to those directions where the potential field decreases. In a pixel-level
iterative technique only the sign of the component of the guiding forces along
the direction under exploration is actually needed. Therefore, given a direction
of processing the guiding information should be the sign of the component of
the guiding forces along that direction. These operations are performed in the
so-called guiding force extraction module (GFE). Therefore:

OU TGF E (N ORT H) = −OU TGF E (SOU T H) = sgn(Fy ),


OU TGF E (EAST ) = −OU TGF E (W EST ) = sgn(Fx ),

In summary, the output of this GFE module will represent a binary map
with activated pixels in those locations where the potential is decreasing along
the direction under study (thus the contour evolution is allowed towards those
directions). Fig. 1 illustrates the operations in the GFE module. Given a
direction of processing (North, East, South or West) a gradient estimation is
performed on the potential field associated to the image under study. A thresh-
olding operation onto the resulting image produces a binary map containing the
sign of the guiding forces along that direction and indicating the image positions
on which the contour can evolve. Last picture in Fig. 1 includes the contour

4
image and the directions along which the contour will have moved after the
processing along the four cardinal directions.
The external potential should be defined in such a way that the boundaries
of interest coincide with the valleys of the potential field. This is strongly
dependent on the particular application and represents an external input to the
PLS algorithm. On the other hand the internal potential is derived directly
from the active contours. In classical approaches, this term depends on the
tension and the flexion of the contour and it may be measured as a function
of distances among adjacent points according to the considered discretization.
This approach cannot be directly included in the PLS formulation because the
contour is not defined as a predetermined number of discretization points but as
a set of black pixels of a binary image, and its evolution is based on the activation
and deactivation of pixels belonging to this contour image. However the desired
smoothing effect can be obtained by assigning a higher potential values for those
pixels in the contour image situated out of the contour cavities, with respect
to those situated inside. One way to perform this internal potential estimation
(IPE) is by means of a recursive low-pass filtering or diffusion operation acting
on the contour image [11, 21]. Therefore a directional gradient operation acting
on this array will originate positive internal forces which push to reduce the local
curvature and therefore to smooth the contour shape. This approach recalls the
thin-plate energy in parametric deformable-model strategies or the regularizing
term in the implicit formulations. This idea is illustrated in Fig. 2, where one
contour is guided by only this kind of internal forces. It is well known that
a planar closed contour whose evolution relies only on the local curvature will
adopt a circular shape and finally will collapse. This behavior is observed with
the proposed internal potential estimation which demonstrates the curvature
dependence of the approach.
Therefore, the global potential from which the guiding forces of the con-
tour evolution are extracted will be a combination of the internal and external
potentials:
P (x, y) = kint Pint (x, y) + kext Pext (x, y) (4)
where kint and kext are real and positive coefficients which weigh the influence
of each kind of information. The combination of both external and internal
forces would provide more robustness to the contour evolution against noise, as
it is illustrated in Fig. 3.
There is not an exact rule to determine both the number of diffusion steps
and the influence (weight) of this kind of internal potential respect to the ex-
ternal potential. Like in classical active contour techniques they must be deter-
mined heuristically. However, a great precision in the internal potential estima-
tion is actually not required. The main objective of the internal potential use is
to reach a better behavior in the processing of noised information. If the inter-
nal potential is weakly weighed with regards the external potential, anchored
pixels can appear in the locations perturbed by noise. However this situation
leads to sharp contour shapes and, as a consequence, to the increasing of the
internal potential which eventually can overcome the noised external potential.
The image segmentation techniques by means of active contours are usually
applied to problems where the approximate shape and location of the structures
to be delimited are known a priori. Therefore the process can be started from
initial contours close to the objective. However, sometimes the number of ob-

5
jects to be segmented does not coincide with the number of initial contours into
the contour image. This can be because of either a bad initiation process due to
insufficient information about the domain or to the presence of some topologic
transformation between the regions into the scene when an automatic segmen-
tation of an image sequence is being considered. In these situations the collision
between different contours (or different parts of the same contour) may occur.
As it will be showed in the next Section, the pixel-level snakes, due to their
characteristics of evolution and their nonparametric nature, can handle these
changes of topology by simple inspections of the contour map. This capability
notably increases the set of tasks where the PLS can be applied.
In summary, the PLS can be conceptually defined based on three different
modules which interact dynamically (Fig. 4):
1. A module responsible to extract the information to guide the contour
evolution. This includes the derivation of the internal potential from the
contour image and the combination with the external potential from the
image under processing.
2. A module dedicated to the contour evolution. This consists of an iterative
operation of pixel-to-pixel shift of the contours driven by the guiding in-
formation.
3. A module undertaken to handle the possible collision and the required
topologic transformations between contours.
A more detailed description of the PLS performance can be found in [21].

3 Improved PLS algorithm


The algorithm of PLS addressed in [21] has demonstrated a good perfor-
mance in multiple applications where active contour techniques are frequently
used. Nevertheless, in its initial form, it has some drawbacks and exceptions
which reduce the efficiency of the algorithm. In this Section, these limitations
and exceptions are analyzed and illustrated by examples. Then several changes
are proposed which result in a higher performance of the PLS. The modifica-
tions affect the three modules showed in Fig. 4. In the sequel the contributions
are discussed and compared to the previous structure.

3.1 Guiding information extraction


Numerous refinements have been proposed in the literature to improve the
robustness and stability of the active contour techniques. Working towards
this direction in [19] the so-called balloon forces have been introduced to the
parametric snake model. The incorporation of these forces to the control of the
evolution of the contours can help them to trespass spurious isolated weak image
edges and counteract their tendency to shrink (due to the internal forces). The
balloon forces are originally defined as F = k1n(s), where n(s) is the unit vector
normal to the curve u(s) and k1 is a constant which controls the inflation or
deflation tendency (depending on the sign of k1 ) respect to the external forces.
The snake becomes more robust with respect to the initial curve position and
the image noise.

6
Both implicit and pixel-level active contours can easily incorporate this
kind of guiding terms. The implicit models implement them as geometric-
independent advection terms [22]. The pixel-level snakes can effectively inflate
or deflate the contours by the definition of a new potential field:

Pinf = sinf ∗ ξ(x, y) (5)

where ξ(x, y) > 0 if (x,y) belongs to the set of locations enclosed by an active
contour. Otherwise, ξ(x, y) < 0. sinf = +1 defines an inflating potential
and sinf = −1 a deflating potential. Therefore in the discrete image space the
balloon forces Finf = −∇Pinf (x, y) can be approached by finite differences. The
CNN implementation of the balloon potential is mainly supported by means of
a weighted hole filling operation as it is illustrated in Fig. 5.
The balloon potential is weighed by the real and positive coefficient kinf and
then added to the potential field defined in Eq. 4:

P (x, y) = kint Pint (x, y) + kext Pext (x, y) + kinf Pinf (x, y) (6)

Therefore this new potential term can help to put the active contour closer
to the boundaries of interest from locations where the external forces are too
weak (Fig. 6).

3.2 Contour evolution


As it has been commented, the contour evolution is based on iterative op-
erations of expansion (dilation) and thinning extended along the four cardinal
directions conducted by the binary map from GFE. Given a direction of pro-
cessing, a directional contour expansion (DCE) is carried out only in those
locations where the local potential is decreasing (i.e. associated with positive
guiding forces). The subsequent directional contour thinning (DCT) operates
on the DCE binary output deactivating those pixels situated in locations of
locally decreasing potential which do not entail a rupture of the contour con-
nectivity. The combination of both operations produces the contour evolution
towards decreasing potential [21]. However this is somehow restricted mainly
for two reasons (Fig. 7):
1. The expansion and the thinning operations affect different pixels and
therefore rely on different guiding information. Note in the example in
Fig. 7 that the pixels activated by DCE are different to those deactivated
by DCT.
2. The DCE operation is constrained to only contour duplications: Only
the expansion is produced from those locations where the contour is one-
pixel wide along the direction of processing. This is required to avoid the
generation of ill-defined contours as a consequence of the different control
for DCE and DCT.
This approach leads to an inadequate contour evolution when the contour
is anchored in one or more pixels. This ill operation is illustrated in Fig. 8. In
the example, a contour evolves towards the North direction as a consequence of
some potential field. The contour pixel filled in gray represents an unaccessible
location (e.g. a noisy pixel). Since the contour expansion can only produce

7
two pixel-wide contours the evolution is deviated with a non-null angle. This
deviation is what we call the scattering effect. Fig. 13 shows a real experiment
for a similar situation of that illustrated in Fig. 8 where the predicted scattering
effect appears.
The scattering effect has some important consequences. The presence of
noise into the external potential image can lead to the appearance of anchored
contour pixels, which produces sharp contour shapes. These should be smoothed
by the internal potential which is dependent on the local curvature. Neverthe-
less, the effect of the internal potential is weakened by the scattering effect which
leads to concavities with higher curvature radios. Another important limitation
strongly related with the scattering effect, appears in those applications where
evolutions along very narrow cavities are involved. The restricted contour ex-
pansion impedes to reach deep locations along cavities with less than five pixels
of width, as it is illustrated in Fig. 9. The example shows a contour flowing
to the North along a four pixel-wide cavity based on the rules which define the
DCE and the DCT operations. In Fig. 14 the results from an equivalent real
experiment are showed.
As we have seen the scattering effect is a consequence of the restriction in
the contour expansion (only two pixel-wide contours can be generated from
this operation) and this constraint is a consequence of the different control
for the expansion and the thinning steps. We have noted that a constrained
thinning operation is actually not required. Since both the expansion and the
thinning operation operate consecutively along the same direction the pixels
affected for the contour thinning are mainly those pixels which have enforced the
contour expansion of the previous step. Therefore the non-constrained thinning
operation will lead to the effective contour evolution and makes the requirement
of only contour duplications in the DCE stage unnecessary. In Fig. 10 the
operation of the new contour shift approach is illustrated.
This small but critically important change in the contour evolution relies
only on one external constraint (the DCE driving) leading to a more efficient
operation. Furthermore, since the contour expansion is not restricted to dupli-
cations only, the scattering effect disappears as it is illustrated in Fig. 11. In
Fig. 13 an equivalent on-chip experiment is showed.
The inhibition of the scattering effect allows the active contours to evolve
along deep and very narrow cavities as it is illustrated in the example in Fig 12.
Note that the pixel level snakes cannot flow along cavities with less than three
pixels of width. This is a inferior limit to allow well defined contours. In Fig.
14 it is showed by means of an on-chip experiment how with the new approach
the contours can flow along narrower cavities than with the initial formulation.

3.3 Topologic transformations


The method to manage topologic transformations addressed in [12] is sup-
ported by two main operations: Avoiding all uncontrolled collisions between
contours and controlling contour splits and merges during the evolution to pro-
voke the required change of topology. In order to make clear the main short-
comings of this method we now describe the explicit steps of the implementation
proposed in previous studies [12, 21].
The first operation to carry out the topologic transformations should consist
of avoiding the possible collision between contours relying on a pre-estimation

8
of the locations where a collision could occur. This action is relatively easy to
implement because the contours move as the effect of activation and deactivation
of pixels in the contour image. Thus, the contours evolve pixel to pixel, which
allows to estimate the contour location and shape in the next iteration. The
collision point detection (CPD) is carried out by a simple pattern recognition
which takes as input the binary contour image and returns a binary image with
white pixels in those locations where a collision between contours can appear
in the next iteration. Therefore, by the projection of this binary map onto
the output of the GFE module, the pixel activation can be avoided on those
conflictive locations and consequently the contour collision will be prevented.
In a physical context, the effect of this operation is equivalent to the generation
of an infinite potential barrier between contour pieces to avoid the collision.
Now it is possible to take advantage of these collision points to realize a
controlled split of the old contours and merging of the new ones. The opera-
tions to be implemented in order to approach the topologic transformations are
illustrated with an example in Fig. 15 and are as follows:

1. The set of collision points which can guarantee a correct contour separation
by only local operations are selected.

2. The split of the old contours is carried out by deactivating the neighboring
pixels in the direction under processing (vertical direction in the example),
with respect to those collision points selected in the previous step.

3. The generation of the new contours are made by activating the neigh-
boring pixels in the direction under processing (horizontal direction in the
example), with respect to the collision points selected in the previous step.

This strategy to tackle the topological transformations has demonstrated a


good performance in multiple applications [21]. Nevertheless, as it can be seen
in the example of Fig. 15, not all the collision points can guarantee either the
correct split of the old contours or the correct merge of the new ones based on
the described operations. Therefore some required topological transformations
might not be attended. This is illustrated in Fig. 17 with an example where an
active contour evolves to define five different objects. In this example changes
of topology are required, however they are not attended because the proper
definition of the new desired active contours cannot be guaranteed with the
described local operations supported by any of the predicted collision points.
On the other hand, the changes of topology are based on possible collision
points instead of real collisions between contours which have been previously
prevented. Therefore there might be certain situations where topological trans-
formations occur even though they are not actually required as it is illustrated
in the example in Fig. 18. This ill-function can lead to a bad operation when
a contour evolves along very narrow cavities and two pieces of a contour come
very close to each other. If the separation between them is only one pixel wide,
an undesired topologic transformation can provoke the stop of the contour evo-
lution as it is illustrated in the example of Fig. 19.
The commented strategy represents a compromise between complexity and
accuracy in the management of topological transformations within the contour
context where a considerable effort is required to keep well defined the resulting
contours. This requirement is dramatically relaxed into a region propagation

9
framework where the contours are defined implicitly as frontier pixels of regions
into the image space [9]. When two contours (or two parts of one contour)
collide the collision points no longer belong to the set of frontier pixels of the
corresponding regions and consequently they do not belong to the set of con-
tour pixels. We propose to handle the changes of topology by means of the
redefinition of the contours as the set of frontier pixels of the associated regions
(area enclosed by the snakes). The transformation is performed by the three
operations illustrated in Fig. 16. The associated regions are obtained from
the contours by means of a hole filling operation followed by a one-step mor-
phological opening (erosion+dilation). In the last step the region contours are
obtained by a binary edge detection which extracts the set of frontier pixels of
the regions.
This strategy to manage the topologic transformations has a clearly higher
performance than that reported in [12] and handles properly the changes of
topology whenever they are required as it is illustrated in the example of the Fig.
17. On the other hand, since now the handling of the topologic transformations
is supported by real collision between contours, the changes of topology are
attended only when they are actually required (Fig. 18).
Therefore the PLS methodology with the new strategy to move the active
contours allows to evolve the contours along very narrow cavities as it is illus-
trated in Fig. 19.
The new proposal outperforms the contour-based approach not only concern-
ing the efficiency but also in the simplicity of the implementation: Only three
isotropic 3x3 linear templates are required instead of the 18 directional tem-
plates reported in [12]. Nevertheless this new approach presents an exception:
those particular cases where one or several contours appear to be completely
surrounded by another active contour cannot be directly managed with the pro-
posed strategy because the cross along the region context would eliminate the
internal active contours. On the other hand this behavior can also provide a
more robust contour evolution by the absorbtion of artifacts in outwards evolu-
tions in some practical situations as it is illustrated in Fig. 20.

4 Implementation
The proposed algorithm has been projected on a CNN architecture. To this
end the images have been linearly transformed from the conventional gray scale
(I(x, y) ∈ [0, 255]) to the usual CNN dynamic range (I  (x, y) ∈ [−1, 1]) where
the black pixels (0 in the standard gray-scale) take the value +1 and the white
pixels (255 in the standard gray-scale) take the value -1 [13, 14]. A flow diagram
containing all the operations of the new algorithm is showed in Fig. 21. For the
CNN operations the initial state and the external input are labelled with A and
B respectively. The result of those CNN operations where the A or B labels are
missing is independent of the initial state or the input. The only exception is
the hole filling operation where a +1 initial state should be imposed for all the
cells [23]. The collision point detection module (CPD) responsible to prevent
the collision between contours is no longer required to manage the topologic
transformations thus its implementation could be unnecessary. Nevertheless it
has been included into the general structure of the algorithm to attend those
possible applications where the contour topology should be preserved [21, 24].

10
The dark gray items in Fig. 21 represent the external data provided by the
user. They include:
• Input images: The external potential image (gray-level image) and the
initial contour image (binary image).
• Weights: kext , kint and kinf weigh the influence in the contour evolution of
the external potential, internal potential and inflating (deflating) potential
respectively.
• Switches: sinf selects between inflating (+1) and deflating (-1) potential
in the balloon potential estimation module (BPE ). scpd activates (-1) or
inhibits (+1) the operation of the collision point detection.
The templates for the DCT and CPD CNN-operations are derived relying on
the local rules showed in Fig. 22. The directional gradient (D Gr ) is performed
by an approximation of the Sobel operator. The remainder of the processing
steps consists of simple binary logical operations and well-known propagative
(diffusion, hole filling) and non-propagative (thresholding, one-step opening,
edge detection, shift) analogic CNN operations. In order to make the paper
self-contained the templates for all the CNN operations in the algorithm are
included in Appendix I.
An iteration means the processing along a cardinal direction. It starts for
the processing on the contour image resulting of the previous iteration or on an
initial contour image provided externally for the first iteration. Following, the
processing steps in the flowchart of Fig. 21 are described:
The estimation of the internal potential (IPE) and the balloon potential
(BPE) are performed from the contour image. The internal potential will be
the result of the diffusion (DIFFUS) of the binary contour image. The balloon
potential is estimated by means of a hole-filling (H F) operation. The nature of
this potential is defined by the logical XOR between the hole-filling output and
the sinf switch. For the inflating potential field the output of the hole-filling is
inverted (sinf = +1) whereas it is kept without change for a deflating potential
field (sinf = −1). Finally the output of the previous operation is combined with
the active contour image to deactivate the contour pixels. Thus, the contour
pixels will be always associated with the higher potential values.
The possible collision points to appear in the current iteration are also de-
tected from the contour image in the CPD module based on the operations
defined in Fig. 22. According with the implementation in Fig. 21 the CPD
output will be a binary image with white pixels labelling the detected collision
points. A logical OR between the CPD output and the scpd switch will control
the projection of the image containing the collision points on the GFE output.
In the GFE module the balloon and the internal potential previously es-
timated are weighed and combined along with the external potential. Then,
a CNN-based Sobel-type operator (D Gr) is applied on the resulting potential
field in order to obtain the guiding forces. Note that the inversion of the result
of the directional gradient in Eq. 3 is implicitly done in the transformation of
the image gray scale. Finally, the sign of the guiding forces is extracted by a
comparison with zero level (THRES). The output will be a binary map with
activated pixels (+1) in those locations where the forces are positive for the
direction under processing. The final AND operation in this module will allow
to control the collision between contours when it is required.

11
In DCE the contours are expanded along the direction under processing
based on the guiding forces. This is mainly performed by a one-pixel shift
(SHIFT) of the contours along the direction under processing. The resulting
binary image is combined with the output of the GFE module by a logical AND
which keeps activated only those shifted contour pixels whose locations coincide
with activated pixels in the GFE output. Finally, the combination of the result
with the original contour image by a logical OR will produce a binary image
with the contours expanded only in those locations where the guiding forces are
positive along the direction under processing.
The expanded contour image is processed in the DCT module based on the
CNN-operations described in Fig. 22. After DCT(1) we will have a thinned
contour image but with possible ruptures. Steps DCT(2) and DCT(3) act on
areas with opposite slope in order to activate those pixels deactivated in DCT(1)
needed to restore the continuity of the contour. The outputs of the three CNN-
operations are combined by logical OR operations which results in a binary
image containing contours well defined slightly shifted and/or deformed based
on the guiding information (potential fields).
Finally the required changes of topology are performed in the TP module
based on the three CNN-operations showed in Fig. 21 as it was described in the
previous Section.
All the steps of the proposed algorithm consist of simple local dynamic
convolution and morphological hit and miss operations together with simple
arithmetic and logical operations. Therefore the proposed algorithm meets the
requirements of the current CNNUM implementations. The algorithm has been
implemented and tested on the 64x64 CNNUM, ACE4K ([16, 17]) within the
ACE-BOX computational environment [18]. In Table 1, the execution times for
each module of the algorithm in Fig. 21 are gathered.
Note that the estimation of the internal potential and the inflating/deflating
potential (IPE and BPE) are required only once per cycle (one cycle represents
four iterations, one for each cardinal direction). Furthermore and as a difference
with the original PLS algorithm, the topologic transformations can be checked
once per cycle or even less since now the changes of topology are correctly
performed in any time after the collision between contours. On the other hand,
the modules TP and CPD are never required at the same time. Therefore
the maximum time in Table 1 makes reference to the more expensive case in
processing time (i.e., that one including CPD but not TP) which means that the
implemented algorithm requires less than 4ms to complete one cycle running in
the 64x64 CNNUM chip. We have observed that in real time applications like
video object segmentation and tracking less than ten iterations per frame are
usually needed. Therefore, even with the full version of the algorithm the speed
processing of 25 f rame/s is feasible.
Like in the classical active contour techniques the efficiency of the PLS in the
contour location strongly depends on the input images. The external potential
field must be defined to have the potential valleys in the boundary of the objects
of interest. This definition depends on each application, and usually generates
several false positives (due to noise or another non-interest objects) and false
negatives (parts of the desired object contour go unnoticed). Often, different
image features are combined depending on the application domain and the ob-
jects to be segmented [7, 25]. However, the best way of integrating different
features remains an open problem and the priority (weight) of image features is

12
still unclear. Another key point is the definition of the initial contours. Since the
contour evolution is based on the flow through decreasing potential fields which
are estimated based on local rules, the efficiency of the algorithm decreases with
the distance from the potential valleys. There is not a general rule to impose
the initial contours. It depends on the application and the previous knowledge
of the objects to be defined. The use of the balloon potentials can help to make
the operation less sensitive with the contour initialization. However, even so,
some previous knowledge about the objects to be delimited are required in order
to put the initial contour inside (when inflating potentials are used) or outside
(when deflating potential are used) the region of interest.
The external parameters kext , kint and kinf clearly depend on the definition
of the external potential and the previous knowledge of the structures to be
segmented (shape, location,...). There is no exact rule to determine the influ-
ence of each kind of potential field. Like in classical active contour techniques
they must be determined heuristically or by means of some calibrating mech-
anism. Nevertheless the search of the parameter values can be based on some
general hints. Usually the external potential should have the higher influence
in the global potential because it contains the information of the image under
processing. On the other hand a low value for kint can produce protuberances
in the contour shape which increase the internal potential and thus compensate
the initial weak influence of this kind of potential. Therefore a low weight for
the internal potential is usually preferred. Finally the influence of the balloon
potential is often required to guide the contour evolution when the external po-
tential is too weak. Therefore the kinf value should be clearly lower than kext .
On the other hand its relation with the internal potential depends on the nature
of the balloon potential. The internal potential enforces the deflating potential
and counteracts the inflating potential.
Finally, the configuration of the switches (sinf and scpd ) can lead to very
different behaviors for the same input images (external potential and initial
contour) which allows to approach more complex tasks based on multiple PLS-
operations by changing automatically the configuration of these parameters as
it will be showed in the next Section.

5 Applications
In order to illustrate the capabilities of the new algorithm in real applications
we will show some examples including the processing of binary and gray-scale
inputs. First, we will show how the algorithm can be used to find the short-
est path in a binary labyrinth where the evolution along very narrow cavities
based on inflating and deflating forces is required. Furthermore, the capabil-
ity to detect and prevent collisions between contours plays an important role
in this application. Following we will show examples of applications involving
gray-level inputs in medical image processing, the framework where the active
contour techniques are most frequently applied [26, 22]. To this end different
capabilities of the PLS-algorithm are exploited, including the management of
topologic transformations.

13
5.1 Binary input: shortest path problem
PLS can be applied to resolve the shortest path problem in wide binary
labyrinths. The strategy is based on the approach proposed in [27] and later de-
veloped in [28] for narrow labyrinths composed by one-pixel wide four-connected
paths. There the labyrinth under study is explored by a travelling wave initi-
ated at the source point. Then, the wave-front evolving on the shortest path
will reach the target point without collision. Any waves initiated at a junction
located on the shortest path will reach the end of the branch or collide with
other wave(s). If the paths are cut at the collision points then all closed loops
will be destroyed giving place to branches which can be pruned in such a way
that if there is a unique solution the result will be the shortest path.
In the PLS framework, an active contour surrounding the source point is
guided by an inflating potential field through the labyrinth (sinf = +1, Fig.
21). The CPD operation prevents the possible collisions when different parts
of the active contour meet each other (scpd = −1). After all the labyrinth has
been explored anchoring points are imposed in the start and the target and the
balloon potential is switched to a deflating potential (sinf = −1). The active
contour is compressed producing the reabsorption of all the contour sections
except that between the start and the target points along the shortest path.
Fig. 23 illustrates the commented strategy with two examples.
Note that at least a three-pixel wide labyrinth is required for the propagation
of well-defined active contours. This strategy can guarantee a valid solution if
the width of the labyrinth is 4N-1 in all locations where N represents the number
of different solutions. Fig. 24 shows an example of a seven-pixel wide labyrinth
with two possible solutions. As it can been observed the width of the paths
guarantees that at least one (or even two) contours can evolve along them.
The PLS-based approach of the shortest path problem is particularly ad-
vantageous in sparse labyrinths mainly present in applications like robot path
planning where different obstacles should be avoided to reach the target. As a
difference with the narrow-labyrinth techniques the PLS approach acts directly
on the real scenario to find the optimal path. The search can be based on the
following metrics:

• City-block distance: d((x1 , y1 ), (x2 , y2 )) = |x1 − x2 | + |y1 − y2 |


• Maximum distance: d((x1 , y1 ), (x2 , y2 )) = max{|x1 − x2 |, |y1 − y2 |}

The City-block or Manhattan distance comes as result of estimating the


inflating potential (BPE module in Fig. 21) only once each cycle whereas the
Maximum distance is a consequence of the inflating potential estimation in every
iteration (i.e. along each cardinal direction, four times per cycle). Fig. 25 shows
both metrics implemented with the PLS. The choice of the type of distance to
be implemented is critical. The shortest path depends strongly on such selection
as it is illustrated in Fig. 26. In that follows the City-block distance will be
considered.
Note that the shortest path is defined based on the position of the obstacles
when they are avoided along a trajectory. Therefore the one-pixel wide path
surrounded by the final contour does not necessary have a minimal length.
Nevertheless this can be approached by a third step of processing where the
CPD operation is inhibited (scpd = +1). As a consequence the contour collides

14
with itself giving place to an open contour anchored in both the starting and
target points. Now, the action of the internal potential will tighten the contour
going closer to the minimal length path. This operation is illustrated in Fig. 27
where quasi-optimal routes are approached from the results in Fig 26.
In summary, the complex task of determining a quasi-optimal path in sparse
labyrinths (robot path planning) can be approached by three consecutive PLS-
operations based on different configurations of the externally accessible param-
eters (Fig. 28):

1. Contour evolution based on inflating potential (sinf = +1). The collisions


should be avoided (scpd = −1).

2. Contour evolution based on deflating potential (sinf = −1). The collisions


should be avoided (scpd = −1).
3. Contour evolution based on internal potential (kint > 0). The collisions
should be allowed (scpd = +1).

Finally in Fig. 29 quasi-optimal routes are determined from one start point
to four different targets.

5.2 Gray scale input: medical image processing


In order to illustrate the capabilities of the new algorithm in real applica-
tions where gray-level inputs are involved we will show some examples into the
framework of medical image processing. First, we have approached the segmen-
tation of blood vessels from retinal angiography images. Retinal blood vessel
morphology can be an important indicator for many diseases such as diabetes,
hypertension and arteriosclerosis, and the measurement of geometrical changes
in veins and arteries can be applied to a variety of clinical studies [29]. In the
example in Fig. 30 we show several snapshots of the evolution of active contours
along the blood vessels from a retinal angiography image. The contour evolution
is guided by the combination of the intensity image (kext = 0.7) and inflating
potential (kinf = 0.3). As it can be seen the operation entails the evolution
along narrow cavities and several changes of topology. Note, that in this case
the CPD operation must be inhibited.
Finally, we have carried out the processing of sequences of both 2D and
3D ultrasound (US) echocardiography images. The aim of the operation is to
segment and track the contour of the left ventricle from the frames as a previous
step of the determination of the ventricular volume and the wall motion in
different stages of the cardiac cycle. A CNN-based technique for the contour
location of the left ventricle in temporal 2D US sequences has been proposed
in [30]. However in this case, because of technological limitations the complete
method cannot be projected on a current CNN-hardware platform.
In the PLS framework the contour evolution is guided by a combination of
external potential (kext = 0.5) from the US images together with internal po-
tential (kint = 0.025) to keep smooth the contour shape. In order to implement
the complete system in the ACE4K, the external potential is derived from the
current frame filtered by a local constrained diffusion (see the corresponding
template in appendix I) combined with the result of a diffused edge detection
onto this image (Fig. 31). The diffused edge detection encourages the contour

15
evolution towards edges and the inverted filtered image reinforces the evolution
towards high intensity locations. The influence of these features is weighed by
the constants kf il and kdif . The values kf il = 0.5 and kdif = 0.5 have been
considered for the experiments showed in this paper.
Only in the processing of the first frame of each sequence an inflating po-
tential (kinf = 0.2) is also considered to put one initial seed situated into the
left ventricle close to the boundaries of interest. For the subsequent frames the
initial contour coincides with the result from the previously processed frame.
Fig. 32-37 show several frames of US sequences processed following the com-
mented strategy superimposed to the final contours resulting from the on-chip
experiments.

6 Comparison of active contour techniques


The good performance of a particular technique of active contour based seg-
mentation is strongly dependent not only on the particular application but also
the parameters which define the system. Thus, for instance, given a parametric
model, the successful of the segmentation process will strongly depend on

1. the external potential terms considered and the weighing of these,

2. the arrangement of the initial contours more or less close to the objective,

3. the number of vertices of discretization and the techniques of numerical


simulation (B-splines, finite elements,...),

4. the technique used for the energy minimization (solving the associated
Lagrange equations, simulated annealing, neural networks, dynamic pro-
gramming, genetic algorithms,...), etc.

On the other hand, even though the input data have been established (guid-
ing terms, contour conditions,...), the result obtained does not justify the suit-
ability of a model respect to another since there is no condition test which can be
considered as general. In fact, there will be situations where a technique will be
more suitable than other due to its particular characteristics. As a consequence,
we consider a quantitative comparison based on simulation with different tech-
niques onto a determined image database has not much relevance. However,
the global characteristics of the parametric and implicit models as well as of the
pixel-level snakes are in more or less degree complementaries, such as a qualita-
tive comparison of their features could help to determined the application field
of each kind of model. Particularly, we will focus on characteristics as control
capacity, flexibility, processing speed, precision, convergence and robustness.

6.1 Control vs flexibility


The parametric models allow a high control of the mobility by means of
the guiding energies as well as by the establishment of a manual control onto
local characteristics [1]. In addiction, they permit a better control of the con-
tour deformation in terms of stiffness and elasticity allowing also to penalize
deformations going far of a priori established shape. These characteristics make
the parametric models particularly suitable for tasks supported on a previous

16
knowledge of the domain of application and the approximate shape of the ob-
jects into the scene. On the other hand they present low flexibility such as
they cannot approach the segmentation of highly irregular objects with deep
and narrow cavities and/or protuberances. Furthermore, they usually cannot
handle the topologic transformations required when the number of objects into
the scene is different to the number of active contours. This precludes their
application in segmentation tasks where the number of the interesting regions
and their approximate locations are not known a priori. There are strategies
as the so called topologically-adaptable snakes (T-snakes, [31]), derived from
the parametric models which permit to make topologic transformations and to
reach irregular contour shapes. This is achieved by iterative processes of evalu-
ation and reparameterization. However, since the energy estimation is strongly
dependent on the parameterization, it changes in each of the intermediate repa-
rameterization steps. This certainly permits to reach tubular shapes but at the
expense of a penalization of the energy estimation.
The implicit deformable models are characterized by a high flexibility in the
contour evolution, allowing to reach highly irregular shapes or making topologic
transformations in a natural form. However they present difficulties to impose
constrains and specific control terms (propagation speed, suitable stop criteria,
...) because of the higher dimensionality of the embedding hipersurface and the
implicit definition of the contour model.
Finally, the pixel-level snakes are situated in the middle way between the
parametric and implicit models. On the one hand, due to their high level of
discretization and the characteristics of evolution (pixel to pixel) they can handle
topologic transformations by operations perfectly integrated and accessible in
the evolution process. This also allows to control the topologic transformations
by preventing the collision between contours in a simple way. On the other hand,
the pixel level snakes can also delimit objects with cavities and protuberances
keeping a high control of the contour shape due to the definition of deformation
potential terms based on the curvature which is locally estimated.

6.2 Speed vs precision


Among the techniques based on numerical simulations there are mainly two
factors which determine the time required for an active contour to reach a final
stable location. One of this is the number of steps needed to reach the final
solution, strongly dependent on the initiation and the image under processing.
The another factor is the number of vertices on which the model is discretizated
(or the embedding surface in the implicit formulations) and which determine
to a great extent the precision of the final segmentation. There are different
techniques to approach the simulations that lead to reduce the time of evolution
almost ever at the expense of limiting the space of variation of the contours or
the number of vertices of the discretization which involves a lost of precision in
the segmentation process.
Concerning the parametric models, the computing time must be also multi-
plied by the number of active contours being considered. On the other hand the
computing time into the implicit formulations is independent on the number of
the involved contours, however the higher complexity of these procedures, leads
to search alternatives which constrain their application in contour evolution
either expansive or compressive to reduce computational cost [32] .

17
The pixel level snakes are discretizated to pixel level and can be projected
on massively parallel CNN architectures as it is showed in this paper. This
allows to associate each pixel of the contour image to one single processing
element which interacts with those associated to the neighboring pixels. Thus
the computational cost is detached from the number of point of discretization
of the domain. However, the size of the images to be processed is linked to the
capability of integration of processing elements into a single chip.

6.3 Convergence vs robustness


The convergence of an active contour towards stable location and shape must
be guaranteed. To this end, in the conventional active contour techniques the
discretization level in both space (image domain), and time (iteration step),
must be suitable to avoid oscillations. The finer the discretization is the more
guarantees of convergence we will have but at expenses of higher sensitivity
against local minima. On the other hand, the higher the iteration step is (or
the rougher the discretization of the spatial variable is) the lesser possibilities to
be anchored in a local minimum will be, but at expenses of a higher instability
of the final solution.
Concerning the pixel-level snakes the spatial and temporal variables are fixed
to the minimum level which guarantees a stable final solution for considering all
the information present in the image. However this makes the pixel-level snakes
more sensitive to the local minima and then more dependent on the initiation
and the guiding information. This sensitivity is partially attenuated by a higher
degree of movement and the non-parametric nature of the model in such a way
that the number of evolution points is not predetermined.

7 Conclusions
Pixel-level snakes represent a cellular active contour technique which has
demonstrated a high performance in multiple active contour applications. In
this paper, the associated algorithm has been analyzed and some limitations
and exceptions have been discussed leading to new proposals to increase the
performance of the PLS. The contributions include a new term to guide the
contour evolution as well as a new strategy to manage the topologic transfor-
mations. Furthermore, changes have been introduced into the contour evolution
module. Altogether these modifications lead to a higher performance and an
easier hardware implementation of the algorithm for pixel-level snakes onto a
CNN chip set architecture. The algorithm has been already tested on the 64x64
CNNUM, ACE4K within the ACE-BOX computational environment. All the
examples used to illustrate the algorithm capabilities represent experimental
results from the chip implementation. Furthermore, this implementation has
been used to approach complex tasks of practical interest like the robot path
planning or the contour location of the human left ventricle from US image
sequences.

18
Acknowledgment
The authors would like to thank Daniel Hillier and Viktor Binzberger their
assistance in the implementation and the performance validation of the algo-
rithm proposed in this paper. This research has been completed while the
first author was staying at the Computer and Automation Institute of Hun-
garian Academy of Sciences in Budapest (SZTAKI), in the framework of the
EU Centre of Excellence program (EU Supported Visiting Scientist Program,
ICAI-CT-2000-70025).

Appendix I. Template derivation


In this Appendix, the templates involved in the PLS algorithm are listed.
The templates are expressed in a vector format:
 
n0 n1 n2
 n3 n4 n5  ⇒ [n0 , n1 , n2 , n3 , n4 , n5 , n6 , n7 , n8 ] (7)
n6 n7 n8

Directional templates for the processing along the North direction (for East,
West and South directions these templates should be suitability rotated):
D Gr: B=0.25*[1,2,1,0,0,0,-1,-2,-1]
SHIFT: A=[0,0,0,0,1,0,0,0,0]; B=[0,0,0,0,0,0,0,1,0]
DCT(1): A=[0,0,0,0,1,0,0,0,0]; B=[0,-1,0,0,2,0,0,1,0]; I=1
DCT(2): A=[0,0,0,0,1,0,0,0,0]; B=[0,0,0,-1,1,0,1,0,0]; I=-2
DCT(3): A=[0,0,0,0,1,0,0,0,0]; B=[0,0,0,0,1,-1,0,0,1]; I=1
CPD(1): A=[0,0,0,0,1,0,0,0,0]; B=0.5*[1,1,1,-3,-3,-3,0,-3,0]; I=-5
CPD(2): A=[0,0,0,0,1,0,0,0,0]; B=[1,-1,0,-1,-1,1,0,1,0]; I=-5
CPD(3): A=[0,0,0,0,1,0,0,0,0]; B=[0,-1,1,1,-1,-1,0,1,0]; I=-5

Isotropic templates:
THRES: A=[0,0,0,0,2,0,0,0,0]
H F: A=[0,1,0,1,3,1,0,1,0]; B=[0,0,0,0,4,0,0,0,0]; I=-1
OPEN: B=[0,1,0,1,1,1,0,1,0]; I={-4,+4}
EDGE: A=[0,0,0,0,2,0,0,0,0]; B=0.25*[-1,-1,-1,-1,8,-1,-1,-1,-1]; I=-1.5
DIFFUS: A=0.05*[2,3,2,3,0,3,2,3,2];
LC DIFFUS: A=0.05*[2,3,2,3,0,3,2,3,2]; B=0.05*[2,3,2,3,0,3,2,3,2];

References
[1] M. Kass, A. Witkin, and D. Terzopoulos. Snakes: Active Contours Models.
International Journal on Computer Vision, 1:321–331, 1988.

[2] V. Caselles, F. Catte, and F. Dibos. A Geometric Model of Active Contours


in Image Processing. Numer. Math., 66, 1993.
[3] R. Malladi, J.A. Sethian, and B.C. Vemuri. Shape Modeling with Front
Propagation: A Level Set Approach. IEEE Trans. Patt. Anal. Mach. In-
tell., 17(2):158–174, 1995.

19
[4] D. Adalsteinsson and J. Sethian. A Fast Level-Set Method for Propagating
Interfaces. Journal of Computational Physics, 118:269–277, 1995.
[5] J. Sethian. A Fast Marching Level Set Method for Monotonically Advancing
Fronts. In Proceedings of the National Academy of Sciences, volume 93,
pages 1591–1594, 1996.
[6] Y. Zhu and H. Yan. Computerized Tumor Boundary Detection Using a
Hopfield Neural Network. IEEE trans. on Medical Imaging, 16(1):55–67,
1997.
[7] A. Blake and M. Isard. Active Contours. Springer-Berlag, 1998.
[8] N. Paragios and R. Deriche. Geodesic Active Contours and Level Sets for
the Detection and Tracking of Moving Objects. IEEE Transactions on
Pattern Analysis and Machine Intelligence, 22(3):266–280, 2000.
[9] C. Rekeczky and L.O. Chua. Computing with Front Propagation: Active
Contour and Skeleton Models in Continuous-Time CNN. Journal of VLSI
Signal Processing Systems, 23(2/3):373–402, 1999.
[10] D.L. Vilariño, V.M. Brea, D. Cabello and J.M. Pardo. Discrete-Time CNN
for Image Segmentation by Active Contours. Pattern Recognition Letters,
19(8):721–734, 1998.
[11] D.L. Vilariño, D. Cabello, M. Balsi and V.M Brea. Image Segmentation
Based on Active Contours Using Discrete-Time Cellular Neural Networks.
In Vedat Tavsanoglu, editor, Fifth IEEE International Workshop on Cel-
lular Neural Networks and Their Applications, pages 331–336, 1998.
[12] T. Kozek and D.L. Vilariño. An Active Contour Algorithm for Continuous-
Time Cellular Neural Networks. Journal of VLSI Signal Processing Sys-
tems, 23(2/3):403–414, 1999.
[13] L.O. Chua and L. Yang. Cellular Neural Networks: Theory. IEEE Trans.
Circuits Syst., 35:1257–1273, 1988.
[14] L.O. Chua and T. Roska. The CNN Paradigm. IEEE Trans. Circuits Syst.,
(3):147–156, 1993.
[15] T. Roska and L.O. Chua. CNN Universal Machine: An Analogic Array
Computer. IEEE Trans. Circuits Syst., 40(3):163–173, 1993.
[16] S. Espejo, R. Dominguez Castro, G. Liñan and A. Rodriguez Vazquez.
A 64x64 CNN Universal Chip with Analog and Digital I/O. In Proceed-
ings of 5th International Conference on Electronics, Circuits and Systems,
ICECS’98, pages 203–206, 1998.
[17] G. Liñan, S. Espejo, R. Dominguez-Castro and A. Rodriguez-Vazquez.
ACE4k: An analog I/O 64 x 64 Visual Microprocessor Chip With 7-bit
Analog Accuracy. International Journal Of Circuit Theory and Applica-
tions, 30:89–116, 2002.
[18] Analogic Computers LTD: Aladdin Pro R3.0. http://www.analogic-
computers.com/, Budapest 2003.

20
[19] L.D. Cohen and I. Cohen. Finite Element Methods for Active Contour
Models and Balloons for 2D and 3D Images. IEEE Trans. Patt. Anal.
Machine Intell., 15:1131–1147, 1993.

[20] P. Radeva and J. Serrat. Rubber Snake: Implementation on Signed Dis-


tance Potential. In Vision Conference SWISS’93, pages 187–194, 1993.
[21] D.L. Vilariño, D. Cabello, X.M. Pardo and V.M. Brea. Cellular Neural
Networks and Active Contours: A Tool for Image Segmentation. Image
and Vision Computing, 21(2):189–204, 2003.

[22] W.J. Niessen, B.M. ter Haar Romeny, and M.A. Viergever. Geodesic De-
formable Models for Medical Image Analysis. IEEE Transactions on Med-
ical Imaging, 17(4):634–641, 1998.

[23] T. Matsumoto, L.O. Chua, and H. Suzuki. CNN Cloning Template: Con-
nected Component Detector and Hole Filler. IEEE Trans. on Circuits and
Systems, 37:633–638, 1990.

[24] X. Han, C. Xu, and J.L. Prince. Topology Preserving Level Set Method for
Geometric Deformable Models. IEEE Trans. Patt. Anal. Machine Intell.,
25(6):755–768, 2003.

[25] A. Blake and A. Yuille. Active Vision, MIT Press, 1992.

[26] T. McInerney and D. Terzopoulos. Deformable Models in Medical Images


Analysis: A Survey. Medical Image Analysis Journal, 1:91–108, 1996.

[27] Cs. Rekeczky, A. Ushida and T. Roska. Analogic CNN Algorithm Ex-
ploring the Shortest Path: Possible Applications in Routing Problems.
Technical Report, Institute of Electronics, Information and Communica-
tion Engineers NLP ’94, 94(259):61–68, Tokyo, 1994.

[28] Cs. Rekeczky. Skeletonization and the Shortest Path Problem - Theoreti-
cal Investigation and Algorithm for CNN Universal Chips. In Proceedings
of 7th International Symposium on Nonlinear Theory and Applications,
NOLTA’99, 1:61–68, 1999.

[29] L. Zhou, M. Rzeszotarski, L. Singerman, and J. Chokreff. The Detec-


tion and Quantifiactaion of Retinopathy using Digital Angiograms. IEEE
Transactions on Medical Imaging, 13(4):619–626, 1994.

[30] C. Rekeczky, A. Tahy, Z. Vegh, and T. Roska. Spatio-temporal Nonlinear


Filtering and Endocardial Boundary Detection in Echocardiography. In-
ternational Journal of Circuit Theory and Applications, 27:171–207, 1999.

[31] T. McInerney and D. Terzopoulos. Topologically Adaptable Snakes. In


Proc. of the Fifth Int. Conf. on Computer Vision (ICCV’95), pages 840–
845.

[32] J.A. Sethian. Fast Marching Methods. SIAM Review, 41(2):199–235, 1999.

21
Table captions

Table 1: Execution time of all major processing modules in the PLS algo-
rithm extracted from the implementation on the ACE4K. The missing data in
the column of the execution time for iteration means that the corresponding
module is processed only once per cycle.

22
MODULE ITERATION CYCLE
GFE 250 µs 1000 µs
DCE 60 µs 240 µs
DCT 160 µs 640 µs
CPD 300 µs 1200 µs
TP - 760 µs
BPE - 750 µs
IPE - 40 µs
Maximum 3820 µs

Table 1:

23
Figure captions

Fig. 1: Guiding force extraction (GFE) from an external potential field. Lower
potential is represented by lower intensity (i.e., darker pixels). By means of di-
rectional gradients the component of the guiding forces for each direction is
obtained. The sign of these forces will indicate the correct direction to move
the active contour.
Fig. 2: (Upside): Generation of the internal potential for the PLS. Lower
potential is represented by lower intensity. A directional gradient operation
will originate forces proportional to the local curvature which guide the contour
evolution in order to regularize its shape. (Downside): Several snapshots of the
contour evolution guided by the internal forces.
Fig. 3: (Upside): Contour evolution based on noised external potential (ad-
ditive Gaussian noise σ = 100, into the usual range for gray-scale images, [0,
255]). (Downside): Contour evolution based on noised external potential com-
bined with internal potential.
Fig. 4: Diagram showing the main modules and their interactions for a PLS
algorithm.
Fig. 5: Generation of inflating/deflating potentials for the PLS. Lower po-
tential is represented by lower intensity. A directional gradient operation will
originate forces guiding the contour evolution outwards (inflation) or inwards
(deflation).
Fig. 6: (Upside): Several snapshots of the evolution of an active contour
superposed to the external potential field. (Downside): Combination of the
external potential and inflating potential. While the external forces are too
weak (far from the boundaries of interest) the inflating forces dominate the
contour evolution. When the active contour comes closer to the object, the
external forces become strong enough to control the evolution.
Fig. 7: Example of a contour evolution for the processing of the North direc-
tion. (a): Output of the GFE module. (b): Contour image before the DCE and
the DCT operations. (c): Contour image after the DCE operation. The expan-
sion affects those locations with positive guiding forces (dark pixels in the GFE
output) whose activation produces only two-pixel wide contours. (d): Contour
image after the DCT operation. The thinning only affects those contour pixels
with positive guiding forces whose deactivation does not provoke connectivity
breakpoints.
Fig. 8: Illustration of the scattering effect. Black pixels represent contour pix-
els. The gray pixel represents a location unaccessible for the contour. Therefore
the contour is forced to surround that location resulting in a deviation in the
trajectory of the contour evolution (scattering).
Fig. 9: Illustration of the evolution along narrow cavities. Black pixels repre-
sent contour pixels. The gray pixels define the cavity. Based on the rules for the
DCE and DCT described in Fig. 7 the contour evolution is not possible along
cavities with less than five pixel of width.
Fig. 10: Example of a contour evolution for the processing of the North
direction. (a): Output of the GFE module. (b): Contour image before the
DCE and the DCT operations. (c): Contour image after the DCE operation.
The expansion affects those locations with positive guiding forces (dark pixels in
the GFE output) neighboring to some contour pixel along the direction under
processing. (d): Contour image after the DCT operation. Now the thinning

24
operation is only constrained to keep well-defined the continuity of the contour.
Fig. 11: Like in Fig. 8 the gray pixel represents a location unaccessible for the
contour (black pixels). Therefore the contour is forced to surround that location
but now its trajectory is not deviated.
Fig. 12: Illustration of the evolution along narrow cavities. Black pixels
represent contour pixels. The gray pixels define the cavity. Based on the new
rules for DCE and DCT the contour evolution is possible along cavities with at
least three pixels of width.
Fig. 13: In this example several snapshots of the evolution of an active contour
superposed to the guiding external potential field are showed. One pixel in
the upside of the contour becomes anchored based on the guiding information
which causes the scattering effect from the original PLS algorithm (upside row).
This effect disappears in the improved version since the new contour evolution
relies on a non-constrained thinning operation and on a more flexible directional
contour expansion (downside row).
Fig. 14: The scattering effect impedes the contour evolution along very narrow
cavities with the original algorithm (upside row). Since the contour expansion
is not restricted to only duplications the contour evolution along very narrow
cavities becomes more efficient with the new approach (dowside row).
Fig. 15: Example illustrating the operation in the management of topological
transformations proposed in [12] (North direction). First, those collision pixels
which can support the topological transformation by interacting only with their
first order neighborhood are selected. Following the split of the old contours
and the merge of the new ones are carried out.
Fig. 16: Flow diagram of the operations for the new topologic transformations
module.
Fig. 17: (Upside row): In this example, the required topological transforma-
tions cannot be approached by only local operations based on the proposal in
[12]. (Downside row): The new proposal enforces changes of topology whenever
they are required.
Fig. 18: (Upside row): In this example, two parts of a contour come to each
other so close that several pixels between them are marked as collision points.
Therefore with the original PLS algorithm a change of topology appears even
though it is not required. (Downside row): With the new proposal only changes
of topology occur when real collisions appear.
Fig. 19: (Upside row): In this example, two parts of a contour come to each
other so close that a change of topology provokes a bad operation. (Downside
row): With the new approach no changes of topology appear and the contour
can evolve along the cavity.
Fig. 20: Contour evolution based on inflating potential and external potential
corrupted by noise (binary salt and pepper). (Upside row): Without topologic
transformation capabilities the contour is anchored in the corrupted locations.
(Downside row): The changes of topology based on the new module permit to
leap these locations when they are surrounded.
Fig. 21: Flow diagram of the new PLS algorithm containing all the imple-
mented CNN operations. The active contour image is externally provided for
the first iteration (indicated with a dashed line).
Fig. 22: Patterns and local rules for the templates of the directional contour
thinning and for the collision point detection along the North direction. For
the processing along the other three cardinal directions the resulting templates

25
should be suitably rotated. Note that the initial state always makes reference
to the previous state of the central cell of the corresponding pattern.
Fig. 23: Contour evolution through binary labyrinths. Initially, the labyrinth
is explored by an active contour which evolves controlled by inflating forces.
After, the guiding information is switched to deflating forces to compress the
contour and finally define the shortest path.
Fig. 24: Contour evolution through a labyrinth with seven pixels of width.
In this example there are two different solutions to the shortest path problem.
The algorithm guarantees to result in at least one of the shortest paths.
Fig. 25: Several snapshots of a contour evolution based on inflating potential.
(Upside row): City-block distance resulting from one BPE per cycle (iter=1,
15, 30, 45, 61). (Downside row): Maximum distance resulting from one BPE
per iteration (iter=1, 7, 15, 23, 31).
Fig. 26: Several snapshots of a contour evolution to define the shortest path
from the start point and the target (surrounded in white and black respectively
in the first picture of both sequences). (Upside row): Shortest path based on
the City-block distance. (Downside row): Shortest path based on the Maximum
distance.
Fig. 27: Several snapshots of a contour evolution towards quasi-optimal routes
from the results in Fig 26. The collision of the contour produces an open contour
anchored in the ends (start and target points). Therefore the internal potential
will smooth the contour constrained by the obstacles into the scene.
Fig. 28: Determination of a quasi-optimal route from a start point (surrounded
in white in the first picture) and a given target (surrounded in black in the first
picture) by three consecutive PLS-processing based on different switch configu-
ration. (a): labyrinth with the start point and the target, (b): exploration step,
(c): path definition step, (d): route optimization step.
Fig. 29: Quasi-optimal routes from a start point (surrounded in white in the
first picture) and different targets (surrounded in black in the first picture).
Fig. 30: Example of segmentation of blood vessel in an angiogram of retina
from several initial contours. The sequence goes from left to right and top to
bottom.
Fig. 31: External potential estimation for the contour location in US images
of the human left ventricle. The external potential is derived from an inverted
version of the US frame filtered by a local diffusion which reinforces the evolution
towards high intensities (clear pixels), combined with the result of a diffused
edge detection onto this image which encourages the contour evolution towards
edges. kf il and kdif are constants which weigh the influence of the filtered image
and the image resulting from the diffused edge detection.
Fig. 32: Contour tracking of a human left ventricle from four 2D ultrasound
sequences corresponding to different orientation planes. First row: apical two
chamber view; second row: apical four chamber view; third row: parasternal
long axis view; fourth row: parasternal short axis view.
Fig. 33: Contour tracking in 3D ultrasound echocardiography. The sequence
goes from left to right and top to bottom.
Fig. 34: Contour tracking in 3D ultrasound echocardiography. The sequence
goes from left to right and top to bottom.
Fig. 35: Contour tracking in 3D ultrasound echocardiography. The sequence
goes from left to right and top to bottom.

26
Fig. 36: Contour tracking in 3D ultrasound echocardiography. The sequence
goes from left to right and top to bottom.
Fig. 37: Contour tracking in 3D ultrasound echocardiography. The sequence
goes from left to right and top to bottom.

27
GFE

Guiding Forces Sign of the Forces

North North

External Potential Active Contour

East East

South South

West West

Figure 1:

28
Contour

IPE

Internal Potential

Figure 2:

29
Figure 3:

30
External Potential

Guiding Information
Extraction

Contour Evolution

Topologic Transformations

Contour Image

Figure 4:

31
Deflating Potential Compression Forces

Contour Image Region Image

Inflating Potential Expansion Forces

Figure 5:

32
Figure 6:

33
(a): GFE Output (b): Contour Image (c): DCE Output (d): DCT Output

Figure 7:

34
Contour Image

Contour
Expansion

Contour
Thinning

Step 1 Step 2 Step 3 Step 4 Step 5 Step 6

Figure 8:

35
Step 1 Step 2 Step 3 Step 4 Step 5

Figure 9:

36
(a): GFE Output (b): Contour Image (c): DCE Output (d): DCT Output

Figure 10:

37
Contour Image

Contour
Expansion

Contour
Thinning

Step 1 Step 2 Step 3 Step 4 Step 5 Step 6

Figure 11:

38
Step 1 Step 2 Step 3 Step 4 Step 5 Step 6

Figure 12:

39
Figure 13:

40
Figure 14:

41
Contour Image

Background pixel

Contour pixel

Collision point (CPD)

Collision point selection Split of the old contours

Merging of the new contours

Figure 15:

42
Contour Image

HOLE FILLING

OPENING

EDGE

Contour Image

Figure 16:

43
Figure 17:

44
Figure 18:

45
Figure 19:

46
Figure 20:

47
GFE
Kext External Potential

D_Gr B
+ Kinf

Kint
A

THRES

AND

DCE
SHIFT B BPE

NOT
OR Scpd AND
AND
XOR
OR CPD
NOR

DCT H_F
B B

DCT1 CPD3 B

Sinf
OR

DCT2 B
CPD2 B IPE
DIFFUS
A
OR
CPD1 B

B
DCT3

OR

TP
B
H_F B
OPEN A/B
EDGE

Contour Image

Figure 21:

48
DCT1 Otherwise keep initial state

DCT2 Otherwise

DCT3 Otherwise

CPD1 Otherwise

CPD2 Otherwise

CPD3 Otherwise

Figure 22:

49
Figure 23:

50
Figure 24:

51
Figure 25:

52
Figure 26:

53
Figure 27:

54
(a) (b) (c) (d)

Figure 28:

55
Figure 29:

56
Figure 30:

57
US Image

LC_DIFFUSION

THRESHOLD

EDGE
X kfil

-
DIFFUSION
- External Potencial

kdif X

Figure 31:

58
Figure 32:

59
Figure 33:

60
Figure 34:

61
Figure 35:

62
Figure 36:

63
Figure 37:

64

You might also like