Anda di halaman 1dari 6

Combining Global and Local Features for Writer Identification

Imran Siddiqi Nicole Jincent


Laboratoire CRIP5 SIP
Universite Paris Descartes Paris 5
45, rue des Saints-Peres, 75006 Paris
siddiqi;nicole.vincent}math-inIo.univ-paris5.Ir
Abstract

This communication presents an effective method for
writer identification in handwritten documents. We have
developed a two-step approach, the first one dividing the
handwritings into distinct classes according to the writing
stvle and the second one identifving the writer of the
unknown document, searching within the specific writer
class. In the first step a set of gabor filters is applied to the
document image and similar writings are grouped together
based on the gabor response in each direction. In the
second step the writing is divided into a large number of
small sub-images, and morphologicallv similar sub-images
are clustered together. The patterns, which occur
frequentlv for a writer are thus extracted. The writer of the
unknown document is identified bv finding the writing stvle
class to which it belongs and then using a Bavesian
classifier on the extracted subset. The svstem trained and
tested on 100 documents of the same number of authors,
achieved an identification rate of 92.
Keywords: Writer IdentiIication, Gabor Iilters, Clustering,
Bayesian classiIier.
1. Introduction
Research in writer identiIication has received renewed
interest over the past Iew years and a wide variety oI
identiIication methods have been proposed. These
techniques can be classiIied into two main types: global
and local approaches. The global methods are based on the
Iact that overall look and Ieel oI the writing Irom a writer is
mostly similar hence try to identiIy the writer independent
oI the text written. The local methods on the other hand
identiIy the writer based on localized Ieatures oI writing,
which are inherent in the way a writer speciIically writers
characters |6|. Among the well-known global approaches,
Said et al |10| presents an identiIication system where each
handwriting is considered as a diIIerent texture. Pareti |9|
models the distribution oI patterns occurring in handwritten
texts by ZipI law, the respective ZipI curve characterizing
the writer. The Iractal dimension oI handwriting has also
been proved to distinguish one writing Irom another |2|.
Schomaker |11| computes a code book oI connected
component contours (CO3) Irom an independent training
set and employs the probability-density Iunction oI CO3s
oI the unknown writing, to identiIy its author. BenseIia |1|
uses local Ieatures based on graphemes that are produced
by a segmentation algorithm based on the analysis oI the
minima oI the upper contour |8|. The edge-based
directional probability distributions have been used as
Ieatures in |3| and the identiIication perIormance is
compared to a number oI non-angular Ieatures. Srihari |14|
establishes the individuality oI handwriting by extracting a
set oI macro (global) and micro (local) Ieatures.
Combining the texture level |11| and allograph level
Ieatures |3| is known to improve the identiIication results
|4| and our research is inspired by the same idea. However,
we do not perIorm a Iusion oI Ieatures, instead we propose
a two-step sequential combination oI global and local
Ieatures. A global analysis Iirst perIorms a broad
classiIication oI handwritings. The local Ieatures are then
used to precisely identiIy the author oI a questioned
sample. The method has been detailed in the section to
Iollow.
2. Proposed Method
In this section we present our method and its application
to writer identiIication. Traditionally, our system can be
divided into two stages, Iirst is the oIIline training oI the
system to enroll the authorized authors and second is the
identiIication oI the writer oI a test document. Our method
relies on the Irequent shapes oI the drawing which is also
the basis oI the method proposed by BenseIia |1|. Indeed
their approach is linked to the way the letters are drawn
and segmented as iI the aim was to read the text. We think
the recognition oI the writer is independent oI what is
written and is more linked to the physical way the lines or
loops are produced, hence the observation scale may be
inIerior to that oI a letter. BeIore this rather close
observation oI the texts, we think a more global vision
could be used to have a coarse idea about the writing. This
will lead to a two-step approach, one based on Gabor
Iilters while the other based on the characteristics oI local
shapes.



2.1. Training
The training oI the system is carried out to create a
reIerence base by extracting the inherent Ieatures oI an
author. In the Iirst phase, we employ a global approach
dividing the document images into distinct classes
according to the writing style. The objective is to readily
discard the writing styles which do not resemble that oI the
writing under study. In the second phase, we develop a
local approach, searching the Irequent details in a writing.
The idea is to extract the patterns that an individual writer
uses redundantly as he writes. The training model oI our
system is illustrated in Iigure 1 and each oI these phases is
discussed in details in the subsections to Iollow.


Figure 1 Training Model
2.1.1. Classification of Writings
Following Marr`s arguments on human perception, we
start with a directional analysis oI the contours oI the trace.
We have chosen the application oI a set oI gabor Iilters to
localize the presence oI oriented segments in handwritings,
allowing their classiIication according to the directional
criteria. The Gabor Iunction is deIined as a Gaussian
Iunction modulated by a sinusoidal wave:




fx e f v x G
v x
v x
2 cos ) , , , (
2
2
2
2
2
1

+
=

With

sin cos
sin cos
x v v
v x x
=
+ =

where 0 is the orientation oI sinusoid, f its Irequency and

x
(respectivelv
v
) the standard deviation oI the gaussian
according to x (respectively v) axis.
Gabor Iilters allow to isolate the contours oI an image at
a direction perpendicular to 0. In case oI handwritten
documents, we apply a set oI Iour gabor Iilters,
corresponding to orientations 0, 45, 90 and 135. The
parameters f and are tuned so as to enhance the text lines,
localizing the high Irequencies. These two parameters
inIluence the results oI the oriented contours segmentation.


Figure 2 Application of a set of four gabor filters with
respective masks
The standard deviation oI the gaussian is chosen to be
inIerior to 1/3 oI the radius oI the mask r in order to
respect the dynamics oI the Gabor Iunction while the
echeloned Irequency is linked to by the Iormula:

3
16 r
f
e
=

where
20
2
* f f
e
=
choosing f : 2, 4, 8 et 16.
The application oI a set oI gabor Iilters is shown in
Iigure 2. One can notice that the resulting contours are not
very precise in localization. Hence to reduce the contour
thickness, we suppress all non-maximal Gabor responses,
keeping only the maximal points amplitudes |5|.

Figure 3 Directional contour map in the vertical (0),
oblique (45and 135) and horizontal (90) directions
Finally, we superimpose the Iour binary maps obtained.
In cases where the same pixel is simultaneously detected by
more than one Iilter, we consider the direction in which the
pixel was most reactive. This results in a contour



directional map as illustrated in Iigure 3.
This study allows the construction oI a direction rose, a
diagram Iiguring the relative proportions between the
directional components oI an object, and is independent oI
the scale oI observation (Iigure 4). During the construction
oI our direction rose, each pixel votes with a normalized
weight proportional to its value on the respective Gabor
map. Hence, the pixels more reactive in a particular
direction have more weight as compared to the less
reactive ones. We keep this direction rose as a Iour
dimensional Ieature vector, representing the writing style oI
its author provided that the observed sample is suIIiciently
representative oI the writing style. Based on these vectors,
a k-means clustering is carried on the training set,
comparing two writings by Euclidean distance in the Iour
dimensional representation space. An important choice in
the k-means algorithm is the number oI clusters to retain.
We have carried out an exhaustive study by calculating the
classiIication error on the training set Ior diIIerent values
oI k. It is estimated by computing the mahanalobis distance
oI the direction rose oI each image in the training set to
each oI the classes; classiIication error being the number oI
images wrongly classiIied. The value oI k which reduces
the classiIication error on the training set to minimum is
thus chosen (k2 Ior our system) allowing us to divide the
reIerence base into two disjoint sets according to the
writing style.

Figure 4 Direction rose for the vector [16.2, 27.0, 24.3,
32.4]
2.1.2. Extraction of local Features
Once similar writings have been grouped together, we
proceed to the study oI local details in a handwriting. We
have shown that within a handwritten text, there exist
redundant patterns which could be exploited by a writer
identiIication system.
To extract these Iorms, the handwritten text is divided
into a large number oI small windows oI size nxn. This size
should be large enough to contain ample inIormation about
the style oI the author and small enough to ensure a good
identiIication perIormance |12|. The simplest method
could be the division oI the entire image regularly Irom leIt
to right and top to bottom and eliminating the windows
which do not contain any part oI text. This not only gives a
large number oI sub-images (containing text pixels), but
the windows are also not well positioned over the text,
dividing some strokes into diIIerent sub-images. Recently,
we proposed a more adaptive approach |13| where a
component-by-component division oI text is carried out.
For each connected component in the text, the vertical
origin is Iixed and a window is displaced Irom leIt to right
to Iind the Iirst text (black) pixel.


















Figure 5 Window Positioning (a) Start of ink trace, (b)
Choice of next side with exiting trace, (c) Initial
position of the next window, (d) Sliding the window
with respect to trace
Problems occurring with these methods oI segmenting
the image are linked to the lack oI invariance oI the line
position within the local window. In the present
communication, we present a new division technique more
adapted to the ink trace. Starting with a connected
component we Iind its skeleton and place the Iirst window
on one extremity oI the skeleton. For each window, we
deIine Iour Ilags namely: East, West, North and South, the
respective Ilag being set iI the skeleton exits Irom that
particular side. II the skeleton exits Irom the E (or W), we
place the next window towards the right (respectively leIt)
oI the current window (on the original component), and
displace it in the vertical direction (up and down) to Iind its
best position. On the other hand, iI the skeleton exists Irom
the N (or S), we place the next window on top (respectively
bottom) oI the current window and move it horizontally
(leIt or right) so that it is well placed over the text. The
method has been illustrated in Iigure 5. In cases where the
skeleton exists Irom more than one side, we treat each oI
the branches separately. The window positioning algorithm
is applied to each oI the components in the image thus
resulting in a division oI handwriting into small sub-
images, shown Ior the word headlines` in Iigure 6. A
comparison oI the regular division (84 windows), the
W
N
E
S
Y Adjust

O
O
O x Skeleton
exiting
Irom east
(a) (b)
(c) (d)
E
X Fixed



method presented in |13| (67 windows), and the proposed
method (59 windows) has been illustrated. The new
method not only reduces the number oI useIul windows but
also improves the window positioning with respect to the
text pixels.






Figure 6 Division of the word headlines (a) Regular
Division, (b) Sliding windows horizontally, (c)
Following the ink trace
Regarding the window size n, we carry out an exhaustive
study with sizes oI 11x11, 13x13, 15x15 and 17x17 and
Iinally Iix it to 13x13 Ior our system. The eIIect oI window
size on identiIication perIormance has been analyzed in
detail in |13|.
Once the text has been divided into sub-images, we
proceed to their clustering. The objective is that the sub-
images which are morphologically similar are grouped in
same classes. We have employed a sequential clustering
algorithm that does not need to know a priori the number
oI clusters to retain. Two sub-images are compared by the
Iollowing correlation similarity measure |1|.

2 / 1
00 10 01 11 00 01 10 11
01 10 00 11
)| )( )( )( |(
) , (
n n n n n n n n
n n n n
Y X S
+ + + +

=


With n
if
being the number oI pixels Ior which the two
sub-images X and Y have values i and f respectively, at the
corresponding pixel positions. The clusters obtained on a
sample image have been illustrated in Iigure 7.
Once the sub-images have been clustered, we sort the
classes and keep only those having suIIicient number oI
elements. The term suIIicient however is relative, so we
pick the top most important M classes which allow to cover
85 oI text pixels in the image.
For each class, we calculate its probability oI occurrence
P(C
i
) and also its covariance matrix:

T
i i i i i
X X Cov ) )( ( =

With X
i
being the matrix whose columns are the
elements (each sub-image represented as a n
2
x1 column
vector) oI class i and n
i
being the arithmetic mean oI class
i. Thus, we construct a vector Ior each class and represent
the document by the set oI these vectors.

} , ), (
i i i i
Cov C P F =

)} ( , C card i F D
i
r
=

Figure 7 Clusters obtained on a document image
2.2. Identification
In the identiIication phase, given a handwriting sample
oI an unknown writer, the objective is to identiIy its writer
among the writers in the reIerence base. The Iirst step
towards identiIication is the recognition oI the writing style
oI the questioned document T. The set oI Iour gabor Iilters
is applied to the image, its direction rose is constructed and
the writing class is identiIied using mahanalobis distance:

( ) ) ) ( ( ) ) ( ( min arg ) (
1
i
T
i
i
rose T rose rose T rose T Class =


where rose(T) represents the vector oI the direction rose
oI document T,
i
rose the mean and L the covariance
matrix oI class i. Hence, we extract a subset S oI the
reIerence base R, having the same writing style as that oI T.
We then proceed to the extraction oI local Ieatures Irom
the test document. We start with the division oI text into
sub-images, Iollowed by their clustering, thus representing
the writing by a set oI classes as discussed in the previous
sections. For each class, we select one sub-image, the one
which is the best representative oI its group. In each class,
(c)
(b)
(a)



we calculate the similarity measure oI each element with all
the other elements oI the same class. The element which is
closest to all the others is chosen as class representative.
Thus we have a representation oI writing by a set oI
patterns which are speciIic to a writer:
} f
r
x T =

Figure 8 Identification model
The identiIication oI writer is carried out employing the
Bayesian classiIier; the similarity between a test document
T represented as T
r
and a reIerence document D
represented by D
r
being Iormulated as:

=

=
) (
1
)) ( (
) (
1
) , (
r
i
T card
f
f
i
D C
r
x C P Max
T card
D T SIM

That is: Ior each f x in T
r
, the objective is to Iind the
class i oI document D that maximizes the probability oI
pattern f x belonging to class C
i
. ) ( f
i
x C P is estimated
by the expression:

) ( log ) ( ) (
2
1
log
2
1
1
i i i
T
i i
C P X Cov X Cov +




size window the nxn; d
matrix) (dxd i class oI matrix covariance
vector) (dx1 i class oI mean
x pattern the ng representi Vector
j
=
=
=
=
i
i
Cov
X
where



A complete derivation oI the above expression could be
Iound in |13|. We calculate the similarity between
document T and all the documents in the subset S and
identiIy the writer oI the questioned document as:

))) , ( ( max ( ) (
i
S D
D T SIM Arg Writer T Writer
i

=

With : R S

3. Experimental Results
To evaluate our system, we have randomly chosen a set
oI 100 writers Irom the IAM database |7|, with one image
oI each used in training and one in testing. Each image
contains on the average, 8-10 lines oI text.

Figure 9 Classification rates
For the Iirst phase, we have achieved a classiIication rate
oI 98 (k 2). We remark that there is a signiIicant
decrease in the classiIication rate iI we divide the reIerence
base into more than two classes (k~2); see Iigure 9. Thus
Ior the rest oI our evaluations we Iix k to 2. In the second
phase, we search the writer oI the questioned document
within the speciIic writing class and achieve and overall
identiIication rate oI 92. The 8 error is the cumulative
error oI the two steps oI classiIication and identiIication.
A comparative study oI the results obtained with and
without pre-classiIication oI writings revealed that using
phase 1 not only improves the identiIication rate but also
reduces the number oI comparisons to be made in phase 2
which could be very useIul once dealing with larger data
sets. Although one would have liked a higher value oI k,
but even with k2, the results show an improvement
against k1 (no clustering). We also compare the method
oI division oI text (into sub-images) proposed in the
present paper to the one we presented in |13|. It is
observed that the new method achieves signiIicantly
improved identiIication results, as summarized in Iigure 10.
In our Iuture series oI evaluations, we plan to enlarge the
experiments and the data set and perIorm a comparative
evaluation with the other methods in the literature.




82%
84%
86%
88%
90%
92%
94%
96%
98%
Top1 Top2 Top3 Top4
I
d
e
n
t
i
f
i
c
a
t
i
o
n

R
a
t
e
Without Phase1,Text Division by Proposed method
With Phase1 (k=2),Text Division by Proposed Method
With Phase1 (k=2),Text Division by Earlier Method
[13]

Figure 10 Comparison of Identification Rates
4. Conclusion
We have presented an eIIective method Ior writer
identiIication in handwritten documents. The method is
based on identiIying the writing style oI an author and then
extracting the Iorms that a writer would use Irequently as
he draws the characters. The realized identiIication rates
are very promising and validate the arguments put Iorward
in this paper. However, the presented text should be long
enough (at least 5-6 lines) so that it well represents the
writing style and allows the exploitation oI the idea oI
redundant patterns in a writing. In addition, changing the
window size n during the phase oI handwriting division,
this method could be applied to non-Latin languages like
Asian or Arabic scripts. The system could be made more
robust by automatically adjusting the window size
depending upon the writing details. Moreover, the system
can be extended beyond identiIication to perIorm the
veriIication oI the author as well.
References
|1| A. BenseIia, T. Paquet and L. Heutte, 'A writer
identiIication and veriIication system, Pattern Recognition
Letters,vol 26, issue 13, 2080-2092,2005.

|2| V. Bouletreau, N. Vincent, R. Sabourin, H. Emptoz,
"Handwriting and signature: one or two personality
identiIiers?", In Proc.oI Fourteenth International
ConIerence on Pattern Recognition, Los Alamitos, CA,
vol.2, 1998, pp. 1758-1760.

|3| M. Bulacu, L. Schomaker, and L. Vuurpijl, 'Writer
identiIication using edge-based directional Ieatures, In
Proc. oI 7th International ConIerence on Document
Analysis and Recognition, volume II, Edinburgh, Scotland,
3-6 August 2003, pp. 937941.

|4| M. Bulacu and L. Schomaker, 'Combining Multiple
Features Ior Text-Independent Writer IdentiIication and
VeriIication, In Proc. OI the 10th International Workshop
on Frontiers in Handwriting Recognition, La Baule, France,
2006.

|5| D. Gaceb, V. Eglin, and S. Bres. Handwriting similarities as
Ieatures Ior the characterization oI writer`s style invariants
and image compression. In International ConIerence on
Image Analysis and Recognition (ICIAR), volume 2, pages
776-789, 2006.

|6| A Imdad, S Bres, V Eglin, H. Emptoz and R.M. Carlos Joel,
'Writer IdentiIication using Steered Hermite Features and
SVM, In Proc. oI the 9th Int'l conIerence on Document
Analysis and Recognition (ICDAR 2007), Curitiba, Brazil,
September 2007.

|7| U. Marti and H. Bunke, 'A Iull English sentence database
Ior oII-line handwriting recognition, In Proc. oI 5th
International ConIerence on Document Analysis and
Recognition, Bangalore, India, 1999, pp. 705-708.

|8| A. Nosary, L. Heutte, T. Paquet, Y. Lecourtier, "DeIining
writer's invariants to adapt the recognition task", In Proc. oI
5th International ConIerence on Document Analysis and
Recognition, Bangalore, India, 1999, pp. 765-768.

|9| R. Pareti and N. Vincent, 'Global Method based on Pattern
Occurrences Ior Writer IdentiIication, In Proc. oI the 10th
International Workshop on Frontiers in Handwriting
Recognition, La Baule, France, 2006.

|10| H.E.S. Said, T.N Tan, K.D. Baker, 'Personal IdentiIication
Based on Handwriting, Pattern Recognition, vol. 33, 2000,
pp. 149-160.

|11| L. Schomaker, L. And M. Bulacu, 'Automatic Writer
IdentiIication Using Connected-Component Contours and
Edge-Based Features oI Uppercase Western Script, In
IEEE Transactions oI Pattern Analysis and Machine
Intelligence,vol 26, no. 6, pp. 787-798, 2004.

|12| A. Seropian and N. Vincent, "Writers Authentication and
Fractal Compression," iwIhr, p. 434, Eighth International
Workshop on Frontiers in Handwriting Recognition
(IWFHR'02), 2002.

|13| I. Siddiqi and N. Vincent, 'Writer IdentiIication in
Handwritten Documents, In Proc. oI the 9th
Int'l conIerence on Document Analysis and Recognition
(ICDAR 2007), Curitiba, Brazil, September 2007.

|14| S. Srihari, S. Cha, H. Arora, and S. Lee, 'Individuality oI
handwriting, J. oI Forensic Sciences, 47(4):1.17, July
2002.

Anda mungkin juga menyukai