those curves whose end points and the length coin-
cide, have the same straightness index. But the diver-
sity of such curves is huge and the straightness index
cannot distinguish among them, which could be a big
drawback in certain applications. Some illustrations
using simple polygonal curves are shown in Fig. 1.
Figure 1: Five displayed curves (solid lines) have different
linearities measured by L(C ). The straightness index has
the same value for all three curves.
In this paper we define a new linearity measure
L(C ) for open curve segments. The new measure sat-
isfies the basic requirements (listed above) which are
expected to be satisfied for any curve linearity mea-
sure. Since it considers the distance of the end points
of the curve to the centroid of the curve, the new mea-
sure is also easy to compute. The fact that it uses the
curve centroids implies that it takes into account a rel-
ative distribution of the curve points.
The paper is organized as follows. Section 2 gives
basic definitions and denotation. The new linearity
measure for planar open curve segments is in Section
3. Several experiments which illustrate the behavior
and the classification power of the new linearity mea-
sure are provided in Section 4. Concluding remarks
are in Section 5.
2 DEFINITIONS
AND DENOTATIONS
Without loss of generality, throughout the paper, it
will be assumed (even if not mentioned) that every
curve C has length equal to 1 and is given in an arc-
length parametrization. I.e., planar curve segment C
is represented as:
x = x(s), y = y(s), where s ∈ [0, 1].
The parameter s measures the distance of the point
(x(s), y(s)) from the curve start point (x(0), y(0)),
along the curve C .
The centroid of a given planar curve C will be de-
noted by (x
C
, y
C
) and computed as
(x
C
, y
C
) =
Z
C
x(s) ds,
Z
C
y(s) ds
. (1)
Taking into account that the length of C is as-
sumed to be equal to 1, we can see that the coordi-
nates of the curve centroid, as defined in (1), are the
average values of the curve points.
As usual,
d
2
(A, B) =
q
(x − u)
2
+ (y − v)
2
will denote the Euclidean distance between the points
A = (x, y) and B = (u, v).
As mentioned, we introduce a new linearity mea-
sure L(C ) which assigns a number from the interval
(0, 1]. The curve C is assumed to have the length 1.
More precisely, any appearing curve will be scaled by
the factor which equals the length of it before the pro-
cessing. So, an arbitrary curve C would be replaced
with the curve C defined by
C =
1
R
C
a
ds
· C
a
=
x
R
C
a
ds
,
y
R
C
a
ds
| (x, y) ∈ C
a
Shape descriptors/measures are very useful for
discrimination among the objects – in this case open
curve segments. Usually the shape descriptors have a
clear geometric meaning and, consequently, the shape
measures assigned to such descriptors have a pre-
dictable behavior. This is an advantage because the
suitability of a certain measure to a particular shape-
based task (object matching, object classification, etc)
can be predicted to some extent. On the other hand, a
shape measure assigns to each object (here curve seg-
ment) a single number. In order to increase the perfor-
mance of shape based tasks, a common approach is to
assign a graph (instead of a number) to each object.
E.g. such approaches define shape signature descrip-
tors, which are also ‘graph’ representations of planar
shapes, often used in shape analysis tasks (El-ghazal
et al., 2009; Zhang and Lu, 2005), but they differ from
the idea used here.
We will apply a similar idea here as well. To
compare objects considered we use linearity plots to
provide more information than a single linearity mea-
surement. The idea is to compute linearity incremen-
tally, i.e. to compute linearity of sub-segments of C
determined by the start point of C and another point
which moves along the curve C from the beginning
of to the end of C. The linearity plot P(C ), associated
with the given curve C is formally defined as follows.
Definition 1. Let C be a curve given in an arc-length
parametrization: x = x(s), y = y(s), and s ∈ [0, 1]. Let
A(s) be the part of the curve C bounded by the start-
ing point (x(0), y(0)) and by the point (x(s), y(s)) ∈ C .
Then, for a linearity measure L, the linearity plot
P(C ) is defined by:
P(C ) = {(s, L(A(s)) | s ∈ [0, 1]}. (2)
We also will use the reverse linearity plot P
rev
(C )
defined as:
P
rev
(C ) = {(s, L(A
rev
(1 − s)) | s ∈ [0, 1]}, (3)
MeasuringLinearityofCurves
389