{'fraction_non_alphanumeric': 0.022818455366098295, 'fraction_numerical': 0.005704613841524574, 'mean_word_length': 5.190531625921614, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Fingerprint Image Enhancement Algorithm Based on Stretching Transfer Function

In this paper, a fingerprint image enhancement algorithm based on the stretching transfer function is proposed. The Otsu method is used to generate the threshold, which divides the fingerprint image grayscale roughly into two parts. The width of grayscale distribution can be controlled by adjusting the parameter of the stretching transfer function. The contrast of the input fingerprint image will be enhanced by the function, highlight image layers and make the ridge and valley lines clearer. The function could also retain the fingerprint image information in transformation process, thus lays a solid foundation for the accuracy and reliability of the fingerprint characteristic value extraction in the next step. The treatment effect of the algorithm is obviously better than that of histogram equalization algorithm; the superiority also lies in the smaller amount of calculation and the faster processing speed which effectively avoids manual intervention. It can be used for the occasion with limited computing resources and high real-time requirements. Besides, the ability to control the contrast of output image by only changing a single parameter provides users with regulations and choices in biometric.


Introduction
As an important characteristic of the human body, fingerprint has its uniqueness and invariance for life, and has become one of the most important ways in the biometrics field. Fingerprint is widely applied in many fields such as social security, office security, information security, financial security and family security, and personal security. It is regarded as the primary physical evidence of the identity recognition. Fingerprint identification technology is a kind of biometrics technology, as the earliest technology used and the most mature one in biometrics. It involves the sensor technology, digital image processing, pattern matching, and many other disciplines. In recent years, the study has made great development on the electronic integrated manufacturing technology and fingerprint recognition algorithm. The fingerprint identification technology is a kind of biological recognition technology with an optimistic application prospect. Many institutions are doing related studies at home and abroad. At the same time, a variety of commercial automatic fingerprint identification systems are traded in the market and these products have declared their excellent performance. However, due to technology confidentiality, the limitation of the existing algorithm and the pursuit of the perfect practicability of products make the study of fingerprint identification algorithm be still one of the focuses of the current research at home and abroad. In 1963, the United States began the first software development. In 1975, it successfully launched the first commercial system printmaker 250 [1]. Japan set out their studies in 1975, and The NECAFIS was then put into practice in 1982 [2]. In 1980s, China began studying fingerprint identification [3]. In fingerprint acquisition process, it is inevitable to introduce all kinds of noise, such as the fork and breakpoints of the image. The noise has a certain influence on the extraction of fingerprint feature information, which may even produce many false feature points.  Figure 1 The fingerprint identification process Therefore, before the extraction of the fingerprint feature, it is necessary to filter the fingerprint image, to remove useless information, and to enhance the useful information. After getting the enhanced grayscale, a further binarization and facilitation of the subsequent process processing are requested as well. The purpose for fingerprint image pre-processing is to remove noise in fingerprint image, which makes the fingerprint image clear with clear edge, in order to improve the accuracy of feature points for the extraction and storage including the fingerprint area detection, image quality judgment, directional diagram and frequency estimation, image enhancement, fingerprint image binarization and refining [9].
Fingerprint image acquisition can collect living fingerprint image through specialized fingerprint collection device. At present, the fingerprint collection device mainly includes living optical fingerprint acquisition instrument type, capacitance type and pressure type. For technical indicators like the resolution and gathering area, public security industry has already formed the international and domestic standards, but the other lacks unified standards. According to the fingerprint collection area, it can be divided into rolling and plane stamps fingerprint. The former are widely used in public security industry. In addition, it is possible to get fingerprint images through scanners and digital cameras. The fingerprint image has ridges and valleys, which can be completely described by binary image, namely fingerprint image binarization. There are two kinds of methods in the current fingerprint binarization. One is the fixed threshold method, and the other is the dynamic threshold method. Fixed threshold method uses a gray threshold to the whole image, which requires strict standards to the input image as well as the distribution uniform of the whole image grayscale. Therefore, we regard the enhanced image as its input image. Dynamic threshold method is to take different threshold according to different areas and the average value method is commonly used in this circumstance. It has high requirement to the input image exposure. Therefore, we put the image after the directional filtering as the input image.
The refinement of fingerprint image is the process of identifying the fingerprint ridge axis instead of a ridge. Currently, the refining method is an iterative contour stripping method. Each basic image scan is considered as an iteration, which can strip pixels that do not affect the connectivity in the border pixels, until ridge width reaches to 1 pixel. Thus, if the refine grain line width is thicker, the more iterations and the longer the duration, which is not we are expecting. Fingerprint characteristics include center (up, down) and triangle points (left, right). The details of the fingerprint feature points include the beginning and ending points of the ridge, the combined point and bifurcation point. These points will be automatically chosen in order to complete the fingerprint form and detail feature extraction work. The fingerprint comparison refers to the rough match according to the fingerprint lines form, and then uses the fingerprint form and detail characteristics for exact matching, and gives two fingerprints similarity scores. According to different application, the fingerprint similarity score is ranked and given the verdict that whether the fingerprint is the same or not.
Living fingerprint is collected into the system by fingerprint sampling device to form the fingerprint image data. The fingerprint image generally has a lot of useless information and noise interference. Pre-processing attempts to get rid of the information to make the image clearer in order to extract the right fingerprint characteristics and achieve the correct match. In automatic fingerprint identification system, the input fingerprint image undergoes a large number of processing steps, such as image enhancement, filtering de-noising, binarization, refinement and feature extraction finally to obtain the details of the fingerprint. Then the feature set of the fingerprints is matched matched with registered fingerprint feature set and then the recognition result is displayed eventually.

The Fingerprint Image Enhancement
The fingerprint image enhancement is generally done by using a specific algorithm to process the fingerprint image, before pretreatment process. The purpose is to segment the fingerprint foreground and background area without fingerprint. The pretreatment process only deals with foreground area, which not only can greatly reduce the pretreatment time, but also reduce the interference of background pseudo characteristics to the subsequent processing, thus enhancing the whole performance of the system [4].The existing image enhancement techniques can be roughly divided into spatial domain method, three kinds of transform domain method and fuzzy processing method. As for the actual implementation, the fingerprint image enhancement generally applies the following several steps: normalization, direction figure estimation, generating template, and filter. After a fingerprint image is normalized, the mean and variance of the image can be controlled in a given range for the subsequent processing.The purpose of the fingerprint image normalization is to reduce the variance of the grayscale.The general using formula of the normalization process is as shown in following formula [5].
Where, A (i, j) stands for the image after normalizing; I (i, j) stands for the source image; Var and M represent the variance and mean of image I respectively; Var 0 and M 0 represent the presupposed variance and mean respectively. Direction image assessment is to calculate the fingerprint ridges and valleys direction in every small region after the fingerprint image classification [7] In the foreground region of the fingerprint image along the direction perpendicular to the ridge line, the image gray distribution is approximately sinusoidal, and the sine wave frequency can be regarded as the ridge frequency of the local area of the fingerprint. Like the ridge direction, this is a rather important feature of the fingerprint image. The ridge line frequency and direction can be effectively used to increase fingerprint image filtering. The ridge frequency calculation method is as follows [8]: (1) For a sub-area of fingerprint image (i, j) (i, j is abscissa and ordinate of sub-area image center); the direction of the window N×S is built and a pixel point (i, j) is regarded as a center. The window frame is corresponding to the fingerprint ridges, and N and vertical ridge line direction is vertical. S is parallel to the direction of the ridge line, as shown in Figure 2.
is the image sub-area direction that is, the ridge line direction (3).The ridge line distance is calculated. For a valid fingerprint image, the second step (2), X (k) should be a discrete sine wave. T (i, j) is set for the average number of pixels between two consecutive peaks in X (k), and T (i, j) is the local ridge line distance.
This study proposes a fingerprint image enhancement algorithm based on stretching transfer function. Through experiments and comparison, the algorithm processing effect is obviously better than the histogram equalization algorithm especially in fingerprint image details aspects. Compared with the transform domain method, fuzzy processing method and traditional histogram specification algorithm, it has a smaller amount of calculation, with faster processing speed, and avoids manual intervention, so that it can be used for the occasion of limited computing resources and high real-time requirements. And the algorithm provides the regulation and choice means for the users by changing a single parameter value to conveniently control the output image in the engineering application.

Fingerprint Image Enhancement Method Based on Stretching Transfer Function
As shown in Figure 3, the stretching transfer function is illustrated, m stands for the threshold value. The function can condense the grayscale of the input value below m for the output image gray level into a narrow range. It can condense the grayscale of the input value higher than m brighter in the output image grayscale into a narrow range. Output image is a pair of images with the high contrast.

Figure 3. Stretching transformation function
Its functional formula is shown as follows: Where, r represents the brightness of the input image; s is the corresponding brightness values of the output image; E controls the function slope. When E tends to infinity, the function can output a binary image, and the limit function is evolved into the threshold function as an effective tool for segmenting the image. m threshold selection adopts Otsu method for the calculation [10]. The distribution function of the image grey discrete probability density is shown below: p r (r q )= n n q q=0,1,2,…,L-1 Where, n is the total number of pixels in the image; n q is the number of pixel of grayscale as r q , L is all possible gray series of image. The threshold value is set to m, C 0 is a set of pixels with the grayscale for {0, 1… k-1}; C 1 is a set of the pixel with the grayscale for [m, m+1,…,L-1]. threshold is normalized to [0, 1]. Therefore, before using threshold, it is necessary to scale a suitable range. For example, f is a uint8 image. The value m is supposed to be multiplied by 255 before using it [11].
By adjusting the m value, the grayscale of the image can be roughly divided into two parts.Adjusting the E value can control the width of the gray level distribution area in two parts. the function is used to contrast input fingerprint image enhancement [12], highlighting image management layering, making the ridge and valley line clearer, and maintaining the information of fingerprint image during the transformation process thus laying a solid foundation for the accuracy and reliability to extract fingerprint characteristic values in the next step.

Experimental Results and Analysis
The input fingerprint image and its histogram are as shown in Figure 4. In Figure 5, the results of the traditional histogram equalization algorithm are shown.The results when using stretching transfer function are expressed, as shown in Figure 6 and Figure 7, respectively. Otsu method is used to calculate the m value and the result obtained is 0.6627. m multiplied by 255 gets 169. In Figure 6, E value is set to 10, whereas in Figure 7, the value of which is 20. Compared with Figure 6(a), Figure 7 (a) and Figure 5 (a), fingerprint image transform based on the algorithm, the input image has an obvious enhancement with the image details to be retained, especially for the middle gray-scales range. The gray dynamic distribution range is expanded to highlight the image layers.
Compared with Figure 6(a) and Figure 7(a) and Figure 5(a), it can be found that the proposed method can reserve more details of the input image than the traditional histogram equalization method. It is obviously that the image quality of which is better than that of the histogram equalization method (it can be found that ridge line is clearer, and gray feature points along the edge of the ridge line has strongly administrative levels).From the corresponding histogram, the histogram gray dynamic distribution by this algorithm has more obvious expansion than the traditional histogram equalization algorithm, which indicates that the histogram processed by using this algorithm retained more part of the gray levels of pixels.
In the proposed algorithm, it is only needed to change the value of the single parameter E, which brings more convenience when controlling the output image quality. In engineering practice, it provides the users with the selection and control means.

Conclusion
The effect of image processing that uses the stretching transfer function based on fingerprint enhancement algorithm is much more superior than the traditional histogram equalization algorithm, especially in the aspect of fingerprint image detail retention, which plays a vital rule in fingerprint extraction. Besides, compared with the transform domain method, fuzzy processing method and traditional histogram specification algorithm, the proposed algorithm has a smaller amount of calculation at a faster processing speed,without manual intervention, which can be used under limited computing resources and high real-time requirements. Also, this algorithm can be obtained by only