Offline Handwritten Signature Verification Based on Local Ridges Features and Haar Wavelet Transform

Multiple applications use offline handwritten signatures for human verification. This fact increases the need for building a computerized system for signature recognition and verification schemes to ensure the highest possible level of security from counterfeit signatures. This research is devoted to developing a system for offline signature verification based on a combination of local ridge features and other features obtained from applying two-level Haar wavelet transform. The proposed system involves many preprocessing steps that include a group of image processing techniques (including: many enhancement techniques, region of interest allocation, converting to a binary image, and Thinning). In feature extraction and analysis stages, a combination of local ridge features and other features obtained from the details of Haar wavelet subbands are extracted. Each wavelet sub-band image is fragmented into blocks with overlap and then the local features and wavelet energies are extracted from each block. Experiments were performed using a database of 600 signature prints collected from 100 persons, (i.e., 6 samples per person). The recognition accuracy of the system was the optimum (100%) using two decomposition levels. For verification purposes, the False Reject Rate for the system was (0.025%) while False Acceptable Rate was (0.03%) respectively.


Introduction
The verification of people by biometrics is an important technology in our life. With all the behavioral biometric features such as keystroke, voice, and gait, a signature is the most utilized feature to reduce forgeries. The signature encodes the movements of the signer. These movements can change according to many factors such as: tiredness, mood, etc. [1]. The signature has a high acceptance by the public and specialized applications such as: validating paper documents and use in banking transactions [2]. An automatic system for signature verification can be either online or offline, according to the method used to acquire the signature. The input of an offline system is a static signature image mostly scanned at a high resolution. The most important applications of these systems are the verification of signatures on bank checks and vouchers. Online systems capture signatures using pressure sensitive tablets or smart pens. Here the time dimension is necessary. The applications of online signature verification include access control and electronic document authentication. Because of the differences in the input, preprocessing, feature extraction and recognition techniques used, online and offline systems have a great difference in their approaches [3,4]. Offline signature verification is more challenging in comparison to online signature verification because there are no stable dynamic features [5,6]. The non-recurring nature of the signatures' variation, due to sickness, age, geographical location and perhaps the mood state of the person may increase the problem by causing lots of variation within the personality. Also, it is very difficult to segment signature strokes because of elegant and unconventional writing styles. On the other hand, the pen thickness, embellishments found in strokes, translation, rotation and scaling within the signatures lead to variations in signature images [4,7]. Because the offline verification system depends on only static signature images, these images should be pre-processed well before performing the matching stage. This work aims to find the best set of features and defines a new promising approach in handwritten signature verification systems that extracts signature features using Haar wavelet technique and a set of local ridges features. In addition, evaluate the accuracy of the recognition system using two levels of wavelet decomposition and get more details of localization by dividing each sub-image into overlapping blocks. The system performance will also be investigated. Some related works are shown in the next section. A brief description of main tasks involved in the proposed system is introduced in the section 3. The results of the feature extraction and investigation of the recognition accuracy and the evaluation of the performance of the proposed model are explained in the experiment and results section. The effect of some system parameters is given in the section 5. Finally, the main conclusions and a list of recommendations for future works are presented in the last section.

Related Works
Some of the published works related to signature recognition or verification techniques are given in the following list:  In [8], the authors used wavelet transform average framing entropy and a probabilistic neural network for signature recognition. The obtained recognition rate was 92%.  In [9], the authors depended on fuzzy logic with adaptive resonance theory-1 for signature verification. They calculated Local binary patterns (LBP) and Gray Level Co-occurrence The next subsection will discuss the used methodologies for each step of the proposed signature verification model in details.

3.1
Read Signature Images Experiments are executed on a database that includes a combination of English and Arabic signatures. Some of them were obtained from internet while the others were collected manually. The offline signature database consists of data for 100 persons. Each person has six signature samples. The number of samples would be selected carefully. Although signature recognition is preferable to any other type of biometric, it has the problem of perplexing pattern recognition because of the large differences between various signatures made by the same person. These differences may result from instability, emotions, changes in the environment, etc. [8]. Therefore, the use of a very small number of samples may increase the problem of intra-class variance. On the other hand, the use of a very large number of samples [11] may make the system vulnerable against counterfeiters by increasing the FAR. The total number of images in the database is 600 images. The images are selected so that they have different sizes, background, and written by different colored pens. This selection represents a challenge for the proposed system. Each image is fed to the system as a Bitmap (BMP) image file; the color resolution of the image is 24 bits per pixel (bpp). Red, Green, Blue (RGB) components are loaded. Figure 2 shows samples from the collected database.

3.2
Signature Image Pre-processing Stage The main focus of this stage is to enhance the image for feature extraction stage [9]. Preprocessing step performs the following operations: A. Image Enhancement: the detection of important details in the image is improved by applying the image enhancement, which involved the following steps:  Convert the image to a grayscale image.  A suitable global Threshold is selected to remove the false areas that may form the image background.  Noise elimination using (5×5) mean filter. The scanned image contains spurious pixels (noise) that must be removed to guarantee accuracy in other processing steps [9]. B. Binary Image: to convert the grayscale image to binary image, a global threshold is selected automatically by taking the average of gray level pixels multiplied with α. The value of α must be selected depending on the brightness of the image. Then, the value of each pixel belonging to the gray image is compared with the threshold value to decide whether each component belongs to the foreground or background [12]. C. ROI Clipping: it determines which part of the image is rich in features, keeping the beneficial data in the ROI only and ignore the not useful data in the background [13]. D. Ridge Thinning: thinning the ridges to a single pixel width, making the process of feature extraction more efficient [9].

3.3
Haar Wavelet Transform Wavelet transform is considered a powerful tool for extraction of the local features of the image [14]. The HWT is characterized by speed, memory efficiency, ease of execution, as well as efficiency in pattern extraction compared to other wavelets [15,16]. It appears the image in a form of a sum of wavelets at different degrees of resolution. It splits the image into four sub-sample images and analyzes each sub-sample image precisely according to its size. Four sub-images are obtained after the decomposition of the image. The first sub-image, denoted by LL, represents low frequency vectors, while the second and third sub-images, denoted by HL and LH represent high frequency vectors in horizontal and vertical direction, respectively. The last sub-image, denoted by HH represents diagonal high frequency vectors [17]. In this research, two-levels of Haar decomposition were performed as shown in Figure  3.

3.4
Image Segmentation In the image segmentation stage, each wavelet sub-image is divided into blocks. These blocks contain specific regions of overlap. The importance of using overlap is to exclude the effect of shift. The overlap's length equals to a predefined ratio of the block's length. The ratio of the image's length to the number of blocks represents the block's length. For unequal image's width and height, it is important to pad the shortest one with rows or columns of zero values in the block's length calculation process. After partitioning, a set of local features is extracted from each block for feature vector extraction.

Feature Vector Extraction
The success of any recognition system depends heavily on the best selection of feature vectors. A collection of features is obtained at this stage. As a first step, the signature features from each block of the image are computed. At the end, we get a 2D array of values for each feature of the entire image. Generally, this process includes two essential steps: the extraction of local ridge features and the extraction of wavelets energies. The feature vector is obtained by the following main steps:  Get wavelet features For each sub-sample image, including HH, HL, LH, HH2, HL2 and LH2 that are obtained through the first and the second HWT pass as shown in Figure 3: A. Break the sub-sample image down into blocks with a specific overlapping ratio. B. Calculate the energy of wavelets in each block using Eq. (1) [18]: y1) is the start point for each block, (x2, y2) is the endpoint for each block and wavelet (x, y) is the wavelet sub-bands.  Get local features A. Divide the sub-sample image LL2 into overlapping blocks. B. For each block, extract a collection of selected local features. Table-1 shows a list of these features. Invariant moments are a type of statistical measures utilized to get relevant information about a particular object under study for example to describe the object's shape that will be recognized by a pattern recognizer. These measures are designed to be static after applying certain transformations, like the object rotation, shifting, and scaling to increase a pattern recognition system's reliability. The Hu invariant group is an example of Invariant moments [19,20]. Seven invariant moments analysis produced by Hu is applied on each 2D array of feature values acquired during the previous step to obtain a constant feature vector against rotation, shifting and scale.

Training Rule and Features Analysis
For classifier training and addressing the feature list, a training collection of signature samples was utilized. The system's recognition accuracy was then evaluated using this collection. For best recognition performance, it is necessary to extract the list of features that appear little intra-class variability. In this research, a collection of moments descriptors, including 98 descriptors representing the spatial distribution of 14 features were selected because of their stability. At the enrollment stage, the moment vectors were saved in a database table. Then, a statistical analysis, which includes the calculation of the mean for each feature and for each class as well as the calculation of the corresponding standard deviation, was performed on the obtained descriptors as shown in Eq.(2) and Eq.(3) [21,22] : Where are the feature number, sample number and person number respectively. F is feature vector and corresponds to the total number of specimens collected for -Person. The feature analysis step aims to assess the recognition strength of each individual feature alone and make the decision rule that must utilize the best combination of features for performing a dependent matching. The conducted test scenario in this project has passed through the following stages: A.
First, the standard deviation ( ) and mean (µ) values of each adopted feature were computed and for each subject (i.e., person) (see Eq. (2) and Eq. (3)). Then, each feature (F) whose (F-µ) / ≥ 1.8 for all subjects was discarded from the discriminating features list. This decision was because the high values of this deflection criterion indicate the weakness of the considered feature. B. Second, the features included in the reduced list of the features were tested again to keep only the best (N) features whose discrimination capabilities were the highest. In this paper the number (N) of best selected features was set 40. The discrimination ability is determined as the ratio of the number of correct hits achieved when the tested feature is used alone to determine the similarity distance measure. Here in this stage the similarity distance measure was tested (see Eq. (4)).

| | (4)
Where, is the tested feature value, is the corresponding template value for i th person, and is the corresponding standard deviation of the template i th person. C.
From the forty selected features, the best couples of features that give the highest recognition rate were selected using Eq. (5).
Where ́ ́ are the first and second selected features that led to best highest recognition result. D. At last, a set of test rounds was conducted and in each round an additional pair of features was added to the similarity distance measure; the added features were those can lead to better recognition rate.

3.7
Matching and Verification Stage The matching task includes executing a minimum distance classifier (MDC), which assigns the tested sample to the closest class in terms of predefined similarity (distance) measure. MDC computes the (Euclidean) distance between the feature vector of the tested sample and the average vector for each class. It selects the smallest distance to make a decision. For any tested signature, all steps in the preprocessing stage and descriptors vector extraction stage were performed at the beginning. For each feature, the absolute difference (AD) between the value of test signature and the average vector ( ) divided by the standard deviation for each person is calculated using Eq. (6). The absolute difference of the best chosen 7 features (ADT) is combined using Eq. (7). So, the matching of the tested signature with the best corresponding one in the database is achieved via choosing the lowest ADT value: ∑ | | (6) ∑ (7) Where represents the feature number and the person's number, respectively. In signature verification systems, the matching performance is measured by the two error measures FRR and FAR. FRR (i.e., True Negative Rate (TNR)) is the rejection rate of the system to valid users. FAR (i.e., False Positive Rate (FPR)) is the acceptance rate of the system to interlopers and considering them as authorized users. By plotting the True Positive Rate (TPR), TNR, FPR, and False Negative Rate (FNR) versus threshold value, the intersection point of the four curves represents the optimal threshold value where the values of the two kinds of errors (TNR, FPR) are equal. This threshold value can be changed depending on the security score. For verification, the system asks the user to enter the user ID (P). Then the comparison is performed between the input signature image and its template only. The search in the database is performed depending on the user ID.

Results and Discussion
In the way of investigating the recognition performance of the proposed system, the following results were observed. From the 98 features obtained from the moments analysis step, a subset consisting of the best forty features in the test of the recognition ability of each feature alone has been selected first. The recognition capabilities of these features are shown in Table-2) where the recognition rate represents the percentage ratio between the number of correct recognition decisions

Abdul-Haleem
Iraqi Journal of Science, 2022, Vol. 63, No. 2, pp: 855-865 862 (count) and the total number of trying tests (600). Then, a group of 7 features was chosen from 98 features. The final rate of system recognition is 100%. Table-3 presents this result. During the addition process, one feature was frequent twice. The features details are displayed in Table-4.    Figure 4 shows that the value of the similarity distance threshold depends on the four verification rates. The point of intersection of the pair (FRR and FAR) and the pair (TPR and FNR) represents the optimal value for threshold. The FRR is 0.025 (2.5%) and FAR is 0.0302 (≈ 3%) at the allocated threshold value, while the value of TPR is 0.975 (97.5%) and FNR is 0.9697 (≈ 97%). Taking into consideration, the similarity threshold value can be changed according to the nature of verification needs and on the desired degree of security.

The Effected System Parameters
For the established offline handwriting signature recognition system, the two parameters (number of blocks and overlapping ratio) have a great effect on the desired recognition rate. Table-5 shows the recognition rates when various values of the number of blocks and the ratio of overlap were adopted. The best desired recognition rate (i.e., 100%) was achieved when the ratio of overlap was taken (0.7) and the number of blocks is set (4).

Comparison with other works
To prove the robustness of the proposed system, a comparison with some other methods or selected features is shown in table-6. The used methods in [3,4,5] were explained in related works section. In [9], the authors used Deep Multitask Metric Learning as a classifier and Histogram of Oriented Gradients (HOG) in combination with Discrete Radon Transform as features. The table showed that the proposed method gave better results than the other methods.

Conclusions
In this paper, we use Haar Wavelet Transform and overlapping partitions algorithms and the signatures are matched using the Euclidean distance. During the feature extraction phase, a group of local ridge features in association with features obtained by applying two-levels of HWT are used and examined. The results show that the optimal recognition rate is obtained by taking the combination of local ridge features and wavelets' features together to gain the optimum rate of recognition. These results also show that the segmentation into overlapping blocks has enhanced the accuracy of recognition. The different values of block lengths and overlapping ratios, highly affected on the recognition rate. For future work, more levels of decomposition can reduce the number of features selected for matching with no need for the other type of features (local ridge features). The FAR and FRR may be reduced when another matching technique is used.