PREPROCESSING APPROACHES IN DTW BASED ONLINE SIGNATURE VERIFICATION

: Amongst different approaches, dynamic time warping has shown promising results during the online signature verification competitions of previous years. To improve the results of dynamic time warping, different preprocessing steps may be applied and different dimensions of the samples may be compared. The choice of preprocessing steps and comparing dimensions may significantly influence the results. Thus, to aid researchers with these decisions, a comparison made between the results of promising preprocessing algorithms as horizontal scaling, vertical scaling and alignment using dynamic time warping in different dimensions and their combinations on two datasets (SVC2004 and MCYT-100). The results showed that preprocessing methods made a very promising improvement in the verification accuracy.


Introduction
Online signature verification is an important field in forensic examination. Although fingerprint or face-based identification methods are more secure, signatures are still used in several fields around the world. Furthermore, based on the input data, there are two types of signatures: offline and online. Accordingly, in offline signatures, data is an image of the signature like bank checks and documents), and in online signatures, data is captured using a special device, for example a pressure-sensitive tablet. The data in Table I Some normalization preprocessing methods used in signature verification

Preprocessing
References Alignment, alignment of the center of gravity, translation, location normalization, alignment based on GMM, mean removal [8], [9], [10], [11] Scaling, size normalization, horizontal scaling, vertical scaling, length normalization [12], [13], [14] Rotation, rotation normalization, removing the angle using DTW [15], [16], [17] Time normalization [14] Min. normalization [18] Max. normalization [18] The last step was verification where the preprocessed extracted features used to match the signatures and classify them into original and forged categories. Accordingly, distances between the reference signatures were used in the comparison step. One of the most popular methods of distance measurement is DTW since it finds the best nonlinear alignment of two vectors where the overall distance between them is minimized. DTW has shown promising results in the signature verification field [19], [20]. Resultantly, the signer provided a set of original and forged signatures and a set of the original signatures was used as reference for the matching measurements. In addition, they were grouped into training and testing sets, which will later be explained in detail. The results of applying all these steps using DTW on different dimensions, alignment, and scaling for preprocessing are discussed and compared in the results section.

Related work
There are many popular function-based verification methods, such as DTW [21] and hidden Markov model [22]. The DTW algorithm was established in the 70's when it was mainly applied in word recognition [23]. Subsequently, it was used for clustering and classification in many different domains, including different recognition systems, for instance speaker recognition [24] and handwritten recognition [25]. In signature verification, DTW matches tested signatures directly with reference samples of the user signatures. Moreover, the preprocessing step was very important in verification systems since different image enhancement methods were applied in [26] and [27] as a preprocessing step. Additionally, a normalization method proposed in [28] for image resizing based on the multi-rate filter theory to reduce size-invariance. The preprocessing step was required before applying DTW to improve the accuracy of the system. Consequently, alignment to the mass center, scaling, and Fourier transform methods were commonly used in this step [29]. In accordance with the above, DTW showed great results in the previous signature and handwritten recognition competitions [19] where most of the winners applied it.

Contribution
The verification of the signature was based on different processing steps. Accordingly, the data in this work consists of original and forged signatures for each signer. After applying the preprocessing algorithms for each signature, DTW was used to calculate the distances between each pair of signatures in the training set. Moreover, the same preprocessing algorithms were applied to the tested signatures and compared to a threshold calculated from the training data and defined as an accepted or rejected original signature. Subsequently, the results of the accepted and rejected signatures were compared to decide the best preprocessing algorithm with the least error rate using two different databases. These results helped the signature verification field researchers choose the most significant and useful approaches for the preprocessing step of their works in the field.

Methodology
Alignment was an important preprocessing algorithm. Consequently, although a signer may create similar signatures every time, there is always some difference between each signature. Furthermore, one of the differences is between the starting and ending points of the signature, which may result in non-accurate measurements. Thus, the alignment method was applied for each signature before implementing any calculations. Accordingly, signature alignment can be applied for both X and Y coordinates since the signature was aligned to the origin of the coordinate by subtracting the mean value of the coordinate values from each point.
Furthermore, the scale may be different between the signatures. In this case, the scaling preprocessing method was needed for more accurate measurements. In addition, the scaling could be applied horizontally or vertically. In horizontal scaling, the X values were scaled by multiplying each point to a ratio that keeps the point in a specific range of values. For vertical scaling, the same method was applied to the Y values. Fig. 1 shows an example of the preprocessing steps applied on the signature, the first and second columns shows the signatures before alignment and scaling, and the last columns shows the result. Subsequently, after applying the preprocessing algorithms on the signature, the dynamic time warping algorithm was used to calculate differences between the signatures. Since DTW is a well-known technique to find an optimal alignment between two given time sequences under certain restrictions, it finds the best nonlinear alignment and a 'warping path' between 2 vectors to find the minimum distance between them. The algorithm applied on different dimensions was X, Y and XY.
The distances between the signatures were used for classification. The average of the distances in the original training signature group was used as a threshold for classification. The test group of signatures consisted of the same number of original and forged signatures. Accordingly, each signature of the test group was tested by the system and assigned as original and forged. Since the accuracy of any verification system depends on the error rate, there were two types of errors in the system: 1) when the system accepted a forged signature as original; and 2) when it rejected an original signature.

M. SALEEM, B. KOVARI
Pollack Periodica 15, 2020, 1 Furthermore, the original test group was used to calculate the False Rejection Rate (FRR) and the forged test group was used to calculate the False Acceptance Rate (FAR). Subsequently, the average of the FAR and FRR was used to evaluate the accuracy of the system, which is known as the Average of Error Rate (AER).
In this work all the combinations of preprocessing and DTW for different dimensions were tested. In the beginning, the algorithms were tested without the preprocessing work. Following this, each algorithm was tested separately for different dimensions. The alignment was applied on the X, Y and XY dimensions with and without scaling (on different dimensions). Consequently, all the previous combinations were applied using DTW algorithms for the different dimensions of X, Y and XY.

Experimental results
In this work, the system was applied using two different available databases. The SVC2004 database was freely accessible and consisted of 40 signatures for each of the 40 signers. The signature files consisted of data about the pen position, stroke points, pen pressure, etc. The strokes were then used to draw and compare the signatures. Consequently, each signer had 20 original signatures and 20 forged signatures. The MCYT-100 database was obtained through 100 signers, 25 client signatures, and 25 highly skilled forgeries each [2]. Additionally, the pen trajectory, pressure and pen azimuth acquired during the signing process using the WACOM pen tablet, model INTUOS A6 USB [30].
Furthermore, signatures were grouped into training and testing sets. Subsequently, a group of original signatures were used as references for distance calculations. The same sets were then used as a training set along with the same number of forged signatures. In addition, the rest of the original and forged signatures were used for testing. In the SVC2004, 10 original signatures were used as references: 10 original and forged signatures for training and another 10 original and forged for testing. Moreover, for the MCYT-100, the same number of signatures used in SVC2004 was used as a training set and references, but 15 original and forged signatures were used for testing.
The distance measurements were applied for the first 10 signatures and the results were used to calculate the threshold for classification. Resultantly, the threshold used was a summation of the average and standard deviations of DTW distances between the signatures. In addition, the test set of the original signatures was used to calculate the false rejection rate. Subsequently, the average of the distances was calculated and compared to the threshold. If equal or less than the threshold, it was accepted, and rejected if otherwise. The rejected signatures of this set were falsely rejected since the ideal system would accept them all. Thus, the number of rejected signatures in this set was divided by the total number of the signatures in the set to calculate the FRR.
The test set of the forged signatures was used to calculate the false acceptance rate. The average of the distances for each signature was calculated and compared to the threshold. Accordingly, the signature would be accepted if the average of the distances was less than or equal to the threshold. This set of signatures should be rejected in the ideal system since any accepted signature would be considered as false acceptance. Therefore, the number of the falsely accepted signatures of this set was divided by the total number of signatures in the set in order to calculate the FAR. Subsequently, to evaluate the system, both FAR and FRR were used and the average error rate was used for the evaluation, which was the average of FAR and FRR. The AER was calculated for each compilation of the preprocessing and distance measurement methods. Resultantly, the best system was the system with the less AER. Table II shows the result data for all the combinations. According to the results, applying the DTW algorithm on the XY dimension gave the best results compared to the X and Y dimensions (see Fig. 2). Thus, the average of the AER was 0.16734 for XY, 0.259 and 0.1818 for X and Y respectively. Moreover, the experiment showed that the alignment method gave better results. Thus, the average of the AER when applying the alignment method was 0.17645 compared to 0.2292 without alignment. Furthermore, scaling produced less improvement in the work and the horizontal scaling results were slightly better than vertical scaling. Based on the previous results, the best result was achieved by using the DTW algorithm on the XY dimension with a preprocessing method of alignment without scaling. Accordingly, the best result was 0.09125.

Fig. 2. A comparison between the effect of applying each method on the results
(where A= alignment, H=horizontal scaling, V=vertical scaling)

MCYT-100 results
The results of MCYT-100 database show almost the same effect of the preprocessing steps on the results but with better improvement. Therefore, applying the DTW algorithm on the XY dimension gave the best result compared to the X and Y dimensions (see Fig. 3). The average of the AER was 0.0806 for XY, 0.1486 and 0.0923 for X and Y respectively. Furthermore, the experiment showed that using the alignment method gave better results. The average of the AER when applying the alignment method was 0.05182 compared to 0.1626 when no alignment was applied. Moreover, scaling gave less improvement than alignment in this database as well, but with good improvement compared to not using any preprocessing methods.
Thus, based on the previous results, we can see that the best result was achieved by using the DTW algorithm on the XY dimension with a preprocessing method of alignment without scaling. The best result was 0.0193.

Conclusion
The accuracy of the DTW-based classifier can be improved by using preprocessing algorithms as peer the results. In addition, the 3 different preprocessing methods (alignment, horizontal scaling and vertical scaling) and their combination on different dimensions were applied to the signatures before verification. A total of 24 different simulations were applied on two sets of databases, which are SVC2004 and MCYT-100. These results showed the importance of preprocessing. Furthermore, the matching of DTW distances achieved the best results when it was applied on the XY dimension. Consequently, alignment showed better result improvement than horizontal and vertical scaling. The improvement was very promising and varied between the different methods. For the SVC2004 data, the best results were when applying DTW on XY dimension using only alignment for preprocessing where the AER reduced from 0.28625 to 0.09125 with 19.5% accuracy improvement. The same applied for the MCYT-100 database where the best results were achieved when applying DTW on XY dimension with only alignment preprocessing. Resultantly, the AER reduced from 0.359 to 0.0193 with 33.97% accuracy improvement.