|
Amit Jain
Aditya Kamat
Instructor Dr. Amitabha Mukerjee
IIT Kanpur : April, 2000
Handwriting is one of the easiest and natural ways of communication
between humans and computers. Signature verification has been an active
research topic for several decades in the image processing and signature
verification remains a challenging issue. It provides a way of identifying
the writer of a piece of handwriting in order to verify the claimed identity
in security and related applications. It requires the writer to write the
same fixed text. In the sense, signature verification may also be called
text dependent writer verification. In practice, the requirement, the requirement
and the use of fixed text makes writer verification it relatively less
useful as it's not useful in many application. For example the identification
of the writer of archived handwritten documents, crime suspect, identification
in forensic science, etc. In these application, the writer of a piece of
handwriting is often identified by professional handwriting examiners.
Although human intervention in the text independent writer identification
has been effective, it is costly and prone to fatigue. This task is much
more difficult and useful than signature verification. So we got the motivation
to do this challenging project.
Papers have been published on this by H.E.S.Said. Not too much work has been done in this field as it's not a very easy one. We had studied several papers on Handwriting Analysis and Document Analysis and try to use a new approach for each phase.
Research into writer identification has been focussed on two sterns, off-line and on-line writer identification. Here We are working on the off-line writer identification. It is further sub divided into two parts Text Independent and Text Dependent, We are working on the former one as that is the more general case. This approach is called "Texture Analysis Technique".
The approach is basically based on the "Computer Image Processing and Pattern Recognition" techniques to solve the different phases of the problem- pre processing, feature extraction and selection of the correct writer. There are two approaches to off-line method, namely text dependent and text independent. We are working on text independent approach where we are using a new texture analysis technique. This uses a feature set whose component describes global statistical feature extracted from the entire image of a text.
The algorithm is based on texture analysis and illustrated in figure. The three main stages are described below:
As we shown above basically basically we can contain the whole work in three steps. We had described all the three phases as below.
Normalization of Handwriting Images
The input to this normalization stage is a binary image (pgm format ) of any handwritten document. The handwriting may contain lines of different point size and different spacing between lines, words and characters. The normalization is performed as follows;
Texture Analysis cannot be applied directly to input
handwriting images, as texture is affected by different word spacing,
varying line spacing etc. The influence of such factors is minimised by
normalization. But before doing all this we first have to remove the noise
from the image. For this first we do some type of thresholding with the
image and then apply the Salt
and Pepper filter to remove the noise. After applying this we will
get the noise free image. Then
further processing will be done on this image. This is subdivided into
following steps.
HORIZONTAL PROJECTION PROFILE
The spacing between lines and words could be varying that will change the feature so we had predefined these spacing so that the feature won't get changed.
Padding is also required as this will also effect the feature set
In principle, any texture analysis technique can be applied to extract features from each uniform block of handwriting. Here we had implement Gabor Filtering.
The multi channel Gabor filtering technique is inspired by the psycho physical findings that the processing of pictorial information in the human visual cortex involves a set of parallel and quasi independent mechanisms or cortical channels which can be modeled by bandpass filters. Mathematically the 2D Gabor filter can be expressed as follows:
where g(x,y) is a 2-D Gaussian function of the form
Each cortical channel is modeled by a pair of Gabor filters
We will convolve the input image with these two filters and then we
will got two iamges say qe(x,y) and qo(x,y) then
by applying the following formula we will got the final image as a gabor
output for a particular value of f and theta.
The two important parameters of Gabor filter are f (the radial frequency) and theta (orientation), which define the location of the channel in the frequency plane. Commonly used frequencies are power of 2. It is known that for any image of size NxN, the important frequency components are within f<=N/4 cycles/degree.
In this we will use frequencies of 4,8,16,32 cycles/degree. For each central frequency f, filtering is performed at an angle of 00, 450, 900, 1350. This gives a total of 16 output images (four for each frequency) from which the writer's features are extracted.
We will require a database to start with. So for this we will first define our domain of writers then from each of these writer we will take 10-15 document and then we will maintain a database of features. And we will do this for all of the member of our database as below is a image that contain handwriting of 10 different people.
There are essentially two classifiers, namely the Weighted Euclidean
Distance (WED) classifier and the K-Nearest neighbor classifier (K-NN).
But here we are using the WED approach.
THE WEIGHTED EUCLIDEAN DISTANCE CLASSIFIER
Representative features for each writer are determined from the features extracted from training handwriting texts of the writer. Similar feature extraction operations are carried out, for an input handwritten text block by an unknown writer. The extracted features are then compared with the representative features of a set of known writers. The writer of the handwriting is identified as writer K by the WED classifier if the following distance function is a minimum at K:
where fn is the nth feature of the input document, and nf(k)
and nv(k) are the sample mean and the sample standard
deviation of the nth feature of writer k respectively.
Input and Output
The Input to our Program will be a Image (pgm format ) of a document written by a person. Basically this will be a scanned image of the document then we will apply our given methodology as described above then we will get a table of features and from this table and with our database
Then we will conclude who is the writer of this document and also that whether he/she belong to our database domain or not. So the output of our software will be the name of the writer or just an error signal saying that It doesn't belong to our domain.
We will illustruate a example here. By which whole the methodology will
become more clearer.
Here we had taken a input image as shown in the figure. This is the
scanned image of a writer. First we had converted it into pgm format to
do processing with it.
|
|
To do pre-processing as described in the Methodology we will follow
each step one by one. First we will change the value of each pixel either
0 or 255 by applying some thresholding so that we can call each pixel either
WHITE or BLACK. Then we had applied Salt
and Paper Filter to remove the noise from the page.
After doing all this we will get the image as shown below.
|
Now the next step is to calculate the skew angle and to rotate the image
by this angle. So for this we will follow the steps
described above. By doing all this we will get the skew
angle =3o and now we will rotate
the image by 3o. And we had got the image as shown below.
|
Now we have to do the correct the interword and interline spacing
and after this we have to do padding. we
had also set some pre-defined Left and Right Margin and the Top and Bottom
margin. After doing all these we will got the output as shown below. By
doing all these the output got compressed.
|
Now from this image on applying the Feature Extraction Techniques we will get the images as showed in the figure these are on different frequencies and for different angle that we will use in Gabor Filter. So for this image we will get 16 different images and 32 different features (2 for each).
Now from these features we will conclude the identity of the writer using the writer Identification approach as described above. We will chose the one which have the minimum Euclidean distance.
We trained our software with images of handwritten documents for 9 writers with 9-10 pages per writer and maintained a database. With this system we now tried various test documents (these documents were not used during training). Out of the 32 test images that we used, the system gave the correct results in 24 cases. This implies that the system was able to identify the writer in about 75% of the cases.
Texture based methods like Gabor filtering can be successfully applied for handwriting recognition by choosing the right parameter set. In our case we selected radial frequency values 4,8,16 and 32 with orientation angles from 0 to 135 degrees with increments of 45. The objective here is to get feature clusters which are as far apart as possible. For our purpose, the values we selected seem to give fairly accurate results. However, for texture based methods to be applied, a good amount of preprocessing is required. The algorithms that we have used in the preprocessing stage have been culled out from several sources. Several alternate methodologies exist for such preprocessing. We selected those which give the best results (like Horizontal Projection Profile). Lastly, even in the writer identification stage, we used the method of Weighted Euclidean Distance (WED) over k-NN (k- Nearest Neighbor) as earlier works show that WED gives better results as compared to k-NN.
In conclusion, at every stage of the implementation, we have adopted methods which we think best suit our purpose making certain changes in the algorithms and testing the same to get as optimal results as possible.
Basically the performance of the system will depend on the quantity and quality of input data. Here due to insufficient data we had trained our system with 10 pages per writer. If we can train it with say 20 or more than performance will change drastically. Another points are that we had taken our data from the copies of the students, there was a lot of noise like cutting of line etc. that can't be handle with the software. And the writer in this case has also used the different pen In this way the features will change. And with in the same page he may have wrote at two different angles that will also create a problem. So the performance of the system will go down.
So for better results we should train our system with more input data and the pen size should be same, and the noise should me minimum.
We are thinking of to use the Neural Network to train the system But due to insufficient data we haven't used this approach. By using Neural Networks we can improve the performance.
@Article{H.E.S.Said/T.N.Tan/K.D.Baker:1998,
author=
{ H.E.S. Said, T.N. Tan and K.D.Baker},
keywords= { Personal identification
Writer identification Textutr Analysis
Handwriting processing},
institution= { Unioversity of Reading, Whiteknights},
title=
{Personal Identification based on Handwriting},
journal= {PATTERN
RECOGNITION, The journal of Pattern Recognition Society},
month=
{January},
year=
{2000},
volume= {33},
pages=
{149-160},
e-mail=
{H.E.S.Said@reading.ac.uk},
annote=
{
There are many techniques for handwriting based writer identification. Basically there are two technique one is text dependent and another is text independent. In the first one we have to write the same fixed text for the verification but that is not what we need in real life applications like we want to recognize a criminal on this basis than we need text independent writer identification. In this paper they had tried to remove this text dependency.
Assuming that handwriting of different people is often visually distinctive, this paper present an off line system based image processing and pattern recognition techniques and use text independent approach where texture analysis use the global statistical feature extracted from the entire image of the text. It uses the Gabor filter for filtration. To remove spacing, varying line spacing we use Normalizing then use Gabor filter extract feature from the image then finally we compare the results from the data base in order to recognize the writer.
The performance of this basically depends on the efficiency of the three parts (figure). So we can think of the better way of Normalizing. And there is also a loose point of assuming the fact that handwriting of different people is visually distinct but this is not always the case.
The author deserve credit for taking into account the point which have been ignored in previous approaches. His method takes care that the approach is text/context independent. The paper is not very technical and mathematical which makes it quite easy for a layman to understand but he should know Gabor filter, GSCM, WED and K-NN. This field is very interesting and have a lot of room for research.
Amit Jain, 1/2000},
}
This proposal is prepared by Amit Jain and Aditiya Kamat as a part of the project component in the Course on Artificial Intelligence in Engineering in Janurary IInd semester of 2000 under Dr. Amitabha Mukerjee
[ Course page ] [ Course Projects]