Keywords

1 Introduction

Biometrics is a hot topic of research in recent years. It involves fingerprints, palm veins, iris, face, and voice. Signature recognition can be divided into online and offline categories. On-line signature requires a specially crafted tablet for signatures, it extracts the dynamic characteristics of the signature, such as speed, acceleration, pressure and direction of movement, etc., use dynamic programming [1] for training. Offline signatures use a scanner to obtain electronic images, first graying, binarization, refinement and other preprocessing operations [2], extract the location, shape, stroke and other characteristics of the signature, then classify training through neural network and SVM. For off-line signatures, it is difficult to obtain the dynamic characteristics of the signature, for example, the pressure of the signer’s writing, the sequence of strokes, the angle of holding the pen, and the personality of the author’s signature. Therefore, offline signature recognition technology is difficult and the recognition rate is not high.

Ismail et al. proposed a new offline signature recognition method based on multi-scale Fourier descriptors and wavelet transform, which has a better recognition rate [3]. Bernardete Ribeiro et al. proposed a deep learning model that can extract off-line handwritten signature recognition from advanced representations and improved the error classification rate in the famous GPDS database [4]. Zhang et al. proposed an offline signature recognition method based on multiple features [5]. Przemysław Kudłacik et al. proposed a new fuzzy method for off-line handwritten signature recognition, which is based on feature extraction [6].

2 Introduction of Hidden Markov

The Hidden Markov Model [7] is a parametric model used to describe the statistical characteristics of stochastic processes. Hidden Markov process is a dual random process: one potential process is called “state” process, and the other observable process is called “observation sequence”. Observed sequence is determined by implicit state process.

The HMM can be expressed in the form of a parameter of λ = (A, B, π). The observation sequence is described by the most common mixed Gaussian probability density function [8]:

$$ b_{j} \left( o \right) = \sum\limits_{m = 1}^{M} {C_{jm} b_{jm} \left( o \right)} $$
(1)

Where M represents the number of mixtures of mixed Gaussian probability density functions, the mixing coefficient satisfies:

$$ \sum\limits_{m = 1}^{M} {C_{jm} = 1} $$
(2)

Bj(o) is a single Gaussian probability density function for the mth component of the jth state.

2.1 Determination of the Best State Chain

Payment one piece Observation hierarchy O = O1O2… OT Waki one piece HMM number of participants λ, how to choose a piece maximum condition Q = q1q2 … qt coming visit observation ranking O, ordinary adaptive calculation method viterbi algorithm. Definition:

$$ \delta_{t} \left( i \right) = \mathop {\hbox{max} }\limits_{{q_{1} q_{2} \ldots q_{t - 1} }} p\left( {q_{1} q_{2} \ldots q_{t} = i,o_{1} o_{2} \ldots o_{t} \, |\,\lambda } \right) $$
(3)

Step 1: Initialization

$$ \delta_{1} \left( {\text{i}} \right) = \pi_{i} \cdot b_{i} \left( {o_{1} } \right)\,\,\,\,\,1 \le i \le N $$
(4)
$$ \Psi \left( {\text{i}} \right) = 0 $$
(5)

Step 2: guessing

$$ \delta_{t} (j) = \mathop {\hbox{max} }\limits_{i} \left[ {\delta_{t - 1} (i)a_{ij} } \right]b_{j} \left( {o_{t} } \right)\,\,\,2 \le t \le T,1 \le i \le N $$
(6)
$$ \Psi _{t} \left( j \right) = \mathop {\arg \hbox{max} }\limits_{1 \le i \le N} \left[ {\delta_{t - 1} \left( i \right)a_{ij} } \right]\,\,\,\,2 \le t \le T,1 \le i \le N $$
(7)

Step 3: bundle

$$ p^{*} = \mathop {\hbox{max} }\limits_{1 \le i \le N} \left[ {\delta_{T} (i)} \right] $$
(8)
$$ q_{t}^{*} = \mathop {\arg \hbox{max} }\limits_{{1 \le {\text{i}} \le N}} \left[ {\mathop {\delta (i)}\nolimits_{t} } \right] $$
(9)

Step 4: Road diameter retrograde (Best condition definite)

$$ q_{t}^{*} =\Psi _{t + 1} \left( {q_{t + 1}^{ *} } \right) $$
(10)

The viterbi algorithm can not only determine an optimal state chain for the observation sequence O, but also obtain the probability P(O|λ) of the O of the observation sequence at the same time.

2.2 HMM Parameter Estimation

The optimization problem of HMM parameters, that is, how to adjust the model parameter λ = (A, B, π), maximizes P(O|λ). In fact, given any finite-length observation sequence as a training number, it is impossible to obtain an optimal parameter estimate. In general, use the EM algorithm to obtain a local optimal solution.

EM algorithm flow

Step 1: Initialize the distribution parameters

Step 2: Step E: Calculate the posterior probability of the implicit variable based on the initial value of the parameter or the model parameters of the previous iteration, which is actually the expectation of the hidden variable. Current estimate as a hidden variable:

$$ \theta_{\text{i}} \left( {z^{i} } \right) = p\left( {z^{\left( i \right)} x^{i} ;\,\theta } \right) $$
(11)

M-step: Maximize the likelihood function to obtain a new parameter value:

$$ \theta = \mathop {\text{argmax}}\limits_{i} \sum\limits_{i} {\sum\limits_{i} {Q_{i} \left( {z^{i} } \right)\log \frac{{p\left( {x^{i} ,z^{i} ;\,\theta } \right)}}{{Q_{i} \left( {z^{i} } \right)}}} } $$
(12)

Through continuous iteration, the parameter θ that maximizes the likelihood function L(θ) can be obtained.

3 Data Acquisition and Preprocessing

The Uyghur handwritten signature [9] database used in this paper includes 100 individuals (20 individuals per year) with a difference in age and a total of 2000 signature samples. These sample signatures are scanned using a scanner (with a scanning accuracy of 300 dpi), then stored on a computer in the BMP (256-bit bitmap) format and the specified serial number, and collected into a signature image library. The main purpose of preprocessing is to provide the feature extraction stage with valid information contained in the sample image, removing invalid information and noise interference. Therefore, preprocessing the signature image is necessary. The preprocess of the signature image is shown in the Fig. 1.

Fig. 1.
figure 1

Pretreatment process

4 Feature Extraction Based on Discrete Cosine Transform

The DCT for Discrete Cosine Transform [10] is a transform associated with the Fourier transform that is similar to the DFT for Discrete Fourier Transform but uses only real numbers. The discrete cosine transform is equivalent to a discrete Fourier transform that is approximately twice its length. This discrete Fourier transform is performed on a real-even function (because the Fourier transform of a real-even function is still a real-even function. In some variants, it is necessary to shift the input or output position by half a unit (DCT has 8 standard types, of which 4 are common). Discrete cosine transforms are often used by signals and image processing to perform lossy data compression on signals and images (including still and moving images). This is due to the fact that the discrete cosine transform has a strong “energy concentration” characteristic. Most of the natural signal (including sound and image) energy is concentrated in the third-order part of the discrete cosine transform, and when the signal has a close Markov process In the statistical feature of (Markov processes), the decorrelation of the discrete cosine transform is close to the KL transform.

For a M × N digital image f(x, y), the two-dimensional discrete cosine transform formula is as follows:

$$ F({\text{u}},v) = c(u)c(v)\sum\limits_{x = 0}^{M - 1} {\sum\limits_{y = 0}^{N - 1} {F({\text{x}},f)\cos \frac{(2x + 1)u\pi }{2M}} } \cos \frac{{(2y{ + }1)v\pi }}{2N} $$
(13)

Among them, u = 0, 1, 2, …, M−1; v = 0, 1, 2 …, N−1. The corresponding two-dimensional discrete cosine inverse transform (IDCT) formula is as follows:

$$ f(x,y) = \sum\limits_{u = 0}^{M - 1} {\sum\limits_{v = 0}^{N - 1} {c(u)c(v)F(c,v)\cos \frac{(2x + 1)u\pi }{2M}} } \cos \frac{{(2y{ + }1)v\pi }}{2N} $$
(14)

Among them, x = 0, 1, 2, …, M−1; y = 0, 1, 2, …, N−1. F(u, v) in the above two formulas is called DCT coefficient.

5 Hidden Markov Model Training

The training of Hidden Markov Models [11] is to determine a set of optimized HMM parameters for each person. Each model can be trained with single or multiple blessing images. The training flowchart [12] is shown in the figure below. The calculation is performed as follows:

  1. (1)

    Sampling the signature image and calculating the singular value of each sampling window matrix, using the singular value vector as the observation sequence.

  2. (2)

    A general HMM model λ = (A, B, π) is established to determine the number of states of the model, allowable state transitions, and the size of the observation sequence vector.

  3. (3)

    The training data is evenly divided, corresponding to N states, and the initial parameters of the model are calculated. An initial distribution can be given, for example:

$$ \Pi _{0} = \left[ {\begin{array}{*{20}l} 1 \hfill & 0 \hfill & 0 \hfill & 0 \hfill & 0 \hfill \\ \end{array} } \right] $$
(15)

Since the time length of the observation sequence in our experiment is T = 108. The initial value of the observation probability matrix B can be calculated according to the following formula:

$$ {\text{b}}_{j} \left( {o_{j} } \right) = \frac{1}{{\sqrt {\left( {2\pi } \right)^{n} \left| {\sum_{j}^{l} } \right|} }}EXP\left\{ { - \frac{1}{2}\left( {o_{i} - u_{j} } \right)^{T} \sum\nolimits_{J}^{ - 1} {\left( {o_{i} - u_{i} } \right)} } \right\} $$
(16)

Where Tj is the length of the sequence corresponding to each state after even division.

  1. (4)

    Replace the uniform segmentation with viterbi segmentation and re-initialize the parameters.

  2. (5)

    Baum-Welch algorithm is used to re-evaluate parameters. Iteratively adjust model parameters to maximize

The HMM parameter [13] of this process is used to represent the signature in the database. See the following figure for the flowchart of HMM training. The flowchart of HMM training is indicated as the following Fig. 2.

Fig. 2.
figure 2

The flowchart of HMM training

6 Experimental Results and Analysis

There are three contents in this experiment. The first experiment is to use 1000 Uyghur signature images to identify. The second experiment is to use 1000 English signature images to identify. The third is to increase Uyghur database is a total of 2000 signatures. The signature images are identified and the experimental results are as follows:

As can be seen from Table 1, the experiment uses a hidden Markov model to extract the DCT features of the Uygur [14] handwritten signature image. When the number of states of the model hidden Markov model is changed, different recognition rates can be obtained. When N = 5, the highest recognition rate is 99.5%. As the number of states decreases, the recognition rate gradually decreases.

Table 1. 1000 Uygur handwritten signature image recognition

As can be seen from Table 2, the experiment uses a hidden Markov model to extract the DCT features of the Uygur [15] handwritten signature image. When the number of states of the model hidden Markov model is changed, different recognition rates can be obtained. When N = 5, the highest recognition rate is 99.5%. As the number of states decreases, the recognition rate gradually decreases (Table 3).

Table 2. 1000 English handwritten signature image recognition
Table 3. 2000 Uygur handwritten signature image recognition

It can be seen from the above that when the number of Uyghur test and training samples is changed, the recognition rate is different [16]. When the training set and the test set respectively select 1000 signature samples, the highest recognition rate is 87.7%.

7 Conclusion and Future Work

Through the above three experiments, it can be found that for Uighur and English, when the number of states gradually increases, the recognition rate gradually becomes higher. When N = 5, the highest recognition rate is 99.5% and 97.5%. This method has an effect on Uyghur. Better recognition effect. By increasing the Uighur database, the recognition rate decreases. When the training set and the test set respectively select 1000 samples, the highest recognition rate is 87.7%.

In future work, on the basis of this article, we will increase the number of signature types and the number of signature databases, find more features suitable for Hidden Markov extraction, and change the parameters to perform more experiments.