Dynamicparticle System for Object structure extraction
Dynamicparticle System for Object structure extraction
ABSTRACT
A new deformable model based on the use of a particle system is introduced. By defining the local behavior
of each particle, the system behaves as an active contour model showing a variable topology and
regularization properties. The efficiency of the particle system is illustrated by two applications: the first one
concerns the use of the system as a skeleton extractor based on the propagation of particles inside a tree-
shaped object. Using this method, it is possible to generate a cartography of structures such as veins or
channels. In a second illustration, the system avoids the problem of initialization of a piecewise cubic B-
spline network used to straighten curved text lines.
35
LAVIALE O ET AL: Dynamic particle system for object structure extraction
Our goal is to encourage the particle system to evolution follows the classical Newtonian mechanical
explore the image. Towards that end, interaction rules relation:
between particles have to be defined. A repulsion
behavior allows the system to expand; an attractive dvi (t )
mi ⋅ = Fi , (4)
behavior forces particles not to move away from other dt
particles. Thus, internal forces are defined through the
introduction of a Lennard-Jones interaction potential mi stands for the mass of the particle. For our
function gathering a long-range attraction term and a purpose, mi is a constant and can be included in
short-range repulsion term (Heyes, 1998). Classically, Fi. The numerical integration of this differential
the Lennard-Jones potential describes the interaction equation is obtained using the Euler integration
between pairs of atoms in a solid or a liquid. It has method. This leads to the choice of a time interval
the following form: parameter, resulting from a precision/computation
time compromise. Then, (4) becomes:
σ 12 σ 6
φ (r ) = ε − , (1) vit = vit −1 + δ t ⋅ ( Fi − α f vit −1 )
r r t , (5)
xi = xit −1 + δ t ⋅ vit
where r is the distance from an atom to an any other
where x it and v it are respectively the position and the
atom. The constants ε and σ are important in that they
determine the strength and shape of the interaction, velocity of a particle Mi at step t. α f is a friction
hence the properties of the solid or liquid. The force coefficient added to ensure the stability of the system.
between individual atoms is the negative of the Our approach consider the evolution of the
potential gradient. system as a solution of a Newtonian mechanical Eq.
Herein, we consider the following function: 4. Another equivalent approach can be proposed by
generating all forces from a unique potential function,
B A
ρ (d ) = − n, (2) so that the evolution of the particle system S will be
d m
d similar to the process involved when minimizing a
global energy, as it is performed when dealing with
where d is the distance between two particles. A, B, m classical active contour (Kass et al., 1988).
and n are positive coefficients used to set the
equilibrium distance. In our application, we chose APPLICATIONS OF THE MODEL
m = 2, n = 1 yielding an equilibrium distance equal to
2B/A. Object structure extraction
Using ρ, we can compute a global interaction The problem of skeleton extraction has found
( t ,i ) many solutions based on mathematical morphology
force f int : algorithms (Serra, 1982). Here, we propose to extract
r structures in grayscale tree-like objects by using the
f int(t ,i ) = − ∑ ρ (d ij ) ,
∇ (3) particle system described above (Angella et al.,1998).
M j ∈υi( t )
The evolution of the system is the consequence of a
(t ) Lennard-Jones interaction force (Eq. 3) complemented
where υ i is the neighborhood of Mi at step t (the with two other internal forces presented in Angella et
notion of neighborhood will be defined in the next al. (1998) within the framework of object structure
section). extraction.
External forces being application-dependent, they The first one provides the system with learning
will be described (along with additional internal abilities: this force, inspired by the so-called
forces) in the next section where two applications are evolutionary computation domain, acts as ”insect
considered. pheromones”, driving particles preferentially to the
paths already used by prior particles (Dorigo and
System evolution Gambardella, 1997). To do so, we build a velocity
One can control the behavior of each particle Mi map Iph using the velocity vit of each particle Mi at
by computing Fi, the total resulting force. Then, if we each step t of the algorithm. This map saves the
consider that each particle is a mechanical system, its average of the velocity observed in each pixel p of the
36
Image Anal Stereol 2003;22:35-42
( )
gradient of the image I, defined as follows:
r j = arg min x kt − x im
f ext = −k ext ⋅ ∇( ∇G ∗ I ), (8)
k / M k ∈S
37
LAVIALE O ET AL: Dynamic particle system for object structure extraction
− Addition and convergence: when a particle has an are removed and new links have to be found
empty neighborhood, a neighbor must be found leading to a topology change.
among the other particles using the algorithm This simultaneous evolution of S and L allows a
above. This situation happens for a newly hierarchical exploration of the object and overcomes
generated particle or for a particle whose links are the topology changes problem. Finally, the approach
cut to remain consistent with the object structure. returns a hierarchical, connected, and piecewise linear
In addition, the system can hold optional “skeleton” of the object without any post-processing.
convergence cases, leading to cycle generations,
so that the tree becomes a graph including loops. Fig. 2 illustrates the evolution of the system on a
synthetic tree-like object. In this case, all particles are
− Deletion: if a particle Mi moves too far away from generated at the same location with the same initial
its neighbors, its links must be cut. The deletion velocity vector. The tree update process consists in
process is just based on a deletion distance. adding, deleting or shifting links according to the
− Divergence and shift: the divergence, or shift geometric relations between the particles and taking
behavior, occurs around a junction in the object the trajectories into account (Angella et al., 1998). In
structure. It is a local reorganization of the set of this example, the evolution stops because of the
links. To understand how the tree is updated, let initialization vicinity test.
us analyze Fig. 1. In the vicinity of a junction Fig. 3 shows a result obtained on a more complex
(step a), the particle M2 does not follow the image. The simultaneous use of a particle system and
particle M1, so that at step b the structure of the tree generation yields the skeleton of the river in an
links in L does not reflect the structure of the aerial image. The particles are generated from the
object. At step c, we decide to cut all links to M2 top-left of the structure and are then allowed to explore
and to suitably reconnect the tree at step d. This the object. Fig. 3a and 3b show the trajectories of the
topology change is tractable if one finds a particles and the resulting structure, respectively.
criterion to decide when cutting the skeleton at Note that some ramifications are not explored: some
step c. The rule adopted is based on angle image areas do not provide the particles with relevant
comparisons considering that the angle between external forces due to a low contrast between the
two links associated to a given particle has to be object and its environment. In addition, the object
greater than a fixed minimal angle θjunction. If it is structure may become too thin at the end of a
not the case, a junction is detected, the two links ramification to allow the extension of the system.
Fig. 1. Links update in the divergence-shift case. Particles are moving from right to left.
38
Image Anal Stereol 2003;22:35-42
a) b) c)
d) e) f)
Fig. 2. Synthetic tree-like object. 2a, 2b, 2c and 2d: Evolution of the particle system. 2e: Particle trajectories.
2f: final tree
a) b)
Fig. 3. Real tree-like object structure extraction. 2a) particle trajectories. 2b) main ramifications of the
skeleton for an aerial image.
39
LAVIALE O ET AL: Dynamic particle system for object structure extraction
position of the sth spline of Ci. The internal energy is (Deriche, 1987). The smoothing resulting from the
defined by assuming that the text is locally uniform use of this operator is necessary to extend the
(i.e. line spacing is constant). Thus, our purpose is to influence of the lines, and then to attract the curves
move each curve toward the centre of its two neighbors: toward the solution
2 Fig. 4c shows the value of the vertical gradient
E k ,s
int
1
2
( )
(i ) = aik , s − aik−,1s + aik+,1s . (11) ∇I y . Finding the bottom of the lines is done with a
very simple energy functional: E ext = −∇I y leading
The system evolves along the vertical direction
from an initial location. In addition to the internal to the external force:
r
f ext = k ext ⋅ ∇(∇I y ) .
energy defined above, we introduce an interaction
force based on a Lennard-Jones potential between the (12)
control points of neighboring curves to force them to
All curves are generated at an initial location yinit
move from their initial location.
with an initial velocity vinit. The evolution of the
The minimization of an appropriate external system follows the classical mechanical relation
energy will allow to attract the curves toward the text. described in the previous section.
The computation of this energy is based on a
Fig. 5 shows an example of distorted text. Fig. 6
mathematical morphology transformation: we first
illustrates the evolution of the curve system on a
use an opening on the original image to fill in spaces
detail of Fig. 5. The curves are initialized at the
between letters. Fig. 4b shows the result obtained
middle of the page. After 150 iterations, each curve
with a structuring element of size 11 × 5. Then,
system has converged toward a text line and the
considering the bottom of the lines, the external
straightening is possible (Fig. 7).
energy is computed using a vertical Deriche gradient
a) b) c)
Fig. 4. a) curved text, b) opening of 4a, c) vertical gradient computed from 4a.
40
Image Anal Stereol 2003;22:35-42
a b
c d
Fig. 6. Evolution of a curve system.
41
LAVIALE O ET AL: Dynamic particle system for object structure extraction
42