In a general case, more R
ik
for a given i
Δφ
be
obtained (Parker, 1998).
The approach proposed here consists of tracking
the contour pixel by pixel and building a signature
taking into account the local dynamics of the
contour. With this approach sampling is performed
at a variable step. The algorithm of shape signature
determination consists of the following steps:
1. Extracting all object contours.
2. Calculating coordinates of a chosen reference
point P
R
(x
R
, y
R
).
3. Tracking an external contour C.
4. For each pixel C
j
(x
j
, y
j
), calculating a distance
R
j
from the point P
R
and an angle
φ
j
as arctan(( y
j
– y
R
)/(x
j
– x
R
)) and storing them
in a signature mapping table S[
φ
j
, R
j
].
5. Determining a maximal distance R
MAX
.
6. Rewriting chosen normalized values R
j
/R
MAX
to a modified signature table.
7. Repeating the whole procedure for all internal
contours of openings in the analyzed object
(steps 4-6).
The choice of consecutive points from the
signature mapping table S[
φ
j
, R
j
], to rewrite them
into the modified signature table, is determined by
three parameters, which describe sampling process:
Δ
R/R − the relative pixel distance change
parameter between consecutive signature
points (the fundamental sampling condition
meaning that for consecutive point
|
R
j+1
−
R
j
|
/ R
MAX
≥
Δ
R/R );
φ
MIN
− the minimal angle change between
signature samples (a condition guaranteeing
that between consecutive modified signature
points the angle increment will not be less
then a predefined value
|
φ
j+1
-
φ
j
|
≥
φ
MIN
);
φ
MAX
− the maximal angle change (the angle
increment will not be greater then a predefined
value
|
φ
i+1
-
φ
i
|
≤
φ
MAX
).
This process determines a modified signature
taking into account the dynamics of the shape. For
Δ
R/R = 0 classic shape signature is obtained for step
Δφ
=
φ
MIN
. The choice of the reference point P
R
should not be accidental to ensure the invariance
with regard to the object translation in the frame.
The less subject to disruption the location of P
R
, the
more precise the descriptor. The normalization with
respect to R
MAX
lets the descriptor to be invariant
regards to the scale change.
In the presented approach, the essential element
for signature comparison is the signature area. In the
case of some convex shapes, the signature area
corresponds to the area delimited by a curve built of
signature points. In the case of some concave objects
and objects with openings, in order to determine the
signature area, there is a need for interpolation of the
modified signature. This is a consequence of the
variable sampling rate and the independent external
and internal contours tracking. After extending the
modified signature to each spike, the appropriate
region filling is made (Fig. 1). At this stage, the
information from contour tracking algorithm is used.
3 SIMILARITY OF PLANAR
OBJECTS
Object similarity analysis, while signatures represent
shapes, refers to the comparison of signature areas
(Parker, 1998). For comparison the XOR operation
between the spikes of two signatures is used.
Comparison is made with respect to the
corresponding values of scanned angles. The
calculated difference between areas is related to the
reference area and this relative symmetric area
difference is taken as a coefficient of non-similarity
of compared shapes (DISS coefficient). As the
reference area, an area of the box bounding signature
or an area of one of the compared signatures is
taken. To suppress nonlinear effects, due to the
transformation from the Cartesian coordinate system
to the polar coordinate system, R
j
2
/R
2
MAX
values in
XOR operation are used, while calculating signature
area. In this way, weight coefficient of an area pixel
is proportional to the pixel distance from the
reference point, as every area pixel represents the arc
length of circle section determined by
φ
MIN
and R
j
.
Such a coefficient is denoted as DISSW.
Rotational invariance is obtained by repeated
calculations of signature area differences, each time
cyclically translating one signature with respect to
the other. The minimum of calculated XOR values
(i.e. XOR value for the best matching of shape
signatures) determines the DISSW coefficient value
(3). With the classic approach, both signatures have
N spikes, for the same angle values. In the proposed
approach, modified signatures consist respectively
of N
1
≤
N and N
2
≤
N spikes. In the case of classic
signatures, N
2
comparisons are required (for N area
spikes and N shifts). In the proposed modification
case, only N
1
N
2
comparisons are performed, because
the second signature is shifted only N
2
times and
compared for N
1
angle values. Spikes are not
available for all angle values, thus to calculate XOR
area difference an interpolation has to be performed.
VISAPP 2007 - International Conference on Computer Vision Theory and Applications
226