Pattern Anal Applic DOI 10.1007/s10044-014-0385-7
INDUSTRIAL AND COMMERCIAL APPLICATION
Designing a new standard structure for improving automatic processing of Persian handwritten bank cheques Javad Sadri • Mohammad J. Jalili • Younes Akbari • Atefeh Foroozandeh
Received: 16 January 2012 / Accepted: 23 May 2014 Ó Springer-Verlag London 2014
Abstract Millions of handwritten bank cheques are processed manually every day in banks and other financial institutions all over the world. Substitution of manual cheque processing with automatic cheque reader system saves time and the cost of processing. In the recent years, systems such as A2iA have been made in order to automate processing of Latin cheques. Normally, these systems are based on the standard structures of cheques such as Check 21 in the USA or Check 006 in Canada. There are major problems in traditional (currently used) Persian bank cheques, which yield low accuracy and computational cost in
J. Sadri (&) Faculty of Electrical and Computer Engineering, Department of Computer Engineering, University of Birjand, PO Box 97175-615, Birjand, Iran e-mail:
[email protected] J. Sadri McGill Center for Bioinformatics, School of Computer Science, McGill University, Room: 3140, Trottier Building, 3630 University Street, Montreal, QC H3A 2B2, Canada M. J. Jalili Faculty of Engineering, Department of Computer and IT Engineering, Payame Noor University (Central Branch of Tehran), Tehran, Iran e-mail:
[email protected] Y. Akbari Department of Mathematics, Faculty of Mathematics, Statistics and Computer Science, University of Semnan, Semnan, Iran e-mail:
[email protected] A. Foroozandeh Faculty of New Sciences and Technologies, Department of Applied Mathematics, Graduate University of Advanced Technology, Kerman, Iran e-mail:
[email protected]
their automatic processing. In this paper, in order to solve these problems, a novel structure for Persian handwritten bank cheques is presented. Importance and supremacy of this new structure for Persian handwritten bank cheques is shown by conducting several experiments on our created database of cheques based on the new structure. The created database includes 500 handwritten bank cheques based on the presented structure. Experimental results verify the usefulness and importance of the new structure in automatic processing of Persian handwritten bank cheques which provides a standard guideline for automatic processing of Persian handwritten bank cheques comparable to Check 21 or Check 006. Keywords New structure for Persian (Farsi) cheques Automatic processing of handwritten bank cheques Database of cheques Segmentation of cheque fields Handwritten digit recognition Courtesy amount recognition Date recognition
1 Introduction In spite of rapid growth of electronic banking, still cheques in paper format are used in many countries of the world for financial transactions. Nearly all incoming cheques to the banks are processed manually every day in developing countries [14]. Cheque processing includes: accessing to account numbers, examining the correctness of names and signatures, examining dates, matching courtesy and legal amounts, and examining the validation of account numbers [3]. Many attempts have been made in the field of automatic processing of handwritten bank cheques till today. In 1997, a collection of several papers on this area such as [18, 20, 26, 41] was published by Impedovo et al. [13]. In
123
Pattern Anal Applic Fig. 1 Samples of courtesy amounts, legal amounts, and dates written in English (a), and in Persian (b) scripts
Legal amount
Legal amount
Courtesy amount
Courtesy amount
Date
Date
(a)
(b)
2011, a survey of conducted attempts have been done in [14] by Jayadevan et al., which includes the important reported results so far in automatic pre-processing, segmentation, recognition, and verification of handwritten fields on bank cheques with highlighting positive directions of research till date such as [4, 11, 12, 17, 25, 36, 37]. Automatic processing of cheques saves processing time and also improves customer satisfaction especially when the system is fast and accurate [23]. For this reason, in the recent years, creation of an accurate automatic bank cheque processing system has become an active research and industrial problem [14]. Some of the Latin prominent vendors in this area are A2iA [45], Mitek [46], Parascript [47], and SoftPro [48]. These commercial products are capable of locating and reading information from image replacement documents (IRD) or substitute cheques. These tasks are done based on the standard structures such as Check 21 (cheque clearing for the twenty-first century act published in 2004), image exchange in the United States [49] or Canadian payments association standard 006 [50]. However these products support only some specified languages. For example, A2iA cheque-reader is available in six languages (English, French, German, Italian, Portuguese and Spanish) and in several countries such as France, UK, Italy, USA, Canada, Hong Kong [14]. To the best of our knowledge, none of these products support Persian, or Persian-related scripts. Persian language is spoken by more than 110 million people, mainly in Iran, Afghanistan, Tajikistan, and partly in some other neighbouring countries of the world. There are also other scripts which use the same alphabets and digits or subsets of them, such as Arabic, Urdu, Dari, Kurdish, Azari, Pashto and Uyghor. In Persian, words, sentences, and dates are written from right to left, but numbers are written from left to right which match the style
123
Persian
Latin
of writing of numbers in the Latin languages. Persian has 32 letters in the alphabet and is a cursive language, which means within one word, letters can be connected. Due to connectivity, the shape of Persian letters may change significantly depending on their positions in a word, the identity of neighbouring letters, the font, or the way that writer connects successive letters [3]. For example, some samples of legal amounts, courtesy amounts, and dates written by Latin and Persian writers are compared in Fig. 1. In the Persian language, several attempts have been made for processing of handwritten bank cheques, such as [8, 9, 44]. However, till today a usable system (like A2iA) for automatic processing of bank cheques, and a standard structure of cheque (like Check 21) have not been presented for Persian countries. According to what was mentioned above, a major problem which should be addressed before attempting to create a cheque-reader system in Persian countries is the lack of standard structure specified for Persian cheques. For this purpose, first by processing of 2,000 traditional Persian bank cheques (which were collected by our team), some important structural problems which reduce the segmentation and recognition rate have been identified. Then in order to address these structural problems and also to improve Persian bank cheques for automatic processing, a novel structure for Persian handwritten bank cheques is proposed in this paper. In this paper, details of segmentation of different fields of cheques, segmentation of digits including courtesy amounts and dates, and recognition of the isolated digits have been described. Some experiments have been conducted on the newly created database of cheques based on the new structure. Then the experimental results have been compared to the state of the art results in the literature. The rest of this paper has been organized as follows: in Sect. 2, traditional Persian bank cheques are examined and
Pattern Anal Applic
their problems are identified. In Sect. 3, the suggested structure for Persian bank cheques and its features facilitating automatic processing are shown. In Sect. 4, the details of segmentation and recognition based on the new structure are explained. In Sect. 4.3, the steps of recognition of courtesy amounts and dates are described. Sect. 5 is dedicated to the experimental results. A discussion about this work is presented in Sect. 6. Finally, in Sect. 7, our conclusions and future works are drawn.
2 Structural problems of the traditional bank cheques In order to explore the problems with traditional Persian bank cheques, at first we created a database of 2,000 real (traditional) bank cheques provided by one of the Persian banks (special thanks to that bank which its name is anonymous in this paper). Then in order to segment and recognize all fields of these handwritten cheques several experiments have been conducted on their images. During these experiments some major structural problems in traditional bank cheques which yield low accuracy and high computations in their automatic processing are detected. These structural problems, which some of them are commonly seen in Latin cheques [13, 18, 20, 26, 41], are mentioned one by one, in this section. Then the solution for each one is proposed in the following section. (I) In the traditional structure of Persian bank cheques, heavy saturated colours used in background of the papers cannot be removed easily in the pre-processing phases of cheques. Normally after binarization of these cheques, there are many noises which make the processing in the next phase very difficult. This problem can be seen in Fig. 2. Also, according to what can be seen in this figure, most salient noises in the images of traditional bank cheques are created because of stamps for account numbers and names (used by some banks), dotted lines for fields such as dates, courtesy amounts, and unsuitable heavy colours used in these cheques. (II) Scanning of traditional bank cheques sometimes causes skewed images of cheques which should be deskewed very efficiently and accurately. Usually, deskewing of these cheques is very difficult, and there will be a high error rate in estimation of skew angles. Deskewed cheque images make some difficulties in segmentation and recognition of cheque fields. An example of this problem is shown in Fig. 3. (III) In the traditional structure of Persian bank cheques, there is no reliable solution for locating the correct places of fields and extracting them automatically. Notably, because of varieties of banks and credit
Fig. 2 a Is a sample of traditional bank cheque which is used in Iran’s banking system, and b shows lots of remaining noise after binarization (signature of the account holder has been blocked due to confidentiality reasons)
Fig. 3 An example of skewed traditional cheque which cannot be deskewed easily
institutions, there are varieties of arrangements for fields of bank cheques. Therefore, many differences according to the places of fields can be seen in all arrangements. The differences between these arrangements cause many difficulties in locating of different fields in automatic processing and also in exchanging cheque images between institutions. For example, in Fig. 4, two different arrangements of cheque related to the same bank have been
123
Pattern Anal Applic
(IV)
(V)
shown which courtesy amount and signature fields have different locations. In the traditional bank cheques, some information of fields overlap with each other and adjoin. In Fig. 5, this problem has been shown for receiver name, account number and signature fields. Overlapping of the different fields causes serious errors in the segmentation phase. In the traditional structure of Persian bank cheques, digits in two handwritten numeric fields of courtesy amounts and dates are separated by ‘‘/’’ as delimiters. These ‘‘/’’s sometimes are elongated and touch digits in the numeric fields. Therefore, the segmentation of courtesy amount and date fields is very difficult. In Fig. 6, there are some samples of courtesy amounts and dates extracted from traditional Persian cheques which show these problematic cases.
(a)
(b)
Fig. 6 Some samples of segmented fields of dates (a), and courtesy amounts (b). As seen in this figure, usually ‘‘/’’ symbols are used as delimiters in fields of dates and courtesy amounts. The equivalence between Latin and Persian digits is given in Fig. 7, as a reference for reading these courtesy amounts
Fig. 7 Latin isolated digits and their equivalent Persian digits
(VI)
Although there is enough space in the background of Persian bank cheques, there is no attention to the beautification and personalization of these cheques.
Above-mentioned problems occur in almost all traditional Persian bank cheques. In order to improve and facilitate the automatic processing of cheques, a new structure for handwritten Persian bank cheques has been presented in the next section. Fig. 4 a and b show two examples of different locations of two fields (courtesy amounts and signatures) in two samples of cheques from the same bank. Such this displacement makes automatic location of the fields very difficult
Fig. 5 An example of overlapping between three different fields including: signature, account number, and receiver name
123
3 The proposed structure and its novelties In this section, we present the specifications of our proposed structure (design) for Persian handwritten bank cheques which solve the problems of traditional cheques mentioned in the previous section. (I) Soft background colours and high-grade papers: traditional bank cheques have heavy background colours which produce lots of noise after binarization of their images. In our structure, heavy background colours have been replaced by soft and professional colours which are easily removed in the pre-processing stages. Currently, high-grade papers are widely used in all Iranian banks and
Pattern Anal Applic
(II)
(III)
financial institutions for printing their traditional cheques; therefore, we used the same high-grade papers for our proposed cheques. Based on our experiments on these types of papers, using soft colours and high-grade papers are really worthwhile for the automatic cheques processing systems. In fact, combination of soft background colours and high-grade papers have the least amount of diffusion and reduce noise while being scanned. In Fig. 8, two samples of the new structure have been shown. Four black rectangles: in the proposed structure, in order to simplify and more accurately deskew the images of cheques, four small black rectangles have been positioned on the four corners of cheques. These four rectangles have been shown in Fig. 8b by using the red indicators. Although deskewing of the images is possible without using these four rectangles by detecting the vertical and horizontal edges of the cheques (similar to [16, 32]), the inserted rectangles improve the accuracy and the speed of deskewing process. Also, the four small black rectangles have enough sizes which will not be removed during the binarization or noise-removal process. In addition, instead of black rectangles other graphic elements can be used and detected by new approaches such as [5].
(IV)
(V)
Using bar code: two different bar codes have been shown in Fig. 9. As shown in this figure, bar codes consists of different bars. Therefore, bar codes have the capability of showing more arrangements by using more bars. As an example in Fig. 9, using five bars we can specify 25 ¼ 32 different arrangements of fields (the first and the last bars have been fixed and used for the recognition of bar-code regions). Also in Fig. 8b, the bar code on cheque is specified by a violet frame. It is worth to mention that other types of bar code such as 2D bar codes also can be used in our structure. Specified regions: in the new structure, specified regions have been considered for different fields (such as dates, courtesy and legal amounts and signatures). Considering the specified regions for each file makes less overlap among those contents. In Fig. 8b, different regions of cheques have been shown by green frames. Beautification and personalization: in the proposed structure, for the first time we pay attention to the beautification and personalization of Persian bank cheques by allowing the cheque owner to choose any background (such as natural landscapes, historical areas, and desired celebrities, etc.) for his/her personal cheques. Two samples of our cheques shown in Fig. 8 have the background of ancient areas in Iran such as
(a)
(b) Fig. 8 Two samples of our proposed structure for Persian bank cheques. For example in b, different fields of cheques have been specified by green frames and the bar code has been specified by violet frame
123
Pattern Anal Applic Fig. 9 a and b show two samples of barcodes encoding two different arrangements of fields in the new structure of cheques which were shown in Fig. 8a, b, respectively
(a) Kolah Farangi mansion of Birjand and Si-o-se pol of Isfahan. As mentioned above, the novelties of the new structure yield high accuracy and high speed during the automatic processing of cheques. In order to verify this claim, some experiments have been conducted on the database created for these types of cheques. The experiments include the segmentation of different fields of cheques and the segmentation of digits in dates and courtesy amounts fields. Also some experiments have been done in order to recognize the isolated digits extracted from dates and courtesy amounts. Details of these experiments have been explained in the next section.
(b) segmentation of fields of cheques and the segmentation of digits forming dates and courtesy amounts. 4.2 Segmentation of fields and digits Due to the proper design of the new structure, field segmentation does not encounter many of problems existing in the traditional structure of Persian bank cheques (as mentioned in Sects. 2, 3). Based on the new structure, the segmentation phase include the following steps: (I) Pre-processing: (I–I)
4 Segmentation and recognition phases based on the new structure In this section, details of the segmentation of fields, segmentation of digits forming dates and courtesy amounts and the recognition of isolated digits in cheques with the new structure have been described. At first, a database of cheques based on the proposed structure has been created. (II–I) 4.1 Database of cheques based on the new structure In order to examine the efficiency of the presented structure, a database of cheques based on the new structure has been created by us. Since there is no statistics about the distribution of account holders based on gender, and in order to consider both handwritten of men and women equally, we equalized the number of writers in terms of gender. In total 500 copies of the new cheques have been filled by men and women volunteers (250 copies by men and 250 copies by women). For all of the collected bank cheques, the ground truths including: true date, true courtesy amounts and legal amounts, age of writer, his/her gender, occupation, being rural or urban resident, and degree of satisfaction from the new structure of cheques have been collected. The cheques filled by writers have been scanned in TIFF format, and in 150 and 300 dpi resolutions. In the next subsection, we show that how the new structure has simplified and improved the
123
Binarization: in this phase, the Otsu’s algorithm [27] has been used for converting the true colour to the gray-scale and then into the binary formats. In Fig. 10, a sample of these conversions is shown. As can be seen in this figure, because of using soft colours in addition to the professional papers in the proposed structure, pre-processing steps such as binarization, noise and background removal can be conducted efficiently even with very simple and basic image processing algorithms. Skew correction: this step is conducted easily by using four black rectangles inserted at four corners of cheques. At first, by scanning the image of cheque from top to the bottom, two top black rectangles have been found and the centroid of each of them has been found. Then the difference between vertical and horizontal distances of these two centroids have been calculated (see Fig. 11). These two distances are shown by Dx and Dy, respectively. The angle between two computed centroids has been identified by Eq. (1). If it is positive, the image is rotated in clockwise direction and if it is negative, the image is rotated contrary to the clockwise direction. As can be seen in Fig. 11, the deskewing process can be conducted much easier and more
Pattern Anal Applic
Fig. 10 a, b, and c show an image of cheques of the database in true colour, gray-scale, and binary formats, respectively
accurately compared to the traditional cheques. Dx h ¼ arctan ð1Þ Dy (II)
(III)
(IV)
Recognizing the arrangements of cheques: since there are different arrangements of Persian cheques related to the same bank, the arrangements of fields of the cheques can be identified by decoding their bar codes. Since in our structure there is one-to-one correspondence between the bar codes and the arrangement of cheques, so by decoding the bar codes, the arrangement of fields on the new cheques can be identified. Two different bar codes are shown in Fig. 9. Segmentation of different fields of cheques: after identifying the arrangement of cheques (Part II), the segmentation of fields is conducted automatically using their relative locations to the guidance (black) rectangles on the corners. As an example in Fig. 12, the horizontal and vertical distances of the rectangle (located at top left corner of cheque) from the beginning of signature field is shown. Segmentation of digits forming dates and courtesy amounts: in traditional structure, due to the touching between digits in numeric fields (dates and courtesy amounts), the segmentation of digits forming dates and courtesy amounts is really
Δ
Δ
Fig. 11 Deskewing of the image using four guidance rectangles
Fig. 12 Locating and segmenting of the signature field of cheque using the guidance rectangles
difficult task. In the new structure, using determined space between digits of the numeric fields, the mentioned problem is really diminished. Therefore, the segmentation of digits has been done easily and also more accurately than the traditional cases.
123
Pattern Anal Applic
4.3 Recognition of courtesy amounts and dates In order to show the usefulness of the new proposed structure in the recognition of digits, some experiments have been conducted on the recognition of isolated digits from dates and courtesy amounts. Details of the conducted experiments have been explained in the following subsections. 4.3.1 Pre-processing on the segmented digits As mentioned in Sect. 4.2 (Part IV), based on the new structure digits forming dates and courtesy amounts have been segmented easily and more accurately than the traditional cheques. The statistics of the segmented digits in the database (500 dates and 500 courtesy amounts) have been shown in Table 1. In order to create training and testing sets for the experiments, 80 % of all cheques have been randomly Table 1 Distribution of the segmented digits in the created database Given statistics after digits segmentation Digits
No. of samples in training set
No. of samples in testing set
0
4,054
363
1
2,466
229
2
1,943
122
3
2,080
184
4
1,971
131
5
1,994
117
6 7
1,917 2,011
87 94
8
1,912
108
9
1,916
98
Fig. 13 Some samples of courtesy amounts, dates, and isolated digits (in true colour, gray-scale, and binary formats) which have been used in the created database
True color
Courtesy amount
Date
Digit
123
chosen, their fields have been considered as training set and the remaining 20 % of cheques have been considered as testing set. Some samples of courtesy amounts, dates, and isolated digits in true colour, gray-scale, and binary formats used in the created database have been shown in Fig. 13. In the pre-processing, at first using smoothing and noiseremoval methods [7] the remaining noises of the segmented digits have been removed. Then the slants of digits have been corrected based on the slant correction algorithm [7] (Fig. 14a). After the slant correction, morphological operations [10] have been used for filling the gaps on the contours (Fig. 14b). Finally, the segmented digits are normalized using aspect ratio adaptation normalization (ARAN) method [7], and then converted to the size of 81 81 pixels (Fig. 14a). 4.3.2 Feature extraction In order to recognize the segmented digits included in dates and courtesy amounts, some features have been extracted in the feature extraction phase. These features include: zoning, chain code, outer profile, and crossing count which have been extracted as follows: (I) Zoning [31]: in order to extract zoning features, windows of size 3 3 and 9 9 (see Fig. 15a) have been used simultaneously. In each window the number of black pixels are counted. Since the images of isolated digits have been normalized into the size 81 81, using windows of size 3 3 and 9 9 the number of 27 27 (=729) and 9 9 (=81) features have been extracted, respectively. Totally, 810 (=729 ? 81) zoning features have been extracted for each digit.
Gray-scale
Binary
Pattern Anal Applic
Before slant correction
After slant correction
Morphological operator used in the experiments
81 Pixels 81 Pixels
Digit m i ages After Morphological operators
(a)
(b)
(c)
Fig. 14 Samples of images after pre-processing steps: slant correction (a), implementation of the morphological operation (b), normalization using ARAN method (c)
(II)
(III)
(IV)
Chain code [22]: for extracting chain code features, at first the outer contour of digit image is extracted. Then chain codes based on the freeman directions are computed. In order to equalize the number of features in all digits, chain codes have been counted in the frames of size 27 27 on each digit image. Since the images of digit have been normalized into the size 81 81, the number of 9 frames have been considered and therefore the number of 72ð¼ 9 8Þ chain code features have been extracted from each image (here 8-direction codes has been used). For an example of extracting chain codes see Fig. 15b. Outer profile [33, 34]: outer profile features have been extracted using four different views (from top, bottom, left, and right) such that the number of white pixels in each view is counted till reach to the first black pixels. Then using Spline functions [1] the obtained profiles (views) have been smooth. Totally 324ð¼ 4 81Þ features have been obtained from each digit image (see Fig. 15c). Crossing count [39]: in order to extract crossing count features, the number of changes from black pixel to the white pixel during the horizontal and vertical scans of digit images has been counted. Here, the number of 40 horizontal and vertical lines for extracting the crossing count features has been considered. Totally, 80 crossing count features have been extracted from each digit (see Fig. 15d).
Also some combinations of the mentioned features have been considered in the conducted experiments (see Table 2). In the next section, the details of the classification are described. 4.3.3 Classification In the conducted experiments for recognition of courtesy amounts and dates, different classification algorithms have been examined as follows:
(I)
(II)
(III)
K-Nearest Neighbour (KNN) [6]: KNN classification works based on the nearest neighbour rule. At first, the distances between training samples and the test sample have been computed based on a distance measure (such as, Euclidean distance, City block, Hamming, etc). After measuring and sorting these distances, K closet neighbours to the test sample is found. Using majority voting among K neighbours, class label for the test sample is found. In the conducted experiments Euclidean distance and K = 3 have been chosen. Neural network [38]: neural network classification is a machine learning method which is created based on the connections of some processing units (neurons). Several layers of neurons connected the inputs and outputs layers. Different networks are extensively used for recognition purposes. In this paper, the multi-layer perceptron (MLP) network containing of three layers: input, hidden and output layers has been used. Input layer has the same number of neurons as the dimension of the input feature vectors, the hidden layer has 74 neurons and the output layer has 10 neurons (corresponding to each class: 0, 1, ..., 9). Transfer functions used in the experiments are tangent sigmoid for the hidden layer and logistics sigmoid for the output layers. Support vector machine (SVM) [15, 42]: SVM has been used for classification of Persian digits [33, 34]. Based on this classification, at first using a kernel function, all of data points are mapped from input space to a high-dimensional Hilbert space H (so-called feature space). Then in the high-dimensional feature space H, using maximizing the margin between the two classes and by bounding the number of training errors, an optimal hyper plane is found. Here, SVM light package [15] with parameters c = 0.3 (RBF kernel parameter), and c = 10 (parameter to
123
Pattern Anal Applic Fig. 15 An example of extracting zoning features (a), chain code features (b), outer profile features (c), and crossing count features (d)
3
5
5
Start
3
0 0
2 13
54
2
6 6 6 6 6 6 6 6 6 6
32 2 2 2 2 2 2 2
(a)
(b)
(c)
(d)
control the tolerance of the classification errors in learning) has been used. For more information about the classification methods, refer to [21, 22, 29, 30, 39].
5 Experimental results As mentioned above, some experiments for segmentation of fields and digits and the recognition of isolated digits forming dates and courtesy amounts have been conducted on the created database. The experimental results have been described in the following subsections. 5.1 Segmentation results One of the important steps in the automatic cheque processing system is the segmentation of fields on cheques. To the best of our knowledge, given accurate segmentation of all fields on the Persian cheques with different arrangements has not been achieved till today. As seen in Table 3, using the proposed structure the segmentation step has been carried
123
2 01
0
01
6 4 5 67 4 0 0
4 4 4 4 4
out with 100 % success on all of 500 cheques in the created database. This is very valuable contribution, because in the presence of even a little error in the segmentation step, other following steps of automatic processing of cheques such as recognition phase will suffer irreparable errors. Such errors have been removed using our proposed structure for Persian handwritten bank cheques. 5.2 Recognition results Obtained results of the recognition experiments have been computed in different levels including: isolated digits, dates, courtesy amounts and finally in the cheques level. The recognition results on the test set of the created database have been shown in Table 2. Noticeably, only the best results related to each feature (using the parameters mentioned in the Sect. 4.3) have been shown in Table 2. Based on the experiments, the best results belong to the neural network classifier using the combination of chain codes and crossing counts features. As shown in Table 2, using this classifier we are able to correctly recognize 96:90 % of isolated digits, 76 % of dates, 73 % of courtesy amounts
Pattern Anal Applic Table 2 Results of K-Nearest Neighbour, neural networks and SVM using different features and in the different levels Classifier
K-Nearest Neighbour (K = 3)
Neural networks
Features
Chain code (%)
Chain code (%)
Zoning (%)
SVM Combination of (chain code, crossing counts) (%)
Chain code (%)
Combination of (outer profiles, crossing counts) (%)
Isolated digits
94.50
95.90
96.00
96.90
95.60
95.90
Dates
61.00
72.00
63.00
76.00
65.00
64.00
Courtesy amounts
49.00
70.00
70.00
73.00
71.00
74.00
Cheque level
34.00
56.00
47.00
61.00
52.00
50.00
The best results obtained are in bold
Isolate digits
97.5 97
87.5
NN
77.5
96.5 96
SVM
96.9
KNN
94.5 94
KNN
96 95.6
47.5
SVM
NN 72
76
Neural Network
SVM
27.5
SVM
17.5
94.5
7.5 Combination of (Outer Profile. Crossing Count,Projection Histogram)
Combination of (Chain Code. Crossing Count)
Zoning
-2.5
Chain Code
(a)
Combination of (Outer Profile. Crossing Count,Projection Histogram)
Zoning
Combination of (Chain Code. Crossing Count)
Chain Code
(b)
Courtesy amounts
Cheque level
97.5
97.5
87.5
87.5 SVM
NN
67.5
77.5 NN SVM
KNN
67.5 NN
57.5
74 73
47.5
70
37.5
70 71 KNN
49
27.5
KNN
47.5
Neural Network
37.5
SVM
27.5
17.5
17.5
7.5
7.5
-2.5
KNN 61 63 65
64
37.5
93
57.5
SVM
KNN
Neural Network
93.5
77.5
NN
KNN
57.5
SVM 95.9
95.9
67.5
NN
KNN
95.5 95
Dates
97.5
Combination of (Outer Profile. Crossing Count,Projection Histogram)
Zoning
Combination of (Chain Code. Crossing Count)
Chain Code
(c)
-2.5
KNN
SVM
NN 61
56
KNN Neural Network
KNN
50
SVM
47
52 SVM
34
Combination of (Outer Profile. Crossing Count,Projection Histogram)
Combination of (Chain Code. Crossing Count)
Zoning
Chain Code
(d)
Fig. 16 Recognition rates in the levels of isolated digits (a), date (b), courtesy amounts (c), and cheque (d)
and in total, 61 % of cheques in the testing set. Also, the experimental results has been shown in Fig. 16 using the recognition diagrams. A comparison of the obtained experimental results with some prominent methods is given in Table 3. It is notable that each of methods in this table used its own database.
Therefore, the results are not really comparable. Also, as mentioned in the previous Sect. 4.3, just some classical algorithms have been applied for feature extraction and classification on the image of digits forming courtesy amounts and dates in the conducted experiments. Given satisfactory results (as can be seen in Table 3) using classical algorithms compared to the newer algorithms,
123
Pattern Anal Applic Table 3 Comparison of the obtained experimental results (segmentation and recognition) with some related works in the literature, our results are in bold
Method
Cheque type
Level
Segmentation rate (%)
Correct (%)
Reject (%)
Our method
Iranian
23,797
Digit
100
96.9
–
Palacios [28]
American
50,000
Digit
–
93.1
5.7
Knerr [19]
French
10,000
Digit
–
97.8
2.1 –
Our method
Iranian
500
Date
100
76
Morita [24]
Brazilian
2,000
Date
–
62–65
32–36
Xu [43]
Canadian
2,063
Date
–
85.36
0
Our method
Iranian
500
Courtesy amount
100
74
–
Song [40]
Chinese
1,000
Courtesy amount
–
85
15
Kaufmann [17]
Swiss
628
Courtesy amount
–
65.2
36.4
Our method
Iranian
500
Cheque
100
61
39
Alirezaee [2] Samoud [35]
Iranian Arabic
500 1,775
Cheque Cheque
94.4 96–98
– –
– –
Liu [21]
Canadian
196
Cheque
97–99
–
–
indicate that by using more improved features and satisfaction classifiers, more and more accurate results will be given in each step of automatic processing of Persian handwritten bank cheques.
6 Discussion Based on the experimental results (Sect. 5), many structural problems existing in the automatic processing of traditional Persian bank cheques have been addressed using our presented structure for Persian bank cheques. Compared to the standards in the North American countries such as Check 21 (USA), and Canadian payment association-Check 006 (in Canada), our proposed standard of Persian bank cheques paid more attention to solve the technical problems that existed in the pre-processing, segmentation, and recognition steps. However, Check 21 and Check 006 paid more attention to provide guidelines for exchanging cheque images between different institutions and legal issues for replacing paper cheques with image cheques in the cheque clearing process. Based on these standards, only cheques with specific sizes and arrangements can be processed and exchanged between banks and financial institutions. However, based on our proposed structure without any limitation in sizes, arrangements of fields, and layouts of cheques which used even in the same bank, cheques can be exchanged easily between different banks.
7 Conclusions and future works In this paper, in order to minimize the structural problems that occurred in the automatic processing (especially in the
123
Database
segmentation and recognition phases) of Persian cheques, we presented a new structure for handwritten bank cheques. Based on this new structure, errors in segmentation step are fully eliminated. Also, the new structure yields high accuracy and speed in the automatic processing of cheques. Notably, our presented structure has been approved by some of private and state Persian banks and financial institutions and it has been officially patented. In the future, we are going to use the presented databases of cheques to create a fully automatic cheque recognition system based on the new proposed structure for Persian bank cheques. We believe that the combining our proposed structure and standards like Check 21 and Check 006, can pave the way for a fully automatic processing of handwritten bank cheques in many countries around the world and solve this very old and very important problem that still exists today. We hope, our new structure will be adopted by all Persian banks and will be the preface for presenting the first fully automatic processing system of Persian bank cheques. Acknowledgments We would like to thank those participants who filled the cheques for our two databases and thank the bank that supported us for collecting of traditional Persian bank cheques.
References 1. Ahlberg JH, Nielson EN, Walsh JL (1967) The theory of splines and their applications, mathematics in science and engineering. Academic, New York 2. Alirezaee S, Ahmadi M, Alijamat A, Alahiari MA (2008) Segmentation of Iranian bank checks. In: Proceedings of the 12th IEEE Int Multitopic Con, pp 460–462. doi:10.1109/INMIC.2008. 4777782 3. Al-Ohali Y, Cheriet M, Suen CY (2003) Databases for recognition of handwritten Arabic cheques. Pattern Recognit 36:111–121. doi:10.1016/S0031-3203(02)00064-X
Pattern Anal Applic 4. Bertolini D, Oliveira LS, Justino E Sabourin R (2010) Reducing forgeries in writer independent offline signature verification through ensemble of classifiers. Pattern Recognit 43:387–396. doi:10.1016/j.patrec.2009.05.009 5. Bing H, Thanawin R, Bilson C, Abdullah M, Eamonn K (2013) Establishing the provenance of historical manuscripts with a novel distance measure. Appl Pattern Anal. doi:10.1007/s10044013-0332-z 6. Bottou L, Cortes C, Denker JS, Drucker H et al (2011) Comparison of classifier methods. A case study in handwritten digit recognition. Proceedings of the 12th Int Asso, Pattern Recognit 2 77–82. doi:10.1109/ICPR.1994.576879 7. Cheriet M, Kharma N, Suen CY et al (2007) Character recognition systems a guide for students and practitioners, Wiley, USA. http://eu.wiley.com/WileyCDA/WileyTitle/productCd0471415707.html 8. Ehsani MS, Babaee MR (2006) Recognition of farsi handwritten cheque values using neural networks. 3rd Int IEEE Con Intell Syst, pp 656–660. doi:10.1109/IS.2006.348497 9. Foroozandeh A, Akbari Y, Jalili MJ, Sadri J (2012) A novel and practical system for verifying signatures on Persian handwritten bank checks. Int J Pattern Recognit 6:1–27. doi:10.1142/ S0218001412560149 10. Gonzalez RC, Woods RE, Eddins SL (2009) Digital image processing using MATLAB, Gatesmark, USA. http://www.amazon. com/Digital-Image-Processing-Using-MATLAB/dp/0982085400 11. Guillevic D, Suen CY (1998) Recognition of legal amounts on bank cheques. Pattern Anal Appl 1(1):2841 12. Hairong L, Wang W, Wang C, Zhuo Q (2005) Offline Chinese signature verification based on support vector machines. Pattern Recognit 26:2390–2399. doi:10.1016/j.patrec.2005.04.013 13. Impedovo S, Wang P, Bunke H (1997) Automatic bank check processing. World Scientific, Singapore, pp 52–55 14. Jayadevan R, Kolhe SR, Patil PM, Pal U (2011) Automatic processing of handwritten bank cheque images: a survey. Int J Doc Anal Recognit 15(4):1–30: doi:10.1007/s10032-011-0170-8 15. Joachims T (1999) Making large-scale SVM learning practical. In: Scholkopf B, Burges C, Smola A (eds) Advances in kernel methods support vector learning, MIT-Press, USA 16. Kamali M, Faez K (2010) A method for skew correction and background noise removal in Persian check automatic system. Proceeding of the 6th Con Machine Vis Image Proc, Iran, pp 352–357 17. Kaufmann G, Bunke H (2000) Automated reading of cheque amounts. Pattern Anal Applic 3:132–141. doi:10.1007/ s100440070018 18. Kim G, Govindoriju V (1997) Bank check recognition using cross validation of courtesy and legal amount fields. Int J Pattern Recognit Artif Intell 11(4):657–674 19. Knerr S, Anisimov V, Baret O, Gorski N, Price D, Simon JC (1997) The A2iA intercheque system: courtesy amount and legal amount recognition for French checks. Int J Pattern Recognit Artif Intell 11(4):505–548. doi:10.1142/S0218001497000226 20. Liu K, Suen CY, Cheriet M, Said JN, Nadal C, Tang YY (1997) Automatic extraction of baselines and data from check images. Int J Pattern Recognit Artif Intell 11(4):675–697. doi:10.1142/ S0218001497000299 21. Liu CL, Sako H, Fujisawa H (2004) Effects of classifier structure and training regimes on integrated segmentation and recognition of handwritten numerals strings. IEEE Trans Pattern Anal Mach Intell 26(11):1395–1407. doi:10.1109/TPAMI.2004.104 22. Liu CL, Nakashima K, Sako H, Fujisawa H (2004) Handwritten digit recognition: investigation of normalization and feature extraction techniques. Pattern Recognit 37:265–279. doi:10.1016/ s0031-3203(03)002243
23. Madasu VK, Lovell BC (2005) Automatic segmentation and recognition of bank cheque fields. Digit Image Comput Tech Applic, 33. doi:10.1109/DICTA.2005.18 24. Morita M, Sabourin R, Bortolozzi F, Suen CY (2004) Segmentation and recognition of handwritten dates: an HMM-MLP hybrid approach. Int J Doc Anal Recognit 6:248–262. doi:10. 1007/s10032-003-0114-z 25. Morita M, Sabourin R, Bortolozzi F, Suen CY (2003) A recognition and verification strategy for handwritten word recognition. In: Proceedings of 7th Int Con Doc Anal Recognit 1 482–486. doi:10.1109/ICDAR.2003.1227712 26. Okada M, Shridhar M (1997) Extraction of user entered components from a personal bank check using morphological subtraction. Int J Pattern Recognit Artif Intell 11(5):699–715 27. Otsu N (1979) A threshold selection method from gray-level histograms. IEEE Trans Syst 9:62–66. doi:10.1109/TSMC.1979. 4310076 28. Palacios R, Gupta A, Wang PSP (2004) Handwritten bank check recognition of courtesy amounts. Int J Image Graph 4(2):1–20 29. Park J, Govindaraju V, Srihari SN (2000) OCR in a hierarchical feature space. IEEE Trans Pattern Anal Mach Intell 22(4):400–407. doi:10.1109/34.845383 30. Plamondon R, Srihari SN (2000) On-line and off-line handwriting recognition: comprehensive survey. IEEE Trans Pattern Anal Mach Intell 22(1):63–84. doi:10.1109/34.824821 31. Rajashekararadhya SV, Ranjan PV (2009) Zone based feature extraction algorithm for handwritten numeral recognition of Kannada script. IEEE Int Advance Computing Con, pp 525–528. doi:10.1109/IADCC.2009.4809066 32. Sadri J, Cheriet M (2009) A new approach for skew correction of documents based on particle swarm optimization. Proceedings of Int Con Doc Anal Recognit, pp 1066–1070. doi:10.1109/ICDAR. 2009.268 33. Sadri J, Suen CY, Bui TD (2003) Application of support vector machines for recognition of handwritten arabic/persian digits. Proceeding of the 2nd Con Machine Vis Image Proc Applic, pp 300–307 34. Sadri J, Akbari Y, Jalili MJ, Farahi A, Habibi M (2011) A new system for recognition of handwritten persian bank checks. Proceedings of Int Con Doc Anal Recognit, Beijing, China, pp 925–930. doi:10.1109/ICDAR.2011.188 35. Samoud FB, Maddouri SS, Abed HE, Ellouze N (2008) Comparison of two handwritten Arabic zones extraction methods of complex documents. In: Proceedings of Int Arab Con Info Tech, pp 1–7 36. Sansone C, Vento M (2000) Signature verification: increasing performance by a multi-stage system. Pattern Anal Appl 3:169181 37. Santos C, Justino EJR, Bortolozzi F, Sabourin R (2004) An offline signature verification method based on the questioned document experts approach and a neural network classifier. In: Proceedings of 9th Int Work Fronteir Handwri Reconit pp 498–502. doi:10.1109/IWFHR.2004.17 38. Simard PY, Steinkraus D, Platt JC (2003) Best practices for convolutional neural networks applied to visual document analysis. Proc Int Con Doc Anal Recognit 2:958. doi:10.1109/ ICDAR.2003.1227801 39. Soltanzadeh H, Rahmati M (2004) Recognition of Persian handwritten digits using image profiles of multiple orientations. Pattern Recognit Lett 25(14):1569–1576. doi:10.1016/j.patrec. 2004.05.014 40. Song W, Feng M, Shaowei X, Hui S (1997) Afault tolerant Chinese bank check recognition system based on SOM neural networks. Proc Int Con Neural Netw 4:2560–2565. doi:10.1109/ ICNN.1997.614705
123
Pattern Anal Applic 41. Su H, Zhao B, Ma F, Wang S, Xia S (1997) A fault-tolerant Chinese check recognition system. Int J Pattern Recognit Artif Intell 11(4):571–594 42. Vapnik V (1995) The nature of statistical learning theory, Springer, New York. ISBN 0-387-98780-0 43. Xu Q, Kim JH, Lam L, Sue CY (2002) Recognition of handwritten month words on bank cheques. In: Proceedings of the 8th Int Work Frontier Handwri Recognit, pp 111–116. doi:10.1109/ IWFHR.2002.1030895. 44. Ziaratban M, Faez K, Ezoji M (2007) Use of legal amount to confirm or correct the courtesy amount on farsi bank checks. Int Con Doc Anal Recognit, pp 1123–1127: doi:10.1109/ICDAR. 2007.4377090
123
45. http://www.a2ia.com. Accessed 10 Dec 2011 46. http://www.miteksystems.com/ImageNet_Payments_details.asp. Accessed 10 Dec 2011 47. http://www.parascript.com/products2/CheckPlus.cfm. Accessed 15 Dec 2011 48. http://www.signplus.com/en/solutions/fraudone.php. Accessed 10 Dec 2011 49. http://www.a2ia.com/Addon_Site/Upload/Autres/checkreader_3. 4.pdf. Accessed 20 Nov 2011 50. http://www.cdnpay.ca/imis15/pdf/pdfs_rules/standard_006. Accessed 25 Nov 2011