II. D
ESCRIPTION OF THE METHOD
Let
X
=
{
x
i

i
= 1
,...,N
}
be the set of points describingthe shape and
E
=
{
i

i
= 1
,...,K
}
be the set of linesdescribing the shape segments, where
i
is the line describingthe
i
th segment. The whole process may be viewed under theconcept of a ratedistortion strategy.We deﬁne the Distortion
∆
induced by the representationof line segments:
∆(
X,E
) =
N
i
=1
K
j
=1
δ
ij
d
(
x
i
,
j
)
,
(1)where
K
is the number of line segments the model uses todescribe the contour of the shape,
x
i
∈
R
2
,
i
= 1
,...,N
arethe points of the shape,
d
(
x
i
,
j
)
is the perpendicular distanceof point
x
i
to line
j
,
δ
ij
is an indicator function whose valueis
1
if point
x
i
corresponds to line segment
j
, i.e. is closerto line
j
than any other line
k

k
=1
...N,k
=
j
, otherwise it is
0
.In order to prevent overﬁtting, models having a large number of line segments should be penalized. Therefore, an idealshape representation would be the one with simultaneouslylow value of
∆
and low complexity.The computation of the ellipses, representing the shapesegments, is performed in two steps: an iterative
split process
,where the shape contour is approached by a number of linesegments represented by the major axes of the correspondingellipses, and an iterative
merge process
, where small linesegments are merged to reduce the model complexity. The splitprocess tries to minimize the distortion of the shape while themerge process increases the compression rate, i.e. the numberof line segments compared to the total number of points inthe set. In what follows the two steps are presented in detail.
A. Split Process
The ultimate goal of this step is to cover the shape withline segments representing the long axes of elongated ellipsesand therefore, each point of the shape should be assigned toan eccentric ellipse. A split criterion is deﬁned, based on theGestalt theory [14]. It models the linearity and the connectivitythe human brain uses when modeling contours.In order to split a shape segment
X
, it should be either nonlinear or non connected, or both. Linearity describes how closeto a straight line points of
X
are, while connectivity measureshow close these points are. In our method linearity is describedby the minimum eigenvalue of the covariance matrix of thepoints of
X
. The connectivity is the maximum gap betweentwo successive points. In order to determine it,
X
is projectedonto the two axis of the ellipse corresponding to the covariancematrix of
X
. Let
X
1
,
X
2
be the projections of
X
on the majorand the minor axis respectively. Then each
X
i

i
=
{
1
,
2
}
is sortedand the connectivity
W
i

i
=
{
1
,
2
}
is computed:
W
i

i
=
{
1
,
2
}
= max
j
=1
...N
−
1

x
ji
−
x
j
+1
i

.
(2)where
N
is the number of points in
X
and
x
ji

i
=
{
1
,
2
}
is the
j
−
th
point of the sorted
X
i

i
=
{
1
,
2
}
. The larger the connectivity,the better (more explicit) the distinction between the sets is.The split direction followed is the one providing the largest
W
i

i
=
{
1
,
2
}
.Eventually, the adopted strategy that minimizes
∆
andprivileging elongated ellipses obeys to the following rule: splitevery ellipse whose minimum eigenvalue is greater than athreshold
T
1
(linearity) and the maximum gap, within thecurrent segment is greater than a threshold
T
2
(connectivity).The process is initialized with one ellipse, corresponding tothe covariance of the initial points set centered at the meanvalue of the shape.At time step
t
+ 1
, a given ellipse, characterized by theeigenvalues
λ
t
1
and
λ
t
2
of its covariance matrix
Σ
t
(with
λ
t
1
≥
λ
t
2
), with center
µ
t
, is split to to new ellipses with centers thetwo antipodal points on the major axis:
µ
t
+11
=
µ
t
+
√
λ
t
e
t
,
µ
t
+12
=
µ
t
−√
λ
t
e
t
,(3)where
e
t
,
λ
t
are the eigenvector, eigenvalue respectively corresponding to the split direction along which split is performed(ﬁgure1).The shape points are then reassigned to the new ellipsesaccording to the nearest neighbor rule applied only to thoseof the initial cluster that was split. By these means, newellipses occur, which are more elongated as they have greatereccentricity and their minor axes are closer to the shapecontour (ﬁg.2). Moreover, this detailed representation of thepoint set provides high accuracy modeling of joints, cornersand parts of the shape exhibiting high curvature.In order to describe accurately a shape segment, the covariance of the points deﬁning the convex hull, instead of thewhole set, is computed, providing thus a more sensitive tooutliers ellipse ﬁt, describing better the spatial distribution of the points and providing a more precise split criterion anddirection.
B. Merge Process
The role of the merge process is to reduce the complexity of the model. There are many adjacent ellipses whose major axeshave similar orientation and it would be beneﬁcial to mergethem and replace them by a more elongated ellipse. Therefore,in this step, ellipses are merged by a similar in spirit rule as inthe split process: merge two consecutive ellipse if the resultingellipse has minimum eigenvalue smaller than a threshold
T
1
(linearity) and the marginal width between the two clusters issmaller than a threshold
T
2
(connectivity).Notice that the threshold
T
1
may be equal to the thresholdused in split process, where the value of parameter
T
1
speciﬁeswhether an ellipse has low eccentricity and needs to be split.In the merge process, it indicates whether two candidatefor merging ellipses would result in an ellipse with higheccentricity. On the other hand, a relaxation of the mergethreshold may lead to a rougher model of the shape, smoothingout details like joints. In our experiments, the merge thresholdwas the same with the split threshold. The same applies for