Keywords

1 Introduction

The authentication of the persons based on biometric techniques is a challenging problem which has been an active area of research over the years. Handwriting is one of the primitively used biometric techniques to authenticate an individual. Every individual has some certain degree of stability in their handwriting which enables the handwriting analyser to verify the writer. Writer verification is the task of authenticating the writer of an unknown handwritten document. Mostly this is done by the experts of handwriting analysis manually by visual examination of the documents, but the reliability of those decisions is not conclusive. Automation of this task is less attempted than identification as verification requires a local decision-making techniques which is generally more dependent on the content of the writing. This writer verification system can be developed using text-dependent input data set or using text-independent input data set. In text-dependent writer verification system the system is dependent on a given text content. In a text-dependent method the known and unknown writers need to write the same text accordingly and the system matches the same characters and texts to verify the writer. The text-independent methods are able to identify writers independent of the text content and the system uses a generalized method to verify writers by finding similarities between writing patterns. Text-independent methods have got a wider applicability, but text-dependent methods have obtain higher accuracy. Text-dependent system can increase the possibility of forgery due to text dependency, but it can be very useful in case of low security applications or applications where genuine user uses the system most of the time where frequent rejection is not suitable. In case of text-independent method, possibility of forgery is less but it needs more input data set and rejection can be possible in case of genuine user also. The writer verification can be used in different fields like security, access control, graphology, historical document analysis [1] and hand held, and mobile devices [2]. To some extent it can be considered as strong as DNA and fingerprints in terms of verification [3].

The paper is outlined as follows: a brief overview of the significant existing contribution on writer identification/verification techniques is discussed in Sect. 2. A summarized description of the proposed method is presented in Sect. 3. In Sect. 4 data collection and preprocessing steps are described. The description of features that are used for the current work can be found in Sect. 5. Section 6 describes about verification methodologies followed by results in Sect. 7. At last conclusion is presented in Sect. 8.

2 Brief Survey on Writer Verification/Identification

Writer verification technique is quite similar to signature verification and very close to writer identification but there exists a certain dissimilarities between them which make it a different problem in document analysis domain. Various works can be found in the literature on automatic signature verification since 1989 [412]. There is a lot of progress in signature verification but most of them are based on online mode as seen in [6]. Working on verification techniques in offline mode is more challenging than in online mode. In online mode prior information of strokes and their starting and ending points are available but not in case of offline mode. Different systems can be found regarding writer identification systems [1327]. Most of the works are on Roman script [1316] like the works of Srihari et al. [13], Said et al. [14], Bulacu et al. [15] and Siddiqi and Vincent [16], etc. Jain and Doermann proposed multi script writer identification on English, Greek, and Arabic languages [17]. In [18], Ghiasi and Safabakhsh presented text-independent writer identification using codebook on English and Farsi handwriting database. Some writer identification works can be found in [19, 20]. Djeddi et al. in [21] have proposed writer identification on multiple languages like English and Greek using ICFHR 2012 Latin/Greek database. Recently, Halder et al. [22] have proposed writer identification on Devanagari script. They have used isolated characters for their work. Ding et al. in [23] have worked on Chinese, English, and Greek languages for writer identification. Also there are few writer identification works on Bangla scripts which can be seen in [2427]. Garain and Paquet [24] proposed an AR coefficient feature-based writer identification system for Roman and Bangla script. Chanda et al. [25] have developed a text-independent writer identification system on Bangla script using the Gaussian kernel SVM (Support Vector Machine) as their classifier. They experiment their work on 104 writers and got 95.19 % accuracy on their system. Halder and Roy in [26] used only isolated Bangla numerals and in [27] used all characters (alphabets + numerals + vowel modifiers) for writer identification from 450 documents of 90 writers using 400 and 64 dimensional features and LIBLINEAR and MLP classifiers. In the work of [26] highest writer identification accuracy of 97.07 % has been achieved while in [27] 99.75 % accuracy has been achieved for the same. But the work on writer verification is very rare. Though there are few contributions on writer verification but most are in non-Indic scripts [2835]. Yamazaki et al. [28] have proposed an online Writer verification process using hidden Markov models (HMM) on Chinese and Japanese characters. They have used 20 writers each with 20 different characters to generate the code book text. A single word-based writer identification and verification has been implemented by Zois and Anastassopoulos [29]. Experiments have been performed on a data set of 50 writers. An English word and its corresponding Greek word with same meaning and length were used. 20-dimensional feature vectors have been used for the work. Bayesian classifier and Multilayer Perceptron classifier have been used to test the efficiency of their approach. For Bayesian classifier they have got identification accuracy of 92.48 % on English and 92.63 % on Greek words. For MLP the accuracies have been increased to 96.5 % and 97 % on English and Greek, respectively. They have achieved verification accuracies of 97.7 % and 98.6 %, respectively. As their approach is dependent on the dimensionality of the feature vector which is dependent on the length of the word so the success is also dependent on the word length, length of the SEs, and partition levels. As the results for both the languages are very close so it can be concluded that the approach can be language independent. In [30], Srihari et al. proposed different macro features with Gaussian and Gamma parameters along with log-likelihood ratio (LLR) on English handwritten samples from 1000 writers for writer verification. Bulacu et al. in [31] implemented writer identification and verification on Roman script using three different databases namely IAM database [32], Firemaker set [33], Unipen database [34]. The IAM database contains 650 writers, the Firemaker set contains 250 writers and the Unipen database contains 215 writers. They have also combined the IAM and Firemaker databases to form a database namely Large with 900 writers. The four different features directional probability distribution functions (PDFs), grapheme emission PDF, run-length PDFs, and autocorrelation are used by them. In another work by combining some textural and allographic features they have proposed text-independent Arabic writer identification [35]. The IFN/ENIT dataset [36] has been used for their work. For the allographic features, a codebook of 400 allographs has been generated from the handwritings of 61 writers and the similarities of these allographs have been used as another feature. The database has been collected from 350 writers with five samples per writer [each sample contains two lines (about 9 words)]. The best accuracies that have been seen in experiments are 88 % in top-1 and 99 % in top-10. There are very few works done on Indic script like Gupta and Namboodir [37] proposed a writer verification system using boosting method on Devanagari script on 20 writers to achieve error rates of 5 % for 7 words, 11 % when chosen randomly, and 22 % for primitive selection methods. According to our knowledge there no methods attempted on writer verification considering Bangla script which motivates us to work in this area. In this proposed method, some modification on fast Fourier transform (FFT), discrete cosine transform (DCT) and gray level co-occurrence matrix (GLCM) is done to extract textural features from superimposed characters images. Though the selected feature set is small considering the writer verification modality, satisfactory results are achieved.

3 Method

In this section, a brief description and outline of the proposed system has been presented. For the current work we have considered a database consisting of isolated characters collected from 100 writers. The inter writer (the variation between the handwriting samples of two different people) and intra writer (the variation within a person’s own handwriting samples) variation can be seen in handwriting of different writers. This difference can be seen in Fig. 1, where in Fig. 1a three different isolated characters from three different writers are shown. In Fig. 1b superimposed version of three characters of these three writes (writer wise) are shown and in Fig. 1c superimposed version of these three characters for 10 different writers (inter writer including the three writers) are shown. Here, the concentrated areas of characters of Fig. 1b are very high than in Fig. 1c due to the reason that the inter writer variation is very high compared to intra writer variation. This is due to the individuality property of the characters. The experts analyze and verify the writer on the basis of these visual differences. For more details on intra, inter writer variation, and individuality see [27]. Here we have used textural features to obtain that difference by means of automation for writer verification. After calculation of textural features, distance measure, and threshold are applied to verify an unknown writer from a set of known writers. Figure 2 gives a brief overview of the proposed writer verification technique. First, the collected data are preprocessed and superimposed in each character category and then textural features MFFT (modified fast fourier transform), MGLCM (modified gray level co-occurrence matrix), and MDCT (modified discrete cosine transform) are applied individually and combined.

Fig. 1
figure 1

a Example of three different isolated characters from three different writers. b Example of three superimposed characters of each writer from the same three writers. c Example of three superimposed characters from ten different writers including the three writer from (a) and (b)

Fig. 2
figure 2

Brief overview of the writer verification system

4 Database and Preprocessing

The current experiment is conducted using the database taken from [27] but with more number of writers. The database contains 500 documents of isolated Bangla characters from 100 writers consisting of total 35,500 Bangla characters (25,500 alphabets + 5000 Bangla numerals + 5000 Bangla vowel modifiers). An example of our designed sample data collection form for isolated characters is shown in Fig. 3. There exists no restrictions for writers regarding the type of pen and ink they have used; some of them have used pencils also. The documents were scanned using a flat-bed scanner and digitized in gray-scale mode at 300 dpi in TIF format. In Preprocessing stage the global binarization of the whole document is carried out. Now, maximum run length in both horizontal and vertical directions are calculated to identify boundary lines in each directions and then these lines are being deleted. After that, using bounding boxes and location information of the suggestive characters, the isolated characters are extracted from the raw document images. The details about the data collection, type of data, digitization of the raw collected handwritten data and preprocessing techniques can be found in [27].

Fig. 3
figure 3

Sample data collection form used for collection of Bangla Handwritten isolated characters and Vowel modifiers

In our proposed work the isolated images are not directly used for feature extraction. The characters of each writers are superimposed onto each other to create a single character image of each character category belong to that writer only. It means the same characters of a writer from five different sets are taken and superimposed to create a single character of that writer which contains the intra writer variation of that writer for that particular character. First, the bounding box of isolated gray character images are calculated. After applying global binarization the images are normalized to fixed 128 × 128 pixels size. Next, the normalized 128 × 128 binary images are projected into a white 128 × 128 image. In the projection technique, for each object pixel of the original image, corresponding pixel of the white 128 × 128 image has been decremented by a fixed value that is calculated using the formula (1). Thus, a single gray character image is created capturing the writing variation. This procedure is repeated for each character category writer wise. Figure 1b shows some sample superimposed images that are used for feature extraction.

$$ \left\lceil {\frac{N}{s}} \right\rceil $$
(1)
where N :

Total number of gray levels

where s :

Total number of image samples that are used to create a superimposed image.

5 Feature Extraction

In this proposed work, the textural features of the superimposed images are extracted to distinguish between the intra writer and inter writer variations. Two frequency domain features FFT (fast Fourier transform) and DCT (discrete cosine transform) are modified along with GLCM (gray level co-occurrence matrix) to extract the textural features. In general, the FFT and DCT are used to capture the varying frequency of an image but in this experiment the varying gray level intensity (gray-level frequency) values, i.e., the textural differences are calculated by modifying FFT, DCT, and GLCM. The MFFT (modified fast Fourier transform) is used to get the variation of gray level intensity values. The MGLCM (modified gray level co-occurrence matrix) is used to get the local variation among gray level pixel values, probability of occurrence, uniformity, closeness of the distribution of the gray-level pixel values. The MDCT (modified discrete cosine transform) is used to get the similar textural measures like MFFT but with less computational cost.

5.1 MFFT (Modified Fast Fourier Transform)

The Fourier transform has many different variations. Among those the discrete Fourier transform (DFT) is very widely used. The fast Fourier transform (FFT) is a quicker version of DFT where the computational overhead is lower compared to DFT. Using FFT pixel values of an image along a row or column can be transformed into a periodic sequence of complex number. To obtain image information of the frequency domain space FFT can be used. After a Fourier decomposition of the image, the phase spectrum contains texture and structure information about the image. More details about FFT can be found in [38]. The 2D FFT function computes transformation of a given 2D image of length M × N using the Eq. (2).

$$ F(x,y) = \sum\limits_{m = 0}^{M - 1} \sum\limits_{n = 0}^{N - 1} f(m,n){\text{e}}^{{ - j2\pi (x\frac{m}{M} + y\frac{n}{N})}} $$
(2)

In the current method the Modified FFT feature is calculated on the superimposed images using the following steps: First, the 128 × 128 dimensional feature vectors has been computed using 2D FFT algorithm then using Gaussian filter and Eq. (3) MFFT is calculated on the images to get 64 dimension feature vectors.

$$ F(x) = \left\{ {\frac{f(m)}{M},F(x) \le 1} \right\} $$
(3)

where

$$ \begin{aligned} M & = { \hbox{max} }(f(m)) \\ f(m) & = \sum\limits_{n = 1}^{N} m_{n} \\ \end{aligned} $$

and

N :

Total number of feature dimension for a single column of the feature set.

5.2 MGLCM (Modified Gray Level Co-occurrence Matrix)

The GLCM (gray level co-occurrence matrix) is a statistical calculation of how often different combination of gray level pixel values occur in an image. It has been the workhorse for textural analysis of images since the inception of the technique by Haralick et al. [39]. GLCM matrix describes the frequency of occurrence of one gray level with another gray level in a linear relationship within a defined area. Here, the co-occurrence matrix is computed based on two parameters, which are the relative distance between the pixel pair d measured in pixel number and their relative orientation φ. Normally, φ is quantized in four directions (0°, 45°, 90°, and 135°). The GLCM is a matrix where the number of rows and columns are equivalent to the number of gray levels of the image. The matrix element P(i, jx, Δy) is the relative frequency with which two pixels, separated by a pixel distance (Δx, Δy), occur within a given neighborhood, one with intensity i and the other with intensity j. One may also say that the matrix element P(i, j|d, θ) contains the second-order statistical probability values for changes between gray levels i and j at a particular displacement distance d and at a particular angle (θ). Detail description of GLCM may be available in [39]. In the current approach the MGLCM is calculated with contrast, correlation, energy, and homogeneity statistical measures in all four directions considering both type of pairs like P[i, j] and P[j, i]. The following Fig. 4 is showing the GLCM calculation technique in this respect for all four directions and both pixel pair types considering eight gray levels. After the calculation of GLCM using the Eq. (3) the MGLCM feature vectors are calculated to get eight dimensional features.

Fig. 4
figure 4

GLCM calculation for both type of pixel pairs in all four directions

5.3 MDCT (Modified Discrete Cosine Transform)

Discrete cosine transform (DCT) is one of the widely used transform in the image processing applications for feature extraction. The approach involves taking the transformation of the image as a whole and separating the relevant coefficients. DCT performs energy compaction. The DCT of an image basically consists of three frequency components namely low, middle, high each containing some detail information in an image. The low frequency generally contains the average intensity of an image. The DCT is very similar to FFT. The main difference between a DCT and a DFT is that the DCT uses only cosine functions, while the DFT uses both sin and cosine. To get more details on DCT see [40]. The 2D DCT function computes the transformation of a given M × N image by using the Eq. (4). The 64 dimensional MDCT feature vectors of the superimposed images has been calculated using the following steps: first, the 128 × 128 dimensional feature vector has been computed using 2D DCT then Gaussian filter and Eq. (3) is used.

$$ \begin{aligned} F(x,y) & = (\frac{2}{M})^{{\frac{1}{2}}} (\frac{2}{N})^{{\frac{1}{2}}} \sum\limits_{m = 0}^{M - 1} \sum\limits_{n = 0}^{N - 1} \varLambda (m)\varLambda (n) \\ & \cos [\frac{\pi x}{2M}(2m + 1)]\cos [\frac{\pi y}{2N}(2n + 1)]f(m,n) \\ \end{aligned} $$
(4)

where

f(m, n):

The gray intensity value of the pixel (m, n).

6 Verification

In this study, the writer verification is performed using Mahalanobis distance measure technique between features of known writers of the database and the unknown writer. In the proposed system, the textural features are extracted from the isolated handwritten characters of the unknown writer and after calculating Mahalanobis distance the varying decision threshold is applied to verify the writer. During the verification phase the features extracted from the known writers are used to calculate the distance between the known and questioned writer. The feature vectors of the known and questioned writer in the feature space during a certain comparison can be defined as follows:

$$ \overleftarrow {{{\text{KW}}_{j} }} = ({\text{kf}}_{1j} ,{\text{kf}}_{2j} ,{\text{kf}}_{3j} , \ldots ,{\text{kf}}_{Nj} ) $$
(5)

and

$$ \overleftarrow {\text{QW}} = ({\text{qf}}_{1} ,{\text{qf}}_{2} ,{\text{qf}}_{3} , \ldots ,{\text{qf}}_{N} ) $$

where

kf ij and qf i :

represent each features of the known writer and the questioned writer, respectively.

and

N :

is the feature dimension.

Mahalanobis distance on each of these feature vector pair has been calculated which can be defined as follows:

$$ D(x) = \sqrt {({\text{kf}}_{ij} - {\text{qf}}_{i} )^{T} S^{ - 1} ({\text{kf}}_{ij} - {\text{qf}}_{i} )} $$
(6)

where kf ij and qf i are same as defined in (5)

and

S −1 is the inverse covariance matrix of the feature data set.

The decision threshold has been calculated after the distance measure and if the distance is greater than the threshold then the questioned writer is verified.

7 Results

The proposed experiment has been carried out on total 35,500 Bangla characters from 100 writers taking five samples of isolated characters from each writer. The textural features MFFT, MGLCM, and MDCT are used for feature extraction and Mahalanobis distance measure and varying decision threshold has been used to verify the writers. In the current system from 100 writers four samples are used to create the training feature set and the remaining samples are selected at random as the set of unknown writers. The features capture different aspects of handwriting individuality. By combining all the features improvement in the performance of verification has been achieved.

7.1 Result of Writer Verification

In order to get a reliable result two types of errors are considered along with two types of accuracy calculations. The true acceptance rate (TAR), (where the questioned writer is properly accepted) and the true rejection rate (TRR), (where the questioned writer is properly rejected) are summed up to get the accuracy value. The false acceptance rate (FAR), (where the questioned writer is not the original writer and the system wrongly accepted it) and false rejection rate (FRR), (where the questioned writer is the original writer but the system wrongly rejected it) are considered as the total error rate. Table 1 shows the writer verification results in terms of individual features and combination of features. From the table it can be observed that in case of individual features MFFT scores highest with 56.27 % verification accuracy where GLCM scored very low due to the very high False acceptance rate (FAR) of 46.68 %. When the three features are combined the accuracy has been increased to 62.17 % which is quite satisfactory.

Table 1 Writer verification result on different textural features

7.2 Comparative Study

In the current method, we have used 100 writers and textural features. According to our knowledge of the literature there is no such work of writer verification on Bangla script so currently we are unable to compare our experiment with others. In our current approach three different textural features are applied. A comparative study on writer verification results of these features and their combinations can be seen in Fig. 5. In Fig. 6 a comparative analysis of different features and their combination with respect to accuracy and error rate is shown. Analyzing these figures, it can be seen that the MFFT feature gives better performance compared to others regarding single and combined use. The performance of MGLCM feature is quite low due to the higher False Acceptance Rate (FAR), while performance of MDCT is moderate. When combination of different features is used the accuracy is improved and error rate are also decreased. Though the results are not very high due to high false acceptance rate (FAR) but the results show some encouragement toward the works of handwritten Bangla writer verification. Our approach is open for comparison with other works.

Fig. 5
figure 5

Comparison of accuracy and error rate of writer verification results with respect to different features and their combinations

8 Conclusion

In this document a study has been conducted on Bangla isolated characters for writer verification. The lack of standard Bangla handwriting analysis system and a standard Bangla database with writer information, has initiated our interest in this work. In the current work, we have used a database consists of 100 writers and modified some simple frequency domain features to use as textural features for our approach. Although the used feature set is small regarding writer verification modality, encouraging results are successfully achieved. At present there is no such writer verification system on Bangla with which we can compare our system, still it can be used as a stepping stone towards this type of works on Bangla. The amount of data is relatively large enough which indicates that this method can be applied in real-life environment.

Fig. 6
figure 6

Comparative study of different features and their combinations with respect to accuracy and error rate of writer verification results

Future scope includes increasing the size of the database both in terms of writers and samples per writer to create a standard database for the community of handwriting analysers. Also we are looking forward to introduce handwriting of skilled forgers to give an extra dimension to our work. In future fuzzy measures can be introduced during feature selection so that false acceptance rate can be minimized. We are also planning to use different kind of statistical distance measure and analysis methods for decision making during verification. We believe that this kind of approach can be applied on other similar Brahmic scripts.