.........1111111111111111111111111111111111111.........
.........1111111111111111111111111111111111111.........
11111111122222222222222222222222*3*******22222111111111
1111111112222222222222222222222************222111111111
11111111122222222222222222222***************22111111111
11111111122222222222222222*******************2111111111
11111111122222222222*************************2111111111
1111111112222222222****************55555******111111111
1111111112222222222*************555555555*****111111111
111111111222222222*********55*55555555555*****111111111
1111111112222222**********555555555555555*****111111111
11111111122222***********5555555555555555*****111111111
1111111112222***********55555555555555555*****111111111
1111111112222**********555555555555555555*****111111111
1111111112222*********555555555555555555******111111111
1111111112222*********555555555555555555*****2111111111
11111111122223********55555555555555555*****22111111111
11111111122223*******55555555555555555******22111111111
111111111222233******55555555555555555******22111111111
1111111112222333*****5555555555555555******222111111111
1111111112222333*****555555555555555******2222111111111
1111111112222333****555555555555555******22222111111111
111111111222233*****5555555555555*******222222111111111
111111111222233*****55555555555*******22222222111111111
11111111122223******555555555********222222222111111111
11111111122223******55555555********2222222222111111111
11111111122223******555555*********22222222222111111111
11111111122223******55555********2222222222222111111111
11111111122223*******5**********22222222222222111111111
11111111122223*****************222222222222222111111111
1111111112222*****************2222222222222222111111111
111111111222*****************22222222222222222111111111
11111111122*****************222222222222222222111111111
11111111122*************2222222222222222222222111111111
11111111122***********222222222222222222222222111111111
111111111223*******222222222222222222222222222111111111
111111111223******2222222222222222222222222222111111111
11111111122******22222222222222222222222222222111111111
11111111122******22222222222222222222222222222111111111
11111111122******22222222222222222222222222222111111111
11111111122******22222222222222222222222222222111111111
11111111122******22222222222222222222222222222111111111
11111111122******22222222222222222222222222222111111111
11111111122******22222222222222222222222222222111111111
1111111112******222222222222222222222222222222111111111
1111111112******222222222222222222222222222222111111111
1111111112******222222222222222222222222222222111111111
1111111112******222222222222222222222222222222111111111
1111111112*****2222222222222222222222222222222111111111
111111111******2222222222222222222222222222222111111111
111111111*****22222222222222222222222222222222111111111
111111111*****22222222222222222222222222222222111111111
1111111112****22222222222222222222222222222222111111111
11111111122***22222222222222222222222222222222111111111
.........1111111111111111111111111111111111111.........
1:
266.5 257.0
266.5 257.0
2:
186.5 274.5
91.0 475.0
3:
20.5 4.5
5.0 0.0
4:
0.0 0.0
0.0 0.0
5:
101.0 174.5
3.5 0.0
Figure 4: Background features extracted from input consid-
ering 4 sub-regions.
.......................................................
.......................................................
................................1.1111111..............
...............................111111111111............
.............................111111111111111...........
..........................1111111111111111111..........
....................1111111111111111111111111..........
...................1111111111111111.....111111.........
...................1111111111111.........11111.........
..................111111111..1...........11111.........
................1111111111...............11111.........
..............11111111111................11111.........
.............11111111111.................11111.........
.............1111111111..................11111.........
.............111111111..................111111.........
.............111111111..................11111..........
..............11111111.................11111...........
..............1111111.................111111...........
...............111111.................111111...........
................11111................111111............
................11111...............111111.............
................1111...............111111..............
...............11111.............1111111...............
...............11111...........1111111.................
..............111111.........11111111..................
..............111111........11111111...................
..............111111......111111111....................
..............111111.....11111111......................
..............1111111.1111111111.......................
..............11111111111111111........................
.............11111111111111111.........................
............11111111111111111..........................
...........11111111111111111...........................
...........1111111111111...............................
...........11111111111.................................
............1111111....................................
............111111.....................................
...........111111......................................
...........111111......................................
...........111111......................................
...........111111......................................
...........111111......................................
...........111111......................................
...........111111......................................
..........111111.......................................
..........111111.......................................
..........111111.......................................
..........111111.......................................
..........11111........................................
.........111111........................................
.........11111.........................................
.........11111.........................................
..........1111.........................................
...........111.........................................
.......................................................
163.75 207.75
205.50 15.00
Figure 5: Foreground features extracted from input consid-
ering 4 sub-regions.
one unit. This process allows to distinguish four
different categories of background pixels, accor-
ding to their projection values (1, 2, 3, 4). Zero-
valued counters are discarded. An additional cate-
gory with value 5 is added to provide disambigua-
tion information: this value substitutes the value
of 4 if the pixel lies in an isolated background
area. Eventually, the feature vector derived for
each sub-region contains five descriptors which
depict the proportion of pixel area covered by
each of the projection categories considered. An
example can be seen in Fig. 5.
• Contour area: the contour of the object is encoded
by the links between each pair of 8-neighbor
pixels using 4-chain codes in the manner proposed
by (Oda et al., 2006). These codes are used to ex-
tract four vectors (one for each direction), and the
proportion of pixel area covered by the number of
each code is counted for the different sub-regions
considered. Figure 6 shows an example of this
feature extraction process.
1:
22.5 18.0
35.5 0.0
2:
18.5 25.5
14.0 6.0
3:
12.5 23.0
10.0 0.5
4:
1.0 6.0
1.0 0.0
.......................................................
...............................3333333334..............
..............................2..........34............
............................32.............4...........
.........................332................4..........
...................333332....................1.........
..................2..........................1.........
..................1................3334.......1........
.................2..............332....4......1........
...............32.............32........1.....1........
.............32...........3332..........1.....1........
............2............2..............1.....1........
............1...........2...............1.....1........
............1..........2...............2......1........
............1.........2................1......1........
............1.........1...............2......2.........
............1.........1..............2......2..........
.............1.......2...............1......1..........
.............1.......1..............2.......1..........
..............4......1.............2.......2...........
...............2.....1............2.......2............
..............2.....2...........32.......2.............
..............1.....1.........32........2..............
.............2......1.......32........32...............
.............1......1......2.........2.................
.............1......1....32.........2..................
.............1......1...2..........2...................
.............1.......332.........32....................
.............1..................2......................
............2..................2.......................
...........2..................2........................
..........2..................2.........................
..........1.................2..........................
..........1.............3332...........................
..........1...........32...............................
..........1........332.................................
..........1.......2....................................
..........1......2.....................................
..........1......1.....................................
..........1......1.....................................
..........1......1.....................................
..........1......1.....................................
..........1......1.....................................
.........2.......1.....................................
.........1......2......................................
.........1......1......................................
.........1......1......................................
.........1......1......................................
........2......2.......................................
........1......1.......................................
........1.....2........................................
........1.....1........................................
........1.....1........................................
.........4....1........................................
..........3332.........................................
Figure 6: Contour features extracted from input considering
4 sub-regions.
2.2 Meta-features based on Weak
Classifiers
As discussed previously, a set of weak classifiers with
which to map each group of features onto confidence
values is needed. In this regard, each weak classifier
has been obtained considering a formula based on the
Nearest Neighbor (NN) rule (Cover and Hart, 1967)
given its conceptual simplicity.
Each weak classifier is trained using a leaving-
one-out scheme: each single sample is isolated from
the training set T and the rest are used in combination
with the NN to produce the confidence values. The
formula detailed below is inspired by (P
´
erez-Cort
´
es
et al., 2000). If x is a training sample, then the confi-
dence value for each possible class w ∈ Ω to represent
instance x is based on the following equation:
p(w|x) =
1
min
x
0
∈T
w
,x6=x
0
d(x, x
0
) + ε
(1)
where T
w
is the training set for w label and ε is a
non-zero value provided to avoid infinity values. In
our experiments, the dissimilarity measure d(·, ·) is
the Euclidean distance. After calculating the proba-
bility for each class, the values are normalized such
that
∑
w∈Ω
p(w|x) = 1.
Once each training sample has been mapped onto
the probability matrix M, the samples can be used in
the test phase.
2.3 Final Classifiers
Once the meta-features have been calculated they are
fed into a conventional classifier to compute a class
hypothesis. Given that each of the |D| weak classifiers
is retrieving a vector of |Ω| features, two classification
paradigms may be considered for this last stage: on
the one hand, we may construct the M matrix by
Recognition of Handwritten Music Symbols using Meta-features Obtained from Weak Classifiers based on Nearest Neighbor
99