Arabic Character Recognition Using Features Extracted from Curvelet and Spatial Domains

Arabic character recognition is a challenging problem in several artificial intelligence applications, especially when recognizing connected cursive letters. Another dimension of complexity is that Arabic characters may form various shapes depending on their positions in the word. As a result, unconstrained handwritten Arabic character recognition has not been well explored. In this study, we propose an efficient algorithm for Arabic character recognition. The new algorithm combines features extracted from curvelet and spatial domains. The curvelet domain is multiscale and multidirectional. Therefore, curvelet domain is efficient in representing edges and curves. Meanwhile, the spatial domain preserves original aspects of the characters. This feature vector is then trained using the back propagation neural network for the recognition task. The proposed algorithm is evaluated using a database containing 5,600 handwritten characters from 50 different writers. A promising average success rate of 90.3% has been achieved. Therefore, the proposed algorithm is suitable for the unconstrained handwritten Arabic character recognition applications.


INTRODUCTION
Handwriting recognition systems can be categorized into offline and online.Online handwriting recognition requires electronic devices such as a plate and a pen.Online recognition provides more information such as writing speed and pen stroke, which makes recognizing characters easier compared with the offline system (Arica and Yarman-Vural, 2002).Considerable studies can be found on handwriting recognition of different languages such as English, Chinese and Japanese.By contrast, research on Arabic character recognition has not received adequate attention.The possible reason is lack of support in terms of funding, coordination, Arabic databases and dictionaries (Zidouri, 2010;Kabbani, 2012;Alginahi, 2013).
Arabic language has 28 characters and its words are written from right to left.Each character has different shapes depending on the character location within the word (beginning, middle, end and isolated) (Table 1).Most Arabic characters contain more than one component; one main component with at least one secondary component.The size of the secondary component is usually smaller than that of the main component.In addition to the shape of the character, the secondary component is used to differentiate between the characters in Arabic language.The number of secondary components may vary from one to three and may be located on either the upper, lower, or middle part of the character.To be read correctly, a word must come with diacritics, which are similar to short vowels.Many forms of diacritics exist, such as fatha, dhamma and kasra.A few characters have loops in their shapes, such as ‫"ط"‬ and ‫."ص"‬ In this study, we apply the preprocessing operation to enhance the quality of the image.We then extract features from the spatial and curvelet domains.We select features by considering the nature of the Arabic characters that will help the classifier to accurately recognize the character.

LITERATURE REVIEW
In the last few decades, an increasing number of empirical studies have been conducted on Arabic character recognition.Sahlol and Suen (2014) extracted the statistical and topological features from the main and secondary components of the character.They used a back propagation algorithm for classification.They reported that a few characters achieved less than 65% recognition rate.Elzobi et al. (2014) extracted the mean and standard deviation of the Gabor wavelet transformed images.This method uses the Gabor wavelet, which requires large space and high computation time because Gabor functions are nonorthogonal (Kokare et al., 2003).Rashad et al. (2012) extracted the geometric moment and statistical features.
The statistical feature depends on the number of the pixels in the foreground and background as well as the transition inside the character.A neural network is used to recognize the characters.However, the execution time is high because their approach used more than two hidden layers in their neural network architecture.Aulama et al. (2011) proposed a method to recognize the sub-word before recognizing the characters by initially using the structural and statistical features of characters and then applying hidden Markov models to recognize the character.The main limitation of their work is that the character recognition depends on the sub-word recognition.Abandah and Anssari (2009) extracted normalized central moments and the Zernike moment features from a whole character, main and secondary components.Next, they applied genetic algorithm to minimize and select the best feature.Finally, they employed a support vector machine classifier to recognize the character.They reported a classification error rate of 10% without describing the performance of each character in detail.Al-Jawfi ( 2009) designed the structure of LeNet neural network, which recognizes the main and secondary components.
Only the total mean square error was reported and the network configuration used had more than three layers; thus, the computation and complexity increased.El-Glaly and Quek (2012) extracted the statistical features depending on the number of vertical and horizontal transitions and ratio between the height and width from the characters.Next, they compared the recognition accuracy obtained from the two different classifiers.However, the comparison between the two classifiers using a few simple features fails to show the strength of the classifiers.Aburas and Ali Rehiel (2007) established an optical character recognition system that used a method similar to that used in wavelet compression.For classification, the Euclidian distance method was used to match the character with a code book.However, this approach is time consuming in curvelet (Starck, 2002) matching with the code book.A few recent studies on other languages and other applications have been published, in which features are extracted from the curvelet domain for character recognition and achievements have been recorded (Kausalya and Chitrakala, 2012;Prasad et al., 2012;Hafeez Allah et al., 2014).
CURVELET TRANSFORM BACKGROUND Candes et al. (2006) were the first to introduce curvelet transform.In their seminal work, they wanted to find a more efficient way of representing curve edges that worked in multiscale and different directions.The new scales and directions allow the transform to decompose an image with fewer coefficients, which is contrary to wavelet transform representation that has less directions and a high number of coefficients.This comparison is shown in Fig. 1.
Therefore, the decomposition of the curvelet for curved-like edges is superior to other transforms.The discrete curvelet transform can be obtained in two ways: the first method is based on ridgelet transform and the second method is the Fast Discrete Curvelet Transform (FDCT) based on unequally-spaced fast Fourier transform technique or on the wrapping-based technique.In this study, we used the wrapping-based technique because this method is more applicable to our needs and also considered to be faster (Candes et al., 2006).Figure 2   (1) where, C 0 represents the discrete curvelet coefficients, ˦{˭, J{ is a two-dimensional image of size M x N,φ 0 , is the curvelet function transform, r represents the scales, ˬ is the orientation and ˩ and ˪ are the spatial locations of the output.

PROPOSED APPROACH FOR ARABIC CHARACTER RECOGNITION
The general block diagram of the proposed method is shown in Fig. 3.The proposed method passes through three stages, namely, preprocessing, feature extraction and recognition.
Preprocessing stage: Back propagation algorithm requires the feature length to be similar for all images.
We select an image size of 75×75 for our work.We use bicubic interpolation to normalize the image, where the value of the output pixel is a weighted average according to the nearest 4×4 neighborhood pixels (Keys, 1981).
The character recognition systems are generally highly sensitive to noise.This noise degrades the system performance.In our study, median filter is used to remove the noise from the image, which may be generated by the scanning process.Thereafter, the image is passed to both the thinning process and to the curvelet transform.
The thinning process simplifies the Arabic character shapes for feature extraction and classification.This process results in reduced size of the image.The operation helps simplify the extraction of feature points such as cross point, branch point and endpoint (Ali and Jumari, 2004).In this study, we adopt the method developed by Zhang and Suen (1984).
Curvelet transform is considered a multiscale transform with different angles within each scale.To choose better scales, we apply Eq. ( 2) to produce the number of scales convenient to the size of the image   (Jia and Xiangfeng, 2009).For this reason, we select 4 as the number of scales and the orientations for the second and third scales are 8 and 16, respectively.The finest scale is ignored because this scale includes the high-frequency coefficients in most cases, which may be regarded as noise.The total number of sub-bands obtained from the second and third scale is 24.Only half of these sub-bands is used in the computation because a coefficient at angle θ is exactly identical at θ+π (Candes et al., 2006).The final extracted features depend only on 13 curvelet decomposed images.
where, S is the number of scales and M and N are the dimension of the image.
Feature extraction: Features are extracted from two different domains.Some features are extracted from the spatial domain and others are from the curvelet domain.

Spatial domain features:
From the spatial domain, the proposed method extracts the structural features from the main and secondary components of the character.
We count the number of end points, branch points, cross points, holes, connected components and secondary components in each zone as features separately.
The end-point pixel has only one neighboring pixel.Eight templates are designed to detect the end point in a main component by using a 3×3 window (Fig. 4).
The branch-point pixel has three non-adjacent neighborhoods.Eight templates are designed to detect branch point in the main component by using a 3×3 window (Fig. 5).In the branch point template, the three gray cells must contain only one foreground pixel and two background pixels.The cross point is a special case of the branch point.The cross-point pixel has four nonadjacent neighborhoods.Moreover, the three gray cells contain two non-adjacent foreground pixels and one background pixel.
This feature describes the number of holes in the character by tracing each branch and cross points in the character.If one of the paths returns to the starting point, then this character has a hole (Fig. 6).
The connected component operation counts the number of connected components in a given image.Connected components are produced by scanning the image and grouping the pixels using 8-neighborhood connectivity.Figure 7 shows the character Baa with two connected components, the main connected component (Label 1) and the secondary components (Label 2) located under the main component.
The proposed method divides the image into three equal horizontal zones.We count the number of secondary components in each zone by calculating the centroid point for each secondary component and take the y coordinate for each centroid point to determine the location of the secondary component(s) in each zone (upper, middle, or bottom) (Fig. 8).Standard deviation {σ) measures the amount of variation from the mean (Bland and Altman, 1997).Equation ( 4) is used to calculate the standard deviation: where, MxN is the size of the curvelet image, C 0 {˩, ˪{ represents coefficients of the curvelet in each sub-band and {˩, ˪{ is the mean value for the curvelet image.Corner is regarded as a significant direction change in the line or curve.In this case, we count the number of corners in each curvelet sub band.We used Harris corner detector to identify corners in each sub-band.The Harris corner detector is robust against illumination variations, rotation, scaling and blurring (Harris and Stephens, 1988).
Classification: For the classifier, we used the back propagation neural network (Chandra, 2003) with logsigmoid activation function.The neural network input layer consists of images, while the output layer represents the classified characters as each neuron represents one character (Fig. 9).The back propagation algorithm has been used with other pattern recognition problems and is considered a powerful classification method.The training continues until the sum-square error is less than 0.001.

RESULTS AND DISCUSSION
We used our own database (Bahashwan and Abu Bakar, 2014) because no free Arabic character database with dots and a similar number of images in each class was available online.Our database contains images of 5,600 handwritten Arabic characters written by 50 writers.Each character has 200 images divided into four groups (beginning, medium, end and isolated).A few samples of these characters are shown in Fig. 10.We divide the database into two data sets by 70 and 30%, respectively for training, and testing, respectively.
The proposed method is able to recognize 6 characters with 100% accuracy and more than half with accuracy greater than 90% (Table 2).The lowest recognition rate is 86.67%.This result is caused by the similarity of the character to other characters.Recognizing the secondary components of the character is also difficult because of variation in writing styles of the dots.
We compare our work with that of Elzobi et al. (2014) and Abandah and Jamour (2010), which initially segment the word into characters and then recognized it.We also compare our work with Sahlol and Suen (2014), which used an Arabic character database.Table 3 shows that the proposed method is able to recognize with an average accuracy rate of 90.3%, which can be considered a highly promising result.

CONCLUSION
We proposed an efficient Arabic character recognition algorithm.Our method extracted features of the character from the spatial and curvelet domains.We extracted the structural features from the spatial domain and the statistical features from the curvelet domain.This feature vector is used to train the classifier for the recognition task.The proposed method reveals a promising result in terms of recognition rate with an average accuracy rate of 90.3%.

Fig. 8 :
Fig. 8: Example of character Khaa divided into three horizontal zones

Table 1 :
Shapes of Arabic character in different locations

Table 2 :
Recognition rates for Arabic characters using proposed

Table 3 :
Comparison between different approaches