{'fraction_non_alphanumeric': 0.023877967359050446, 'fraction_numerical': 0.01015393175074184, 'mean_word_length': 4.901231190150479, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Fingerprint Recognition Using Local Features and Hu Moments

Person identification systems based on fingerprint patterns called Automatic Fingerprint Identification Systems, AFIS, are some of the most widely used biometric methods since they provide a high degree of success. The accuracy of AFIS is mainly due to some unique characteristics called minutiae, which are points where a curve track finishes, intersects with another curve track, or branches off. During past decades several efficient minutia-based fingerprint recognition algorithms have been proposed which achieve false recognition rates close to 1%, however, their recognition rate may be still improved. To this end, this paper presents a fingerprint recognition method using a combination of the Fast Fourier Transform (FFT) with Gabor filters for image enhancement. Next, fingerprint recognition is carried out using a novel recognition stage based on Local Features and Hu invariant moments for verification.


Introduction
Biometry or biometrics is a set of technologies that uses some human body characteristics such as fingerprints, eye retina, iris, voice and face patterns as well as hand measurements, or human behaviors such as the signature and gait for person recognition purposes. Biometric systems can be divided into person identification and identity verification. In the first case, the task consists in determining the identity of a most likely person among a given set, while the verification task consists in determining if a given person is who he or she claims to be.
Traditionally, passwords, which are knowledge-based security items, and ID cards, which are token-based security items, have been used for access control to restricted systems and information [1];however, the security can be easily broken, for example, when a password is divulged to an unauthorized user or an imposter steals an ID card.
A fingerprint consists of ridges, which are lines across the fingerprints, and valleys, that are spaces between ridges. Additionally, the configuration of the fingerprint ridge, which are fully formed at about the seven month of fetal development, do not change throughout a person's life, except in the cases of accidents such as bruises and cuts on the fingertips [2], [3]. There are mainly two approaches used for fingerprint recognition: The methods using local features and the methods based on global features [4]. The first approach analyzes the ridge bifurcations and endings called minutia; while for the second method a more macroscopic approach is used which considers the flow of ridges in terms, for example, of arches, loops and whorls. This paper proposes a fingerprint recognition system based on local features in which firstly the fingerprint is captured using an optical surface device. Next, an image enhancement algorithm based on Gabor and Fourier transforms is applied to improve the image quality, together with a thinning algorithm, before minutia extraction. This fact is important because the probability of finding false minutia directly depends on the fingerprint image quality. Then the minutiae are extracted using the enhanced and thinned fingerprint image. Finally, the fingerprint recognition is performed using the minutiae and the Hu invariant moments. Evaluation results show that the proposed algorithm provides recognition rates larger than 97% with a false recognition rate of about 0.8% when the verification stage is used.

Proposed system
The proposed fingerprint recognition system consists mainly of four stages: The acquisition stage, in which the fingerprint image is captured using an optical scanner device. The preprocessing stage, in which the captured image is firstly cropped to reduce the regions with little useful information, next the resulting image is enhanced using a combination of the Fast Fourier Transform with Gabor filters; finally a thinning algorithm is used to improve the feature extraction process. Subsequently, the feature extraction stage carries out the minutiae detection that is used to build the feature matrix [5]. Finally, the recognition stage uses the minutiae and the Hu invariant moments to make the final decision. The following sections provide a detailed description of each stage.

Acquisition stage
The fingerprint acquisition is done using an UareU 4000 Digital Persona Inc. optical scanner device with a USB 2.0 interface which captures the fingerprint image with a resolution of 512 dpi and a 340 x 340 pixel grayscale size. size of 340x340 pixels in a gray scale, a database with 1000 fingerprint images was created corresponding to 125 different people, that is, 8 images of each person. Among them, 200 fingerprint images were obtained with the abovementioned optical scanner and the remaining 800 images were obtained from fingerprint database FVC2002 [6], all images with 8 bit-resolution. The databases used were DB1, DB2, DB3 and DB4, with sizes of 388 x 374 pixels, 560 x 260 pixels, 300 x 300 pixels and 288 x 384 pixels, respectively. These images were converted to 340 x 340 pixels to be then processed. Figure 1 shows the optical reader and some images used for this work.

Enhancement
The performance of minutiae extraction algorithms and other fingerprint recognition techniques relies heavily on the quality of the input fingerprint images. In an ideal fingerprint image, ridges and valleys alternate and flow in a locally constant direction. In such situations, the ridges can be easily detected and the minutiae can be accurately located in the image.
However, in practice, c) Fingerprint images obtained from the FVC2002 database because of skin conditions (e.g., wet or dry, cuts, and bruises), sensor noise, incorrect finger pressure, and inherently low-quality fingers (e.g., elderly people, manual workers), among others, a significant amount of fingerprints are poor quality images.
Thus the goal of an enhancement algorithm is to improve the clarity of the ridge structures in the recoverable regions and classify the unrecoverable regions as too hazy for further processing. Most existing techniques are based on the use of contextual filters whose parameters depend on the local ridge frequency and orientation. The context information includes ridge continuity and regularity. Because of the regularity and continuity properties of the fingerprint images, the occluded and corrupted regions can be recovered using the contextual information from the surrounding neighborhood. Hong et al. [7] labeled such regions as 'recoverable' regions. The efficiency of an automated enhancement algorithm depends on the extent to which they utilize contextual information. The filters themselves may be defined in the spatial or in the frequency domain. In this work, a combination of two filters, one in the spatial and another in the frequency domain, is used for image enhancement. Spatial Domain Filtering: Knutsson et al. [8] proposed the use of contextual filters for fingerprint image enhancement for the first time. They use an anisotropic smoothening kernel whose major axis is oriented parallel to the ridges. For efficiency, they recomputed the filter in 16 directions. The filter increases contrast in a direction perpendicular to the ridges while performing smoothening in the direction of the ridges.
Gabor filters have important signal properties such as optimal joint space frequency resolution [8]. Gabor elementary functions form a very intuitive representation of fingerprint images since they capture the periodic, yet nonstationary nature of the fingerprint regions. The even symmetric Gabor, used for image enhancements is obtained by Equation 1.
where f denotes the ridge frequency, and the choice of 2 x  and 2 y  determines the shape of the filter envelope as well as a tradeoff between enhancement and spurious artifacts. This is by far the most popular approach used for fingerprint enhancement.
Fourier Domain Filtering: Sherlock and Monro [9] performed contextual filtering completely in the frequency domain, where each image is convolved with a precomputed filter whose size is equal to the image size. However, the algorithm assumes that the ridge frequency is constant throughout the image in order to prevent having a large number of precomputed filters; therefore, the algorithm does not use the full contextual information provided by the fingerprint image. Watson et al. [10] proposed another approach for performing image enhancement completely in the frequency domain, which is based on the 'root filtering' technique. In this approach, the image is divided into overlapping blocks; in each block the enhanced image is obtained using Equations 1 and 2.
where k in Equation (2) is an experimentally determined constant, which we choose to be equal to 0.45. Here, while a higher k improves the appearance of the ridges, filling up small holes in ridges, a too large value of k may result in false joining of ridges such that a termination might become a bifurcation. Another advantage of this approach is that it does not require the computation of intrinsic images for its operation, which has the effect of increasing the dominant spectral components while attenuating the weak ones. However, in order to preserve the phase, the enhancement also retains the original spectrum F(u, v). Thus, both approaches present desirable features that can be combined to obtain better results [5]. Because both enhancement methods described before produce (8-bit) grayscale images, a binarization process is needed for the next processing stage. After the binarization process, the image is made up only of 1 and 0, where 1 means a white pixel and 0 a black pixel. Then, a logic "AND" operation is performed with the binarized image obtained from Fourier and Gabor filtered images such that the resulting pixel will be black if in any of the two images a given pixel is black, and it will be white if of those pixels in both images are white.

Thinning
Before the minutiae extraction stage, a thinning process is applied. In order to better understand the algorithm, it is necessary to know some definitions. A pixel 0 (x,y) is internal if its four neighbors, (x+1,y), (x-1,y), (x,y+1) and (x,y-1), are 0 (black pixel). The limit is defined using its 8 connections. There is a limit pixel if it is not an internal pixel and only one of its eight neighbors is equal to 1. A given pixel is a connection pixel if, when it is eliminated in a 3 x 3 matrix, its neighbors are disconnected. Basically, the algorithm consists in finding the internal pixels in our image, eliminating later the pixel limit. This process is carried out until it is not possible to find more internal pixels; it will be explained in more detail further below. The first step of this algorithm consists in finding the total internal pixels existing in our image such that all limit pixels can be eliminated, taking care that any of eliminated pixels be a connection pixel. This algorithm is repeated until it is not possible to find more internal pixels. After thinning the image and not finding more internal pixels, the algorithm is applied again, but on this occasion with a small change. This change consists in finding internal pixels with only 3 neighbor pixels and later eliminating the limit pixels. The elimination of internal pixels is possible when the elimination of some limit pixels is not possible but an internal pixel exists [11]. The last step is the repetition of the algorithm, but on this occasion finding internal pixels with only two neighbors.

Minutiae detection
After the thinning process, the image is ready hence the minutiae detection algorithm is applied. The algorithm consists in calculating the number of pixels that cross a center pixel (Cp) using Equation 4.
where P1 to P8 is an ordered sequence of pixels that define the block of 8 neighbors of the center pixel. P 1 P 2 P 3 P 8 Pc P 4 P 7 P 6 P 5 a) b) c) d) Figure 2. a) 3x3 pixel window. b) Block without minutiae. c) Block with bifurcation. d) Block with ending. Figure 2a shows the window used to locate bifurcations and endings. Figures 2b, 2c and 2d are the possible configurations that can be found. A Cp=7 means that there is a window with ending, a Cp=6 means that no bifurcation or ending exist, and a Cp5 means that there is a bifurcation. This process is carried out in the complete binary image applying the 3x3 windows. The result is a vector with the characteristic points that will be used later in the recognition or verification process. and Minutiae located with Gabor filters and Minutiae located with FFT  Figure 3 shows that the combination of Gabor and Fast Fourier Transform-based filters allows the detection of a larger amount of minutiae because both filtering approaches provide different minutiae sets. This is the reason for using a combination of both enhancement stages, avoiding the elimination of some minutiae during the enhancement process. For this work, the tests were performed using bifurcations/terminations, and only bifurcations. The results obtained were greater with bifurcations than using both (bifurcations and terminations).

Recognition Stage
The recognition was done using eleven important characteristics: distance, angle and two coordinates together with the seven invariant moments that are used to improve the recognition performance. Thus the feature matrix consists of eleven variables: the distance between the actual and the next minutiae, the angle that forms with respect to the y-axis, the two coordinates of the minutiae under analysis and the seven invariant moments. In order for all the minutiae to be evaluated, a sweep of the complete image from the top to the bottom is performed. Firstly, the values from the first minutiae are calculated against the rest; next, the second against the rest, and so on. Therefore, the stored fingerprint information consists of a matrix of size 11 x N, where N is the maximum number of minutiae located. In this paper, the feature matrices from 500 people for the recognition stage are stored.
The recognition is made as follows: Firstly, the feature matrix of input image of 11 x N size is estimated which is then compared with the feature matrix of each image included in the database. To carry out this process, the feature vectors with different values of distances and angles are discarded.
Next, those stored vectors whose coordinates have a large variation with respect to those of the fingerprint under analysis are discarded. After several tests, it was found that the coordinates could vary 10 pixels in any direction. The recognition is only considered true when the input image coincides in more than 15 feature vectors with some of the stored image in our database. Figure 4 shows the first recognition process.
Here the input image is transformed into an 11 x N-size matrix, which is later compared with each one of the stored feature matrices. If a stored matrix coincides with the input matrix in more than 15 vectors, then the input image is considered recognized. The recognition method described above provides high recognition rates; however, in more than one stored fingerprint image, 15 or more feature vectors may coincide with those of the input image. Therefore, in some tests, the evaluation result shows that more than one stored image matches the input one; thus, the average false acceptance increases. To avoid this problem, a second test was introduced that consists of verifying the resulting images.  In [12], a similar approach is presented using statistical parameters in which the verification process is carried out in the complete thinned image, resulting in a slow and computationally expensive verification stage. Thus a faster and computationally more efficient verification stage is required. The captured images of the same person do not always present exactly the same characteristics because there will always be a small rotation and / or translation.
For this reason, it is necessary to obtain fingerprint patterns invariant to translation and rotation, which can be estimated using the Hu invariant moments under translation and rotation on each minutia [13].
The first step in the verification stage is overlapping the input image with each of the storage images that the system has obtained as possible results. This overlap is made for each minutia such that we can assure that most of the minutiae of two different fingerprints of the same person are also overlapped, while if the fingerprints belong to different people, most of the minutiae will not be overlapped. After overlapping the two fingerprints, we can obtain the 7 invariant moments on each minutia processing a 20 x 20 pixel window with the minutiae as the focal point. The overlap is done to have the same image on the selected windows because the obtained moments are based on the coordinates of the stored images; moreover, most of the stored images contain more minutiae than the test images, and thus, more information can be obtained. Therefore, if we do not move the input image, the obtained moments will change drastically. We can see that when the input image is not overlapped, its moments change considerably. However, when the input image is overlapped, the moments obtained are very similar. In Figure 5, some others examples are shown. Figure 6 shows the invariant moments of minutiae that do not belong to the same person. Finally, the fingerprint will be authenticated if Euclidean distance D between the values of the image stored  and the values of the test image ' do not exceed a given threshold Th, otherwise it is considered that the fingerprint under test does not belong to the same person, where distance D is given by Equation 5.

Evaluation Results
The tests consisted of the recognition of 125 people. Each person completed four tests; the results were the following. Table 1 shows the recognition results obtained using FFT, Gabor filters and FFT-Gabor filters. Let us remember that the combination process FFT-Gabor consists of the minutiae detected using a logical "AND" operation. True recognition means that the person was effectively recognized, the rest is divided into false recognition and without recognition. False recognition occurs when a person is confused, and without recognition takes place when the system does not deliver any possible identified person. In the previous results, the acceptance threshold was 15, that is, we need a minimum of 15 equal feature vectors to consider that the input fingerprint image corresponds to one of the stored images. Later, we made some modifications to the threshold. Table 2 shows the results using different acceptance thresholds (10, 15 and 20 A comparison of enhancement methods is shown in [14]. We can see that our proposed method (FFT-Gabor) has a better performance than the one mentioned in [14].
Therefore, our algorithm retains a greater amount of minutiae. Table 4 shows the average error percentages with two databases.
The comparison in terms of the receiving operating curve (ROC) is shown in Figure 7. A ROC is a plot of the genuine acceptance rate (GAR=1-FRR) against FAR. Four methods were selected and carried out on the FVC2002 database for comparison: T. Amornraksa [15], L. F. Sha [16], A. T. B. Jin [17], J. C. Yang [18] and our method with verification stage.

Conclusions
This paper proposed a fingerprint recognition algorithm based on minutiae and Hu invariant moments in which the captured image is firstly processed using Fourier-and Gabor-based fingerprint enhancement methods. One of the best algorithms for fingerprint enhancing is the Gabor filter whose main characteristic is that it has an optimal joint directional and frequency resolution; however, it does not handle high curvature regions well because of the block-wise approach used.
Angular and radial bandwidths are constant. The reason for using a second-image enhancement method is to eliminate the problem of handling high curvature regions since the enhancement by means of FFT is robust even near regions of high curvature, but it is marked by large storage requirements. Here the ridge frequencies are assumed to be constant. Once the fingerprint is enhanced and processed, a fingerprint recognition algorithm based on minutiae was developed obtaining fairly good results. However, sometimes, the input image was similar to two or more stored images, giving as a result more than one recognized pattern. Because of that, an additional verification process was required, after the recognition process to obtain a single output of the fingerprint recognition algorithm. It is very difficult to obtain a fingerprint with the same position twice using a scanner because there will always be a rotation and/or translation movement involved. For this reason, a recognition algorithm that supports changes in rotation and translation based on the Hu invariant moments is proposed in this paper.
Evaluation results show that a high recognition rate is obtained for applications of regular database size. The proposed system presents a high recognition rate and a false acceptation rate of about 0.8%. The false rejection is not a problem since the user will only have to apply his/her fingerprint again. A possible solution to reduce the false rejection rate is to increase the database of stored fingerprints. Another comparison with different recognition methods is shown in [19]. From the experimental results, we can see that the proposed algorithm improves the recognition rate.