A Multi-Agent Approach to Arabic Handwritten Text Segmentation


The segmentation of individual words into characters is a vital process in handwritten character recognition systems. In this paper, a novel approach is proposed to segment handwritten Arabic text (words). We consider the “Naskh” font style. The segmentation algorithm employs seven agents in order to detect regions where segmentation is illegal. Feature points (end points) are extracted from the remaining regions of the word-image. Initially, the middle of every two successive end points is considered as a candidate segmentation point based on a set of rules. The experimental results are very promising as we achieved a success rate of 86%.

Share and Cite:

A. Elnagar and R. Bentrcia, "A Multi-Agent Approach to Arabic Handwritten Text Segmentation," Journal of Intelligent Learning Systems and Applications, Vol. 4 No. 3, 2012, pp. 207-215. doi: 10.4236/jilsa.2012.43021.

1. Introduction

For the past three decades, there has been increasing interest among researchers in problems related to handwritten text segmentation and recognition regardless of the language used [1]. Most of the handwriting recognition systems are based on segmentation, which is the operation that seeks to decompose a word image into a sequence of sub-images containing isolated characters. Despite of the extensive work done on the off-line recognition of handwritten Latin and Asian languages text, a small number of research papers and reports are published in the recognition of Arabic handwriting [2]. This is probably a result of a lack of adequate support in terms of funding, and other utilities, such as comprehensive and standard Arabic text databases, dictionaries, etc.; and certainly due to difficulties associated with Arabic handwritten text segmentation such as the cursive nature of Arabic handwriting where most of the characters in a single word are connected to each other. Another difficulty is the existence of overlapping characters which are not attached to each other but share horizontal space. Due to difficulties mentioned above, many researchers bypass the segmentation stage in developing a recognition system. However, this is not practical and insufficient in applications that require recognition of a large number of vocabularies where several words may have the same global shape, such as bank check processing, postal address and zip code recognition [3,4], automated handwritten document entry and understanding, mail sorting, and other business and scientific applications. In addition, segmentation has an effective role in reducing the complexity of recognition systems since the number of recognition classes will be the number of Arabic letters and not the possible combinations of them.

In this paper, we address the problem of segmenting Arabic handwritten words into characters. The proposed approach utilizes seven agents which cooperate to identify the regions where the insertion of segmentation points is illegal. The segmentation algorithm is described in Figure 1 as a block diagram. First, the image of the

Figure 1. The basic steps in the algorithm.

Arabic handwritten text is preprocessed and segmented into lines using horizontal projection. Next, each line is segmented into words/sub-words using vertical histogram, where each range of continuous black pixels is considered as a single word/sub-word. The resulting words are then thinned and the feature points are extracted in order to be used by agents in character segmentation. Each agent is responsible for detecting a specific region where segmentation is not permitted. These regions share general characteristics with Arabic letters such as loops and cavities, as shown in Table 1. After pulling out the detected regions, end-point features are extracted from the remaining regions of the word. The center point of every two successive end points is considered as a candidate cutting point. Finally, heuristic rules are applied to verify the validity of the suggested cutting points.

The rest of the paper is organized as follows. Section 2 presents related work; Pre-processing stage is described in Section 3; The seven agents are introduced in Section 4; Section 5 presents the segmentation stage. Experimental results are discussed in Section 6; and conclusions and future directions are presented in Section 7.

2. Related Work

Segmentation stage is a crucial task in any character recognition system and especially Arabic handwritings recognition. Its difficulty stems from the high variability of writing scripts and styles which could be affected by writers’ health and mood. An extensive research is made and many studies appeared very early in the field of character recognition. An elaborate survey about character recognition systems is done by Amin [2]. A survey on character segmentation techniques and methods may be found in [5]. A multi-agents approach to separating handwritten connected digits is described in [6]. An overview of methods for separating handwritten characters is described in [7].

Three main approaches for segmenting a word into characters are defined in [8]: external segmentation, internal segmentation and holistic. External segmentation is the most commonly used approach to segmentation, where the possible letter boundaries are found prior to recognition.

In internal segmentation, both segmentation and recognition of letters are accomplished at the same time. In holistic based algorithms (also called no segmentation)

Table 1. The main shapes that construct Arabic letters.

general features of the whole word are extracted in order to recognize it and no characters are extracted.

Srihari [9] introduced one of the first external segmentation algorithms which segmented the Latin word at the minima of the lower contour of the writing. However, no performance results were reported for his algorithm.

Another segmentation method [10] is based on using mathematical morphology tools, namely singularities and regularities, where Amin, Motawa and Sabourin determined singularities by applying an opening to the Arabic handwritten word image and regularities by subtracting the singularities from the original image. These regularities are the candidates for segmentation. The algorithm achieved an accuracy of 81.88%. However, in some cases, it extracted two characters from the same segment. The same method is used for Latin handwriting [11,12].

Blumenstein and Verma applied a simple heuristic segmentation algorithm to Latin texts [13,14]. It finds segmentation points in printed and cursive handwritten words by looking for minimas or arcs between letters which can be the ideal segmentation points.

Another neuro-heuristic approach is used by Hamid and Haraty for segmenting handwritten Arabic text [15]. It is based on extracting connected block of characters and looking for topographic features to identify possible segmentation points. The distribution of these points is based on the average character width in the block. The system achieved an accuracy of 69.72%, but two major problems were encountered. The first problem is that the system failed in segmenting horizontal overlapping characters. Second, segmentation of handwritten Arabic text depends largely on contextual information, and not only on topographic features extracted from characters, which has not been dealt with in the system.

A new segmentation method is proposed by Bhowmik and Roy to segment Bangla words [16]. They traced the lower contour of each connected component in handwritten word-image anticlockwise. During this process, relevant features are extracted and their vectors are normalized. The system achieved an accuracy of 88% but it suffered from under segmentation problem. Another segmentation method was proposed by Lorgio and Govindaraju to segment Arabic handwriting [17]. The algorithm over-segments each word and then it removes extra breakpoints using knowledge of letter shapes. The accuracy of this system is 92.2% but it suffers from over segmentation. Comparing methods of internal and external segmentation approaches mentioned in the literature, experiments show that external segmentation provides greater interactivity, savings of computation, and simplifies the job of the recognizer [8]. In [18], we use a recognition-based system to segment handwritten Arabic text.

Because of the advantages mentioned above, the segmentation method in our proposed work will follow the external segmentation approach. Moreover, our method is not only expected to resolve the shortcomings of the previous related methods but also to achieve better results by avoiding under segmentation. This depends on agents that extract the appropriate features of Arabic handwritings which improve detecting candidate segmentation points. Our proposed system is a recognition-free segmenting Arabic handwritten system. The proposed system employs multi-agents in which agents cooperate to identify potential segmentation points. In addition, heuristic rules are applied to verify the validity of the suggested cutting points. The accuracy of this recognition-free system is 86%.

3. Preprocessing Phase

The image of the Arabic handwritten text is first scanned and converted into a binary format. Then, the image is cleaned by removing any noise produced by the optical scanning device or the writing instrument. The handwritten text is then segmented into lines using horizontal projection of black pixels on the Y-axis. Each line is finally segmented into words/sub-words by projecting vertically black pixels of the line onto the X-axis. Figures 2 and 3 show line and word segmentation, respectively. The unit used is pixels for both figures.

Figure 2. Two lines of text; horizontal projection of the both lines; and the resulting separate lines of text.

Figure 3. A line of text that consists of 4 parts; vertical projection; and the resulting separated sub-words.

Next, thinning is applied to the resulting word where the width of word’s boundary is reduced to one pixel. This step is fundamental since it is needed by agents for a successful extraction of feature points.

Figure 4 shows an Arabic handwritten word before and after thinning. Finally, main connected components of the word are extracted from the whole image to isolate extra parts of the image from the handwriting.

Conflicts of Interest

The authors declare no conflicts of interest.


[1] B. Verma, M. Blumenstein and S. Kukarni, “Recent Achievements in Off-Line Handwriting Recognition Systems,” International Conference on Computational Intelligence and Multimedia Applications (ICCIMA’98), Melbourne, 1998, pp. 27-33.
[2] A. Amin, “Off-Line Arabic Character Recognition: The State of the Art,” Pattern Recognition, Vol. 31, No. 5, 1998, pp. 517-530. Hdoi:10.1016/S0031-3203(97)00084-8
[3] L. Lam, et al., “Automatic Processing of Information on Cheques,” International Conference on Systems, Man & Cybernetics, 1995, pp. 2353-2358.
[4] A. Brakensiek, J. Rottland and G. Rigoll, “Confidence Measures for an Address Reading System,” Seventh International Conference on Document Analysis and Recognition (ICDAR2003), 2003, pp. 294-298.
[5] R. G. Casey and E. Lecolinet, “A Survey of Methods and Strategies in Character Segmentation,” IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 18, No. 7, 1996, pp. 690-706. Hdoi:10.1109/34.506792
[6] R. Alhajj and A. Elnagar, “Multiagents to Separating Handwritten Connected Digits,” IEEE Transactions on Systems, Man and Cybernetics, Part A: Systems and Humans, Vol. 35, No. 5, 2005, pp. 593-602. Hdoi:10.1109/TSMCA.2005.843389
[7] Y. Lu and M. Shridar, “Character Segmentation in Handwritten Words—An Overview,” Pattern Recognition, Vol. 29, No. 1, 1996, pp. 77-96. Hdoi:10.1016/0031-3203(95)00072-0
[8] C. C. Tappert, C. Y. Suen and T. Wakahara, “The State of The Art in On-line Handwriting Recognition,” IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 12, No. 8, 1990, pp. 787-808. Hdoi:10.1109/34.57669
[9] S. Srihari and R. Bozinovic, “A Multi-Level Perception Approach to Reading Cursive Script,” Artificial Intelligence, Vol. 33, No. 2, 1987, pp. 217-255. Hdoi:10.1016/0004-3702(87)90035-X
[10] D. Motawa, A. Amin and R. Sabourin, “Segmentation of Arabic Cursive Script,” Proceedings of the Fourth International Conference on Document Analysis and Recognition, Ulm, 18-20 August 1997, Vol. 2, pp. 625-628.
[11] M.-Y. Chen, A. Kundu and J. Zhou, “Off-Line HandWritten Word Recognition Using a Hidden Markov Model Type Stochastic Network,” IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 16, No. 5, 1994, pp. 481-496. Hdoi:10.1109/34.291449
[12] M.-Y. Chen, A. Kundu and S. N. Srihari, “Variable Duration Hidden Markov Model and Morphological Segmentation for Handwritten Word Recognition,” IEEE Transactions on Image Processing, Vol. 4, No. 12, 995, pp. 1675-1688. Hdoi:10.1109/83.477074
[13] M. Blumenstein and B. Verma, “A Neural Based Segmentation and Recognition Technique for Handwritten Words,” Proceedings of IEEE World Congress on Computational Intelligence, WCCI’98, Anchorage, 4-9 May 1998, pp. 1738-1742.
[14] M. Blumenstein and B. Verma, “An Artificial Neural Network Based Segmentation Algorithm for Off-line Handwriting Recognition,” International Conference on Computational Intelligence and Multimedia Applications (ICCIMA’98), Melbourne, 1997.
[15] A. Hamid and R. Haraty, “A Neuro-Heuristic Approach for Segmenting Handwritten Arabic Text,” International Conference on Computer Systems and Applications, ACS/ IEEE, Beirut, 25-29 June 2001, pp. 110-113.
[16] T. K. Bhowmik, A. Roy and U. Roy, “Character Segmentation for Handwritten Bangla Words Using Artificial Neural Network,” Proceeding of the First IAPR TC3 NNLDAR Workshop, Seoul, 2005.
[17] L. Lorgio and V. Govindaraju, “Segmentation Pre-Recognition of Arabic Handwriting,” Proceedings of the Eighth International Conference on Document Analysis and Recognition, 29 August-1 September 2005, Vol. 2, 2005, pp. 605-609. Hdoi:10.1109/ICDAR.2005.207
[18] A. Elnagar and R. Bentrecia, “Recognition-Based Segmentation of Arabic Handwriting,” the 9th International Workshop on Pattern Recognition in Information Systems, Milan, 6-7 May 2009.

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.