Fingerprint image processing method, device, equipment, medium and program product
Through the combined processing of Gaussian mixture model based on expectation-maximization clustering algorithm and Gabor filter, the accuracy and robustness problems of traditional fingerprint image segmentation methods in noisy environments are solved, and high-quality fingerprint feature extraction is achieved.
Patent Information
- Application Number
- CN202510851582.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-26
AI Technical Summary
Traditional fingerprint image segmentation methods are prone to failure in noisy environments and are highly sensitive to the initial centroid. They are difficult to adapt to the dynamic changes in the complexity of the fingerprint image background, resulting in inaccurate segmentation results and insufficient robustness.
A Gaussian mixture model based on the expectation-maximization clustering algorithm was used for segmentation, enhanced by a direction- and frequency-adaptive Gabor filter, and binarized and thinned using a local threshold method and a sequential thinning algorithm. Boundary pixels were deleted until a single-pixel-width skeleton was retained.
It improves the accuracy and robustness of fingerprint image segmentation, reduces segmentation errors, highlights texture features, suppresses noise interference, accurately extracts fingerprint features, and reduces redundant information.
Smart Images

Figure CN120708254A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and more specifically to a fingerprint image processing method, apparatus, device, medium, and program product. Background Art
[0002] As fingerprint recognition technology accelerates its evolution toward high precision and real-time performance, as a core pillar in the field of biometric recognition, the performance of the preprocessing stage plays a decisive role in the robustness of feature extraction and matching efficiency. Image segmentation, as the primary task of preprocessing, must overcome two major technical bottlenecks: noise interference and background complexity. During fingerprint collection, factors such as uneven skin moisture, differences in pressing pressure, and sensor noise can easily lead to image blur or the generation of pseudo-feature points. Mixed non-fingerprint areas (such as finger edge residue and stains) or low-contrast areas in the background further exacerbate the complexity of segmentation. Traditional segmentation methods based on grayscale thresholds or gradient amplitudes are prone to failure in strong noise environments. Clustering algorithms, through a data-driven similarity grouping mechanism, provide an innovative solution for fingerprint segmentation in complex backgrounds.
[0003] Taking the K-means clustering algorithm as an example, it divides pixels into K clusters through iterative optimization. In fingerprint segmentation, K is usually set to 2 to distinguish the foreground (fingerprint area) from the background. The algorithm process includes initializing the centroid, calculating the Euclidean distance between the pixel and the centroid to assign clusters, updating the centroid position, and iterating repeatedly until convergence. Although K-means has the advantages of high efficiency and ease of implementation, its sensitivity to the initial centroid can easily cause the segmentation results to fall into a local optimum. If the randomly initialized centroid is located in a noisy area, the valid fingerprint area may be mistakenly identified as background. In addition, a fixed K value is difficult to adapt to the dynamic changes in the complexity of the fingerprint image background, and the algorithm is not robust enough to noise and outliers, which may lead to blurred segmentation boundaries or over-segmentation.
[0004] To overcome these limitations, researchers have proposed several improvement strategies: The improved K-means clustering algorithm (K-means++) optimizes the initial centroid selection through probability distribution, reducing the impact of randomness on the results; dynamically adjusts the K value based on the image grayscale histogram or texture features to improve the algorithm's adaptability; introduces local binary pattern (LBP) or directional field information into the distance metric to enhance the ability to capture fingerprint texture features. Furthermore, fuzzy C-means (FCM) allows pixels to belong to multiple clusters simultaneously through a membership function, making it more suitable for processing fingerprint regions with blurred boundaries; spectral clustering uses graph theory to map pixels to a low-dimensional space, making it easier to discover cluster structures with non-convex distributions; and deep learning models directly learn segmentation mappings through end-to-end training. With the support of high-quality annotated data, high-precision segmentation can be achieved, but this requires a trade-off in computational resource consumption. Summary of the Invention
[0005] In view of the above problems, the present application provides a fingerprint image processing method, apparatus, device, medium and program product.
[0006] According to a first aspect of the present application, a fingerprint image processing method is provided, comprising: obtaining user authorization for an input fingerprint image; after obtaining the user authorization for the input fingerprint image, segmenting the input fingerprint image using a Gaussian mixture model based on an expectation-maximization clustering algorithm to obtain a segmented fingerprint image; enhancing the segmented fingerprint image using a direction- and frequency-adaptive Gabor filter to obtain an enhanced fingerprint image, wherein the direction of the Gabor filter is determined by the local ridge direction of the fingerprint and the frequency is determined by the local ridge frequency; binarizing the enhanced fingerprint image using a local threshold method to obtain a binarized fingerprint image; and processing the binarized fingerprint image using a sequential thinning algorithm to delete boundary pixels until a skeleton with a single pixel width is retained to obtain a processed fingerprint image.
[0007] According to an embodiment of the present application, the expectation-maximization clustering algorithm includes an E-step and an M-step, and a Gaussian mixture model based on the expectation-maximization clustering algorithm is used to segment the input fingerprint image, including: randomly sampling red, green, and blue values from the yellow, green, red, white, and purple areas of the fingerprint image, initializing the parameters of the Gaussian mixture model, the parameters including the mixing ratio, the mean vector, and the covariance matrix; calculating the posterior probability that each pixel in the input fingerprint image belongs to each Gaussian component through the E-step; updating the parameters of the Gaussian mixture model through the M-step to maximize the log-likelihood function; iteratively executing the E-step and the M-step until the parameters converge or the maximum number of iterations is reached; and dividing the pixels into foreground and background according to the posterior probability.
[0008] According to an embodiment of the present application, a segmented fingerprint image is enhanced using a direction- and frequency-adaptive Gabor filter, including: calculating the local ridge direction and local ridge frequency of the fingerprint image; determining the direction parameter of the Gabor filter based on the local ridge direction, and determining the frequency parameter of the Gabor filter based on the local ridge frequency; constructing a two-dimensional Gabor filter based on the direction parameter and the frequency parameter, and performing a convolution operation on the segmented fingerprint image to obtain an enhanced fingerprint image.
[0009] According to an embodiment of the present application, the local ridge direction and local ridge frequency of a fingerprint image are calculated, including: extracting fingerprint ridge spectrum features in the enhanced fingerprint image through wavelet transform; calculating the gradient field of the enhanced fingerprint image in blocks, and fitting the local ridge direction using the least squares method; and calculating the local ridge frequency based on the ridge spacing statistical characteristics in the fingerprint ridge spectrum features.
[0010] According to an embodiment of the present application, a local threshold method is used to perform binarization processing on the enhanced fingerprint image, including: performing low-pass filtering on the enhanced fingerprint image to obtain a filtered image; estimating the grayscale distribution of the background area and calculating the grayscale value of the background area by interpolating adjacent background intensities; dynamically adjusting the threshold according to the grayscale value of the background area to convert the filtered image into a binary image; performing morphological operations on the binary image to eliminate noise and holes; performing connected region analysis on the binary image after the morphological operation to remove isolated areas to obtain a binary fingerprint image.
[0011] According to an embodiment of the present application, a sequential thinning algorithm is used to process a binarized fingerprint image, including: sequentially scanning the pixel points of the binarized fingerprint image, and gradually deleting boundary pixels based on the connectivity conditions of local neighborhood pixels; iteratively performing the boundary pixel deletion operation until a skeleton with a single pixel width is retained to obtain a thinned image; deburring the thinned image to eliminate small branches; and connecting breakpoints in the image after burr removal to repair the broken fingerprint skeleton, wherein the conditions for deleting pixels include that the pixels are black and are not isolated points or end points; and that deleting pixels does not change the connectivity of the image.
[0012] According to an embodiment of the present application, morphological operations are performed on a binary image, including: using an opening operation to eliminate noise and small holes; using a closing operation to fill broken parts in the fingerprint ridges; and dynamically adjusting the size of the structural elements of the opening and closing operations according to the resolution and noise level of the fingerprint image.
[0013] A second aspect of the present application provides a fingerprint image processing device, comprising: an authorization acquisition module for obtaining user authorization for an input fingerprint image; an image segmentation module for, after obtaining the user's authorization for the input fingerprint image, using a Gaussian mixture model based on an expectation-maximization clustering algorithm to segment the input fingerprint image to obtain a segmented fingerprint image; an image enhancement module for enhancing the segmented fingerprint image using a direction- and frequency-adaptive Gabor filter to obtain an enhanced fingerprint image, wherein the direction of the Gabor filter is determined by the local ridge direction of the fingerprint and the frequency is determined by the local ridge frequency; an image binarization module for binarizing the enhanced fingerprint image using a local threshold method to obtain a binarized fingerprint image; and an image thinning module for processing the binarized fingerprint image using a sequential thinning algorithm, deleting boundary pixels until a skeleton with a single pixel width is retained, to obtain a processed fingerprint image.
[0014] The third aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0015] The fourth aspect of the present application further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.
[0016] The fifth aspect of the present application further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above contents and other objects, features and advantages of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:
[0018] Figure 1 A diagram schematically illustrates an application scenario of the fingerprint image processing method, apparatus, device, medium, and program product according to an embodiment of the present application;
[0019] Figure 2 The following schematically shows a flow chart of a fingerprint image processing method according to an embodiment of the present application;
[0020] Figure 3 The flowchart schematically shows a method for segmenting an input fingerprint image using a Gaussian mixture model based on an expectation-maximization clustering algorithm according to an embodiment of the present application;
[0021] Figure 4 A flowchart of enhancing a segmented fingerprint image using a direction- and frequency-adaptive Gabor filter according to an embodiment of the present application is schematically shown;
[0022] Figure 5 A flowchart schematically illustrates a method for binarizing an enhanced fingerprint image using a local threshold method according to an embodiment of the present application;
[0023] Figure 6 A block diagram schematically illustrates a method for binarizing an enhanced fingerprint image using a local threshold method according to an embodiment of the present application;
[0024] Figure 7 A flowchart schematically illustrates processing a binary fingerprint image using a sequential thinning algorithm according to an embodiment of the present application;
[0025] Figure 8 Schematically shows a schematic diagram of 3×3 window pixel marking according to an embodiment of the present application;
[0026] Figure 9 A schematic block diagram of a fingerprint image processing device according to an embodiment of the present application is shown; and
[0027] Figure 10 The block diagram schematically shows an electronic device suitable for implementing the fingerprint image processing method according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.
[0029] The terms used herein are only for describing specific embodiments and are not intended to limit the present application. The terms "comprise," "include," etc. used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0030] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0031] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0032] In the technical solution of this application, the user information involved (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0033] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided in the embodiments of the present application all provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0034] An embodiment of the present application provides a fingerprint image processing method, comprising: obtaining user authorization for an input fingerprint image; after obtaining the user authorization for the input fingerprint image, segmenting the input fingerprint image using a Gaussian mixture model based on an expectation-maximization clustering algorithm to obtain a segmented fingerprint image; enhancing the segmented fingerprint image using a direction- and frequency-adaptive Gabor filter to obtain an enhanced fingerprint image, wherein the direction of the Gabor filter is determined by the local ridge direction of the fingerprint and the frequency is determined by the local ridge frequency; binarizing the enhanced fingerprint image using a local threshold method to obtain a binarized fingerprint image; and processing the binarized fingerprint image using a sequential thinning algorithm to delete boundary pixels until a skeleton with a single pixel width is retained to obtain a processed fingerprint image.
[0035] According to the fingerprint image processing method of the embodiment of the present application, a Gaussian mixture model based on the expectation-maximization (EM) clustering algorithm is used to segment the input fingerprint image. The EM clustering algorithm can continuously optimize the model parameters in an iterative manner to effectively separate different areas in the fingerprint image (such as the foreground fingerprint area and the background area). The Gaussian mixture model can well fit the pixel distribution characteristics of different areas in the fingerprint image, making the segmentation result more accurate and reducing the segmentation error. It provides a high-quality segmented image for subsequent fingerprint image processing and avoids fingerprint feature extraction errors caused by inaccurate segmentation. A direction- and frequency-adaptive Gabor filter is used; the segmented image is enhanced according to the local ridge direction and frequency of the fingerprint to highlight texture features, suppress noise interference, and improve image clarity; then the enhanced image is binarized using a local threshold method, and the threshold is adaptively determined to effectively address the problems of uneven illumination and contrast differences and accurately separate ridges and valleys; finally, a sequential thinning algorithm is used to process the binarized image, gradually deleting boundary pixels and retaining a fingerprint skeleton with a single pixel width, accurately extracting fingerprint features and reducing redundant information.
[0036] Figure 1 The following schematically illustrates an application scenario of a fingerprint image processing method according to an embodiment of the present application.
[0037] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or optical fiber cables.
[0038] A user may use a first terminal device 101, a second terminal device 102, or a third terminal device 103 to interact with a server 105 via a network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, or the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).
[0039] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0040] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process received data such as user requests, and feed back processing results (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal devices.
[0041] It should be noted that the fingerprint image processing method provided in the embodiment of the present application can generally be executed by the server 105. Accordingly, the fingerprint image processing device provided in the embodiment of the present application can generally be set in the server 105. The fingerprint image processing method provided in the embodiment of the present application can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the fingerprint image processing device provided in the embodiment of the present application can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0042] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0043] The following will be based on Figure 1 The scene described by Figures 2 to 7 The fingerprint image processing method according to the embodiment of the present application is described in detail.
[0044] Figure 2 The following schematically shows a flow chart of a fingerprint image processing method according to an embodiment of the present application.
[0045] like Figure 2 As shown, the fingerprint image processing method of this embodiment includes operations S210 to S250.
[0046] In operation S210, the user's authorization for the input fingerprint image is obtained. In operation S220, after the user's authorization for the input fingerprint image is obtained, the input fingerprint image is segmented using a Gaussian mixture model based on an expectation-maximization clustering algorithm to obtain a segmented fingerprint image.
[0047] The Expectation-Maximization Algorithm (EM) is an iterative optimization method widely used in parameter estimation, especially for missing data problems (due to limited observation conditions or missing data records, resulting in missing content in the data table) and complex likelihood functions (due to the complexity of the likelihood function or the difficulty of direct maximization, traditional maximum likelihood estimation methods are difficult to apply).
[0048] The basic principle of the EM algorithm is as follows: let the observed data be X and the unknown potential data be Y. Then the maximum likelihood function L(θ|X) about the parameter θ can be solved through the iterative process of the EM algorithm. Define Q(θ|θ (k) ) is the observed data X={x1,x2,…,x n} condition, the mathematical expectation of the joint log-likelihood function of all data (including potential data) is:
[0049] Q(θ|θ (k) )=E{logL(θ|Z)|X,θ (k)} (1)
[0050] =E{logp(Z|θ)|X,θ (k)} (2)
[0051] =∫[logp(Z∣θ)]p(Y∣X,θ(k))dy (3)
[0052] From formula (3), we can see that given a sample point X={x1,x2,…,x n}, Y is a random variable of Z, and its conditional expectation can be obtained by integral calculation, so that Q(θ|θ (k) ) is a function of θ. By maximizing Q(θ|θ (k) ), we can get the new parameter estimate θ after the k+1th iteration (k+1) , used for the next iteration.
[0053] The EM algorithm starts with the initial parameter θ (0) At the beginning, iterative optimization is performed between the E step (Expectation Step) and the M step (Maximization Step). The E step is based on the current parameter θ (k) Calculate the conditional probability distribution of the latent variable Y and calculate the conditional expectation Q(θ|θ) of the log-likelihood function (k) ). M steps are used to maximize Q(θ|θ (k) ), and obtain the new parameter estimate θ (k+1) ,Right now:
[0054] (4)
[0055] in, In order to make The parameter θ reaches its maximum value.
[0056] Repeat the E and M steps until the parameters converge.
[0057] Gaussian Mixture Model (GMM) is a powerful model for clustering, pattern recognition and multivariate density estimation. Assume that the data x1, x2, ..., x n From R d The probability density function of a random vector in space is:
[0058] (5)
[0059] in: is the mixing ratio (satisfying 0< <1 and =1); The mean is , the covariance matrix is Gaussian distribution density function, mixing parameters θ=(p1,…,p K ,μ1,…,μ K ,Σ1,…,Σ K ) is usually estimated by maximizing the log-likelihood function. In this model, Each Gaussian component can be viewed as The weight in the overall distribution.
[0060] Therefore, fingerprint image segmentation using Gaussian mixture models is essentially an unsupervised learning problem, which can be converted into a parameter estimation problem in classical probability theory to solve.
[0061] Figure 3 The flowchart of segmenting an input fingerprint image by using a Gaussian mixture model based on an expectation-maximization clustering algorithm according to an embodiment of the present application is schematically shown.
[0062] like Figure 3 As shown, the method for segmenting an input fingerprint image using a Gaussian mixture model based on an expectation-maximization clustering algorithm in this embodiment includes operations S310 to S340.
[0063] In operation S310, red, green, and blue (RGB) values are randomly sampled from yellow, green, red, white, and purple regions of the fingerprint image to initialize parameters of a Gaussian mixture model, including a mixture ratio, a mean vector, and a covariance matrix.
[0064] In the embodiment of the present application, when initializing the parameters of the Gaussian mixture model, the region identification and sampling work is first carried out, and the color space conversion (such as conversion from RGB to HSV or Lab color space) is used to make the color distinction more intuitive and effective. In the converted color space, the yellow, green, red, white, and purple regions in the fingerprint image are identified according to the preset color threshold range. Then, a certain number of pixels (determined according to the image size and computing resources, a larger number of samples can better reflect the color distribution but will increase the amount of calculation) are randomly selected in each identified color region, and their RGB values are obtained; then the Gaussian mixture model parameters are initialized, assuming that the model consists of K Gaussian components (the K value can be determined based on experience or cross-validation), and the mixing ratio Represents the weight of each Gaussian component and satisfies and , can be initialized according to the distribution of sampling points in different color areas (for example, if there are more sampling points in the yellow area, the corresponding Gaussian component mixing ratio can be set larger), the mean vector It is a three-dimensional vector, which represents the center position of the Gaussian component in the RGB color space. The average value of the RGB value of each color area sampling point can be used as the mean vector of the corresponding Gaussian component. The covariance matrix To describe the shape and direction of data distribution, it can be assumed to be a diagonal matrix (different color channels are independent). The variance of each Gaussian component sampling point on the three RGB channels is calculated as the diagonal element of the covariance matrix. Through these operations, samples are taken from different color regions and parameters are initialized, providing a reasonable starting point for subsequent model training and helping the model better fit the color distribution of fingerprint images.
[0065] In operation S320, the posterior probability of each pixel in the input fingerprint image belonging to each Gaussian component is calculated through the E step.
[0066] In the embodiments of this application, each pixel in a fingerprint image has a corresponding RGB value, representing the pixel's intensity in the red, green, and blue color channels. It is assumed that the color distribution of the fingerprint image can be described by a Gaussian mixture model. This model consists of multiple Gaussian components, each with its own unique parameters, including a mean vector and a covariance matrix. The mean vector determines the center position of the Gaussian component in the RGB color space, while the covariance matrix describes the shape and direction of the data distribution within that Gaussian component. First, the probability density of each pixel belonging to each Gaussian component is calculated. This probability is quantified by considering the distance between the pixel's RGB value and the center position of each Gaussian component, as well as the distribution of the data within that Gaussian component. Next, based on Bayes' theorem, the posterior probability of each pixel belonging to each Gaussian component is calculated. This introduces the concept of a latent variable, which indicates whether a pixel belongs to a particular Gaussian component. The calculation of the posterior probability comprehensively considers the weight of each Gaussian component in the overall model (i.e., the mixture ratio) and the probability density of the pixel within that Gaussian component. In this way, a more accurate probability value of the pixel belonging to each Gaussian component can be obtained.
[0067] In operation S330, parameters of the Gaussian mixture model are updated through M steps to maximize the log-likelihood function.
[0068] In an embodiment of the present application, the parameters of the Gaussian mixture model are updated and optimized based on the posterior probability that each pixel point belongs to each Gaussian component calculated in the expectation step (E step).
[0069] The first step is to update the mixing ratio. This ratio reflects the weight of each Gaussian component in the overall model. During the update process, the attribution of each Gaussian component to all pixels is comprehensively considered. Specifically, based on the posterior probability of each pixel belonging to a Gaussian component, the "influence" of that Gaussian component in the entire image is calculated, and the new mixing ratio is determined to achieve a more reasonable weight distribution.
[0070] Next, the mean vector is updated. The mean vector determines the center position of the Gaussian component in the RGB color space. To make the model more consistent with the color distribution of the fingerprint image, a weighted average of all pixels is performed based on the posterior probability. Pixels that are more likely to belong to a Gaussian component are given a greater weight when calculating the new mean vector, ensuring that the center position of the Gaussian component more accurately reflects the actual color distribution.
[0071] Finally, the covariance matrix is updated. The covariance matrix describes the shape and direction of the data distribution in the Gaussian components. When updating, it is necessary to combine the posterior probability and the newly calculated mean vector. By considering the difference between the pixel and the new mean vector, the covariance between them is calculated, and the new covariance matrix is obtained. This allows the model to more accurately describe the association and distribution characteristics of the data across different color channels.
[0072] Through the above parameter update operation, the log-likelihood function of the Gaussian mixture model is maximized, thereby significantly improving the model's ability to fit the color distribution of fingerprint images and allowing the model to more accurately characterize the color features in the image.
[0073] In operation S340 , the E step and the M step are iteratively performed until the parameters converge or the maximum number of iterations is reached.
[0074] In the embodiments of this application, the expectation step (E-step) and the maximization step (M-step) are constructed into an iterative loop. In each iteration, the E-step is first executed. Based on the current Gaussian mixture model parameters, the posterior probability of each pixel in the fingerprint image belonging to each Gaussian component is accurately calculated to determine the degree of association between each pixel and each Gaussian component. Next, the M-step is executed. Based on the posterior probabilities calculated in the E-step, the parameters of the Gaussian mixture model, including the mixture ratio, mean vector, and covariance matrix, are updated and optimized, allowing the model to continuously adjust itself to better fit the data.
[0075] To determine when iteration can be stopped, various methods are used to monitor parameter convergence. One common and effective method is to calculate the changes in model parameters between two consecutive iterations, such as the difference in the mixture ratio, mean vector, and covariance matrix before and after the iteration. When the change in these parameters is less than a pre-set minimum threshold, it means that the parameters have stabilized and the model can be considered to have converged. At the same time, to prevent the iterative process from continuing indefinitely due to certain special circumstances, a maximum number of iterations is set. If the parameters still have not converged when this maximum number of iterations is reached, the iteration is forced to stop.
[0076] By continuously executing the E-step and M-step, the parameters of the Gaussian mixture model are continuously optimized so that it can accurately fit the color distribution of the fingerprint image until the parameters converge or the maximum number of iterations is reached, thereby obtaining a stable and high-performance Gaussian mixture model.
[0077] In operation S350, the pixels are divided into two categories: foreground and background according to the posterior probability.
[0078] In the embodiments of the present application, after training the Gaussian mixture model, the Gaussian components corresponding to the foreground and background in the fingerprint image are determined based on the model parameters. Parameters such as the mean vector and covariance matrix of the Gaussian components are comprehensively considered, and judgment is made based on prior knowledge and past experimental results. For example, by observing that the color characteristics corresponding to the mean vector of a Gaussian component align with the darker color typically found on fingerprint ridges, it is preliminarily determined that this Gaussian component corresponds to the foreground portion of the fingerprint. Next, each pixel in the fingerprint image is classified using the posterior probabilities of each pixel belonging to each Gaussian component calculated in the expectation step (E step). For each pixel, the Gaussian component that maximizes its posterior probability is identified. If this Gaussian component is determined to be a foreground Gaussian component, the pixel is classified as belonging to the foreground category, i.e., the ridges and valleys of the fingerprint. Conversely, if it corresponds to a background Gaussian component, the pixel is classified as belonging to the background category. The posterior probability calculated with the help of the Gaussian mixture model can accurately distinguish the foreground (fingerprint ridges and valleys) from the background in the fingerprint image.
[0079] return Figure 2 In operation S230, the segmented fingerprint image is enhanced using a direction and frequency adaptive Gabor filter to obtain an enhanced fingerprint image, wherein the direction of the Gabor filter is determined by the fingerprint local ridge direction and the frequency is determined by the local ridge frequency.
[0080] Image enhancement plays a crucial role in improving fingerprint image quality and subsequent recognition results. Image filtering aims to remove external noise from the target image while ensuring that the image itself is not distorted. To effectively reduce the impact of external noise, the fingerprint image's valleys and parallel ridges with specific orientations are used to extract valuable information. The waveforms of valleys and parallel ridges vary slightly along their defined directions, and filters with the same frequency characteristics can specifically remove excess noise interference from the image, thereby preserving the fingerprint's inherent valley and parallel ridge structure.
[0081] In the embodiment of the present application, a Gabor filter is selected to enhance the fingerprint image. The Gabor filter algorithm described by the modulation transfer function (MTF) can be expressed as:
[0082] (6)
[0083] in, represents the transfer function of the frequency domain filter; ; ; ; ; f represents the frequency of the sinusoidal plane wave (determined by the fingerprint ridge frequency); Φ represents the direction of the filter (orthogonal to the fingerprint ridge direction); 、 represents the standard deviation of the Gaussian envelope (controls the frequency domain bandwidth); 、 Indicates the center position of the Gaussian envelope, which is determined by the frequency f and direction Determination; u and v represent the original coordinate axes of the frequency domain, corresponding to the spatial frequency of the image in the horizontal direction x and the vertical direction y respectively; and It is the rotation coordinate axis of the frequency domain, which is obtained by rotating the original coordinates u and v by an angle get; 、 represents the Kronecker delta function.
[0084] When applying the Gabor filter to a fingerprint image, the following three key parameters need to be specified: the frequency f of the sinusoidal plane wave, which determines the spatial frequency characteristics of the filter and is determined by the local ridge frequency of the fingerprint image, and directly affects the response strength of the filter to the ridge frequency; the direction θ of the filter, which is determined by the local ridge direction of the fingerprint image and is used to ensure that the filter can enhance the ridges and valleys in a specific direction; the standard deviation S of the Gaussian envelope x and S y , which is used to control the smoothness of the filter in the spatial domain, where a larger S x and S y It has enhanced noise suppression capability, but may introduce pseudo ridges and valleys. Smaller S x and S y This can reduce the generation of pseudo ridges and valleys, but may reduce the noise removal effect.
[0085] In the embodiment of the present application, the expression of the two-dimensional Gabor filter in the spatial domain is:
[0086] (7)
[0087] Where: x θ and y θ Represents the new coordinates after the original coordinates (x, y) are rotated by angle θ. , ,The rotated coordinate system enables the filter to match the local orientation of the fingerprint ridges.
[0088] Figure 4 The flowchart of enhancing a segmented fingerprint image using a direction- and frequency-adaptive Gabor filter according to an embodiment of the present application is schematically shown.
[0089] like Figure 4As shown, the method for enhancing the segmented fingerprint image by using the direction and frequency adaptive Gabor filter in this embodiment includes operations S410 to S430.
[0090] In operation S410, local ridge directions and local ridge frequencies of a fingerprint image are calculated.
[0091] In an embodiment of the present application, the local ridge direction is determined by a gradient method, a directional field estimation algorithm, or model fitting, reflecting the local extension direction of the fingerprint ridge. This is used to guide the design of the directional parameters of the Gabor filter, making the filter orthogonal to the ridge, thereby efficiently enhancing the ridge features while suppressing vertical noise. The local ridge frequency is calculated by frequency domain analysis (such as Fourier transform), autocorrelation method, or ridge tracking method to quantify the periodicity of the ridge within a unit distance. This is used to determine the center frequency parameters of the Gabor filter, ensuring that the filter response matches the ridge frequency and avoiding blur or pseudo-ridges. For example, the fingerprint ridge spectrum characteristics in the enhanced fingerprint image are extracted through wavelet transform; the gradient field is calculated for the enhanced fingerprint image in blocks, and the local ridge direction is fitted using the least squares method; and the local ridge frequency is calculated based on the statistical characteristics of the ridge spacing in the fingerprint ridge spectrum characteristics.
[0092] Through precise matching of direction and frequency, the Gabor filter can significantly enhance ridge clarity, reduce background noise and pseudo-feature interference, and provide a high-quality image foundation for subsequent feature extraction (such as detail point detection); secondly, the adaptive adjustment of local parameters enables the algorithm to cope with complex changes in fingerprint images, such as frequency differences caused by scars, dry areas or calluses, thereby improving the robustness of the algorithm; in addition, the direction field and frequency information can also be used for auxiliary verification in fingerprint classification (such as arch, spiral) and matching stages, further improving the reliability of the recognition system.
[0093] In operation S420, a direction parameter of a Gabor filter is determined according to the local ridge direction, and a frequency parameter of the Gabor filter is determined according to the local ridge frequency.
[0094] In an embodiment of the present application, the directional parameter is determined by calculating the local ridge direction of the fingerprint (e.g., using a gradient method or a directional field estimation algorithm) and setting the direction θ of the Gabor filter to be orthogonal to the ridge direction (i.e., θ = ridge direction + π / 2). This allows the filter to enhance the signal along the ridge extension direction while suppressing noise in the vertical direction. The frequency parameter is determined by analyzing the local ridge frequency (e.g., using a Fourier transform or autocorrelation method) and setting the sine wave frequency f of the Gabor filter to be consistent with the ridge frequency (i.e., f ≈ 1 / T, where T is the ridge spacing). This ensures that the filter accurately responds to the target frequency component and avoids the generation of blurred or pseudo-ridges.
[0095] Through precise matching of direction and frequency, the Gabor filter can efficiently enhance the fingerprint ridge features and significantly improve image clarity, while reducing background noise and pseudo-feature interference, providing high-quality input for subsequent detail point extraction and matching; secondly, the adaptive design of local parameters enables the filter to flexibly respond to complex changes in fingerprint images, such as frequency differences caused by local scars, dry areas or calluses, thereby enhancing the robustness of the algorithm; in addition, the coordinated optimization of direction and frequency can also improve the filter's processing capabilities for low-quality fingerprints (such as blurred, incomplete), achieving a balance between noise suppression and detail preservation.
[0096] In operation S430, a two-dimensional Gabor filter is constructed based on the direction parameter and the frequency parameter, and a convolution operation is performed on the segmented fingerprint image to obtain an enhanced fingerprint image.
[0097] In the embodiment of the present application, in fingerprint image enhancement, constructing a two-dimensional Gabor filter based on the local ridge direction parameter θ and the ridge frequency parameter f, and performing a convolution operation on the segmented fingerprint image is a key step in improving the clarity of fingerprint features. The core of the method is: adjusting the spatial orientation of the Gabor filter by the direction parameter θ so that it is orthogonal to the ridge direction, thereby enhancing the signal along the ridge extension direction; setting the sine wave frequency of the filter by the frequency parameter f so that it matches the ridge frequency and accurately responds to the target periodic structure. At the same time, combined with the standard deviation parameter (S) of the Gaussian envelope, the filter is filtered and the filter is filtered. x ,S y ) controls the filter bandwidth to balance noise suppression and detail preservation. The filter function of the obtained filter is shown in Equation (7).
[0098] return Figure 2 In operation S240, the enhanced fingerprint image is binarized using a local threshold method to obtain a binarized fingerprint image.
[0099] In image processing, binarization methods are generally categorized as global and local. Global thresholding methods use a single threshold to separate the entire image into foreground and background. They perform well when the grayscale distributions of the foreground and background differ significantly (such as in scenes with uniform illumination and high contrast), offering high computational efficiency and simple implementation. However, in practical applications, images often have complex grayscale distributions due to noise, uneven illumination, or degradation effects such as blur and shadows. A single threshold cannot account for these global differences, leading to over-segmentation or under-segmentation.
[0100] In contrast, local (adaptive) thresholding methods dynamically calculate a threshold for each pixel by analyzing the local statistical properties of the pixel neighborhood (such as mean and variance), thereby adapting to spatially uneven grayscale variations. This method is more advantageous when processing degraded images (such as shadows in document scans and noise interference in fingerprint images), more accurately preserving key details such as character strokes and fingerprint ridges. It is particularly suitable for scenes with non-uniform lighting or low contrast.
[0101] While the accuracy of binarization technology is crucial, its automated application cannot be ignored. Traditional methods often rely on manual parameter adjustment to optimize threshold selection, which is not only time-consuming but also lacks universality. Therefore, the development of automated binarization algorithms that do not require user intervention and can adapt to image characteristics has become a research focus. By combining local feature analysis (such as dynamic threshold calculation based on neighborhood statistics) with intelligent optimization strategies (such as automatic parameter estimation), these algorithms significantly improve processing efficiency and robustness while ensuring binarization quality, providing reliable technical support for large-scale image analysis tasks (such as document digitization and biometric recognition).
[0102] Figure 5 A flowchart schematically illustrates a method for binarizing an enhanced fingerprint image using a local threshold method according to an embodiment of the present application; Figure 6 A block diagram schematically illustrates a method for binarizing an enhanced fingerprint image using a local threshold method according to an embodiment of the present application.
[0103] like Figure 5 and Figure 6 As shown, the method of binarizing the enhanced fingerprint image using the local threshold method in this embodiment includes operations S510 to S550.
[0104] In operation S510, low-pass filtering is performed on the enhanced fingerprint image to obtain a filtered image.
[0105] In the embodiments of this application, low-pass filtering is an image processing technique whose core concept is to allow low-frequency signals in an image to pass through while suppressing high-frequency signals. In fingerprint image processing, specific filters (such as Gaussian filters) are typically used to implement this operation. For example, a Gaussian filter generates a filter kernel based on the shape of a Gaussian function, with each element in the kernel corresponding to a weight value. During the filtering process, the kernel is moved pixel by pixel across the image. For each position, a weighted average of the pixel values within the kernel's coverage area is calculated, and this weighted average is used to replace the value of the current center pixel.
[0106] Since fingerprint images are extremely susceptible to interference from factors such as sensor noise and uneven lighting during the acquisition process, and these noises are mostly presented in the form of high-frequency signals, low-pass filtering can play its advantages and effectively remove these high-frequency noises, making the fingerprint image smoother, thereby reducing the adverse effects of noise on subsequent background area grayscale estimation, binarization and other processing steps, providing a clearer and higher-quality image foundation for these subsequent operations.
[0107] In operation S520, the grayscale distribution of the background region is estimated, and the grayscale value of the background region is calculated by interpolating adjacent background intensities.
[0108] In the embodiments of the present application, when processing a fingerprint image, image segmentation or edge detection methods are first used to roughly demarcate the foreground (fingerprint ridges and valleys) and background regions based on image gradient information or color features, thereby determining the background region. Once determined, the grayscale value of each pixel in the background region is calculated using interpolation methods such as bilinear interpolation or bicubic interpolation. For example, bilinear interpolation involves finding four known background pixels adjacent to the target pixel. Based on their grayscale values and their relative positional relationships with the target pixel, the grayscale value of the target pixel is then determined through linear interpolation. Accurately estimating the grayscale distribution and grayscale value of the background region is crucial, as the grayscale difference between the foreground and background of a fingerprint image is a key factor in binarization. Calculating the background region's grayscale value by interpolating adjacent background intensities can more accurately depict background grayscale characteristics, making the subsequent threshold dynamically adjusted based on the background grayscale value more appropriate, thereby improving binarization accuracy.
[0109] In operation S530 , the threshold is dynamically adjusted according to the grayscale value of the background area, and the filtered image is converted into a binary image.
[0110] In an embodiment of the present application, after obtaining the grayscale value of the background area, a dynamic thresholding method is used to process the fingerprint image. Specifically, the mean or median grayscale value of the background area is first calculated. Based on the characteristics of the fingerprint image and actual needs, an appropriate offset is added or subtracted to this value to serve as the threshold. The offset value can be flexibly adjusted. After determining the threshold, each pixel in the filtered image is traversed and its grayscale value is compared with the threshold. If the pixel grayscale value is greater than the threshold, it is set to the foreground color (usually white); if it is less than or equal to the threshold, it is set to the background color (usually black), thereby achieving image binarization. Because different fingerprint images are affected by factors such as acquisition conditions and the fingerprint's own characteristics, the grayscale difference between the foreground and background varies. Dynamic thresholding can better match the characteristics of different fingerprint images, thereby more accurately distinguishing the foreground (fingerprint ridges and valleys) from the background in the fingerprint image, improving the quality of the binarized image.
[0111] In operation S540 , a morphological operation is performed on the binary image to remove noise and holes.
[0112] In the embodiments of this application, morphological operations in fingerprint image processing primarily include opening and closing operations. The opening operation follows the order of erosion followed by dilation, while the closing operation follows the order of dilation followed by erosion. The erosion operation slides a structuring element across the image, assigning the minimum value of the pixels within the area covered by the structuring element to the current center pixel, thereby removing small noise points and protruding small areas in the image. The dilation operation also uses the sliding structuring element, but instead uses the maximum value of the pixels within the covered area as the new value of the center pixel, thereby expanding the area in the image. The opening operation first removes noise and small holes by erosion, then restores the shape of the larger area by dilation, eliminating interference while maintaining the main structure of the image. The closing operation first dilates to connect broken sections of the fingerprint ridges, making the ridges more continuous, and then erodes to remove the redundant small areas caused by dilation, thereby filling the gaps in the fingerprint ridges and making the image more complete. Furthermore, the size of the structuring elements used in the opening and closing operations must be dynamically adjusted based on the resolution and noise level of the fingerprint image. High-resolution images are rich in details but may contain more noise. Appropriately increasing the structuring element can more effectively remove noise and fill gaps. Low-resolution images have fewer details and less obvious noise. Reducing the structuring element can avoid image distortion caused by excessive processing.
[0113] Binarized fingerprint images often contain noise, holes, and broken ridges, which can severely impact subsequent fingerprint feature extraction and recognition. Morphological operations, particularly opening and closing, can precisely eliminate these noise and holes and fill in broken ridges, making fingerprint images clearer and more complete.
[0114] In operation S550, connected region analysis is performed on the binary image after the morphological operation, and isolated regions are removed to obtain a binary fingerprint image.
[0115] In the embodiments of the present application, connected region analysis is an algorithm used to identify interconnected pixel regions in an image. In binary images, adjacent pixels with the same pixel value (foreground or background color) are typically grouped into a connected region. First, starting from a pixel in the image, a depth-first search (DFS) or breadth-first search (BFS) algorithm is used to traverse its adjacent pixels, marking all connected foreground pixels as a connected region. The same operation is then repeated for all pixels in the image until all connected regions are found. After all connected regions are obtained, those smaller, considered isolated, regions are removed based on a preset area threshold or other characteristics. These isolated regions are likely caused by noise or missegmentation; removing them can further improve the quality of the fingerprint image.
[0116] After the processing steps of S510 to S540, there may still be some isolated regions in the binary image. These regions may be the result of noise or mis-segmentation, and they will interfere with subsequent fingerprint feature extraction and recognition. Through connected component analysis, these isolated regions can be accurately identified and removed, making the final binary fingerprint image more pure, only retaining the regions that truly belong to the fingerprint ridges and valleys, and providing high-quality input for subsequent fingerprint processing tasks. Rearrange into a paragraph and polish.
[0117] For example, in the binarization of a grayscale document image (grayscale range [0, 255]), for low grayscale text information and the background 4 foreground, 0 represents the background), which is used for normalizing the statistical range.
[0118] After binarization, to eliminate noise, fill in character stroke breaks, and improve the quality of the text region, the following steps are performed:
[0119] Step 1, Noise pixel removal: Scan the binary image and check the N×N neighborhood of each foreground pixel (value 1). If the number of background pixels K sh in the neighborhood exceeds the number of foreground pixels P sh (i.e., P sh ≤K sh ), then mark this pixel as the background (0) to remove isolated noise points or small misdetected foreground regions.
[0120] Step 2, Stroke connection and hole filling: By scanning the binary image, check the neighborhood of each background pixel (value 0). If the number of foreground pixels in the neighborhood exceeds the threshold (such as ), and the Euclidean distance between the current pixel coordinates (x, y) and the average coordinates of the foreground pixels in the neighborhood satisfies and (such as ), then mark this pixel as the foreground (1). By filling the gaps or holes in the character strokes, the stroke continuity can be enhanced.
[0121] Step 3, Region growth optimization: By scanning the binary image, check the n×n neighborhood of each background pixel (value 0) (usually n < N). If the number of foreground pixels P sw1 in the neighborhood exceeds the threshold K sw1 (such as P sw1 >K sw1 ), then mark this pixel as the foreground (1), which can further expand the weakly connected regions and ensure character integrity.
[0122] Return Figure 2In operation S250, the binary fingerprint image is processed using a sequential thinning algorithm, and boundary pixels are deleted until a skeleton with a single pixel width is retained to obtain a processed fingerprint image.
[0123] In embodiments of the present application, a fingerprint image thinning algorithm aims to gradually remove consecutive layers of pixels at pattern boundaries until only the skeleton representing the fingerprint structure remains. The decision to remove or retain a black pixel p is based on the combination of pixels within the local neighborhood containing p. These thinning algorithms can be categorized into two types based on their pixel inspection methods: sequential and parallel. In sequential algorithms, each iteration checks for pixel removal in a fixed order. Furthermore, the decision to retain or remove pixel p in the nth iteration is not made in isolation but depends on all previously performed operations. Specifically, it depends on the nth iteration itself and the pixels processed in that iteration. This means that each iteration of the sequential algorithm must rigorously check whether pixels are removed in the predetermined order. Furthermore, the removal or non-removal of pixel p in a given iteration is influenced by the combined effects of all operations performed prior to that iteration.
[0124] Figure 7 The flowchart of processing a binary fingerprint image using a sequential thinning algorithm according to an embodiment of the present application is schematically shown.
[0125] like Figure 7 As shown, the method of processing a binary fingerprint image using a sequential thinning algorithm in this embodiment includes operations S710 to S740.
[0126] In operation S710, pixels of the binary fingerprint image are sequentially scanned, and boundary pixels are gradually deleted according to connectivity conditions of local neighborhood pixels.
[0127] In the embodiments of this application, sequential scanning involves traversing each pixel of the binary fingerprint image in a predetermined order, such as from left to right and from top to bottom. During this traversal, the connectivity of pixels in a local neighborhood (e.g., 3×3 or 5×5) surrounding the current pixel is checked. If a background pixel exists within the current pixel's neighborhood and is connected to the background pixel, the pixel is determined to be at the image boundary and is a boundary pixel. Once identified as a boundary pixel, its grayscale value is changed from the foreground color (typically black) to the background color (typically white), thereby achieving pixel deletion. This operation serves as the initial step in image thinning. By gradually deleting boundary pixels, it effectively removes redundant edge information from the fingerprint image, gradually sharpening the fingerprint outline.
[0128] In operation S720, a boundary pixel deletion operation is iteratively performed until a skeleton with a single pixel width is retained to obtain a thinned image, wherein the conditions for deleting a pixel include that the pixel is black and is not an isolated point or an end point; and the deletion of the pixel does not change the connectivity of the image.
[0129] In an embodiment of the present application, an iterative approach is employed during image thinning to gradually obtain a single-pixel-wide fingerprint skeleton. Specifically, after completing a boundary pixel deletion operation, the image is sequentially scanned again, repeating the process of determining and deleting boundary pixels. Determining whether a boundary pixel is deletable requires specific stopping conditions: first, the pixel must be black and not an isolated point or an endpoint. An isolated point is a point with no other foreground pixels in its neighborhood, while an endpoint is a point with only one foreground-colored neighboring pixel. Second, it must ensure that deleting the pixel does not alter the connectivity of the image, meaning that previously connected areas in the image remain connected after deletion. When no more deletable pixels meeting these conditions are found in the image, the iterative process ceases, and a single-pixel-wide skeleton remains in the image. By iteratively deleting boundary pixels multiple times, redundant pixel information in the fingerprint image can be effectively removed, gradually shrinking the fingerprint skeleton to a single-pixel width. A single-pixel-wide skeleton accurately represents the fingerprint's topological structure, significantly reducing the amount of data while fully preserving the fingerprint's key features.
[0130] In operation S730, burrs are removed from the thinned image to eliminate small branches.
[0131] In the embodiments of the present application, in fingerprint image processing, burr identification and removal are key steps to improve image quality. Burrs usually appear as small and short branches, and their existence can be determined by analyzing the connectivity of pixel points and the length of branches. Specifically, for each pixel point, the branch situation in its neighborhood is checked. If the length of a branch is less than a preset threshold, the branch is determined to be a possible burr. After the burrs are identified, a burr removal operation is performed, that is, the grayscale value of the pixel point contained in the burr is changed from the foreground color to the background color, thereby eliminating these small branches. Since burrs may be generated in the refined image due to noise or other factors, they will interfere with the fingerprint image quality and subsequent feature extraction. Therefore, through the burr removal operation, these interfering information can be effectively eliminated, making the fingerprint skeleton smoother and clearer, and improving the quality of the fingerprint image.
[0132] In operation S740 , the image after burr removal is connected at breakpoints to repair the broken fingerprint skeleton.
[0133] In the embodiments of the present application, breakpoint detection primarily relies on analyzing the connectivity of pixels to identify discontinuous points in the fingerprint skeleton. Specifically, if a pixel has no other foreground pixels connected to it in its neighborhood, or if the number of connected foreground pixels is insufficient to form a complete fingerprint ridge, then the point is determined to be a possible breakpoint. After the breakpoint is determined, a breakpoint connection operation is performed. This process uses an algorithm based on distance, direction, and other information based on the distribution of pixels around the breakpoint and the topological structure of the fingerprint. For example, the Euclidean distance and direction difference between the breakpoints are calculated, and breakpoints with a close distance and consistent direction are selected for connection. New pixels are then added between the breakpoints to restore the continuity of the fingerprint skeleton. Since fingerprint images may experience skeleton breaks due to noise, poor image quality, and other reasons during acquisition and processing, the breakpoint connection operation can effectively repair these breaks, making the fingerprint image more complete and ensuring that the fingerprint topological structure is not destroyed, thereby improving the accuracy of subsequent fingerprint feature extraction and recognition.
[0134] For example, suppose the pixel p to be detected is a black pixel, and the pixel labels within its 3×3 window are as follows: Figure 8 As shown, pixels x1, x2, ..., x8 constitute the eight adjacent points of p, which are uniformly represented by N(p). Among them, x1, x3, x5, x7 are the four adjacent points of p. i To represent pixels and their values 0 or 1, when x i When the value is 0, it is called a white pixel; when the value is 1, it is called a black pixel. The number of black pixels in N(p) is represented by b(p). i+1 It is y i (i=1,2,3,…,n−1)8-(or 4-) adjacent points, then the point sequence y1,y2,…,y nThis is called an 8-path (4-path). For a subset Q of an image P, if for every pair of points x, y in Q, there exists an 8- (or 4-)path from x to y consisting of points in Q, then Q is said to be 8- (or 4-)connected. In this case, Q is considered an 8- (or 4-)component of P. The connectivity order of an image P refers to the number of components of its complement, P. If this order is 1, P is said to be simply connected; otherwise, P is considered multiply connected. If deleting a pixel p does not change the 8- (or 4-)connectivity of P, then the pixel can be deleted. Typically, a black pixel in the outline with at least one white 4-neighboring pixel is defined as a contour pixel. A black pixel in the outline without at least one white 4-neighboring pixel is called an interior point. If p is considered an endpoint and is retained when b(p) = 1, this is called the endpoint (or endpoint pixel) condition. Assume that the pixel p to be deleted satisfies all of the following properties: first, p is a black pixel; second, p is not an isolated or endpoint, that is, b(p)>2; third, p is a contour pixel, that is, p has at least one white 4-neighboring pixel. Based on the above conditions, we can conclude that when p is a single point in the image or the endpoint of a line in the image, the point in the image cannot be deleted; however, when p is used as a segmentation point, if deleting p does not increase the connected component, then point p can be deleted.
[0135] Based on the above fingerprint image processing method, this application also provides a fingerprint image processing device. Figure 9 The device is described in detail.
[0136] Figure 9 The structure block diagram of the fingerprint image processing device according to an embodiment of the present application is schematically shown.
[0137] like Figure 9 As shown, the fingerprint image processing device 800 of this embodiment includes an authorization acquisition module 810 , an image segmentation module 820 , an image enhancement module 830 , an image binarization module 840 and an image refinement module 850 .
[0138] The authorization acquisition module 810 is used to obtain the user's authorization for the input fingerprint image. In one embodiment, the authorization acquisition module 810 can be used to perform the operation S210 described above, which is not described in detail here. The image segmentation module 820 is used to segment the input fingerprint image using a Gaussian mixture model based on the expectation-maximization clustering algorithm after obtaining the user's authorization for the input fingerprint image, thereby obtaining a segmented fingerprint image. In one embodiment, the image segmentation module 820 can be used to perform the operation S220 described above, which is not described in detail here.
[0139] The image enhancement module 830 is used to enhance the segmented fingerprint image using a direction- and frequency-adaptive Gabor filter to obtain an enhanced fingerprint image, wherein the direction of the Gabor filter is determined by the local ridge direction of the fingerprint, and the frequency is determined by the local ridge frequency. In one embodiment, the image enhancement module 820 can be used to perform the operation S230 described above, which will not be repeated here.
[0140] The image binarization module 840 is used to perform binarization processing on the enhanced fingerprint image using a local threshold method to obtain a binarized fingerprint image. In one embodiment, the image binarization module 830 can be used to perform the operation S240 described above, which will not be repeated here.
[0141] The image thinning module 850 is used to process the binary fingerprint image using a sequential thinning algorithm, delete boundary pixels until a skeleton with a single pixel width is retained, and obtain a processed fingerprint image. In one embodiment, the image thinning module 850 can be used to perform the operation S250 described above, which will not be repeated here.
[0142] According to an embodiment of the present application, any multiple modules among the authorization acquisition module 810, image segmentation module 820, image enhancement module 830, image binarization module 840, and image refinement module 850 can be combined into a single module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in a single module. According to an embodiment of the present application, at least one of the authorization acquisition module 810, image segmentation module 820, image enhancement module 830, image binarization module 840, and image refinement module 850 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented in hardware or firmware by any other reasonable means of circuit integration or packaging, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, at least one of the authorization acquisition module 810, the image segmentation module 820, the image enhancement module 830, the image binarization module 840 and the image refinement module 850 can be at least partially implemented as a computer program module, which can perform corresponding functions when executed.
[0143] Figure 10 The block diagram schematically shows an electronic device suitable for implementing the fingerprint image processing method according to an embodiment of the present application.
[0144] like Figure 10As shown, an electronic device 900 according to an embodiment of the present application includes a processor 901, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 902 or programs loaded from a storage unit 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or related chipsets and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present application.
[0145] Various programs and data required for the operation of the electronic device 900 are stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 performs various operations of the method flow according to the embodiment of the present application by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to the embodiment of the present application by executing the programs stored in one or more memories.
[0146] According to an embodiment of the present application, electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to bus 904. Electronic device 900 may also include one or more of the following components connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or modem. Communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 910 as needed, so that computer programs read from the removable media can be installed into storage section 908 as needed.
[0147] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of this application is implemented.
[0148] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.
[0149] The embodiments of the present application also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is executed in a computer system, the program code is used to enable the computer system to implement the fingerprint image processing method provided in the embodiments of the present application.
[0150] The computer program executes the above functions defined in the system / device of the embodiment of the present application when the processor 901 executes the computer program. According to the embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0151] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0152] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the processor 901, the above-mentioned functions defined in the system of the embodiment of the present application are performed. According to the embodiment of the present application, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0153] According to an embodiment of the present application, the program code for executing the computer program provided by the embodiment of the present application can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0154] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0155] Those skilled in the art will appreciate that the features described in the various embodiments of this application may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in this application. In particular, the features described in the various embodiments of this application may be combined and / or coupled in various ways without departing from the spirit and teachings of this application. All such combinations and / or couplings fall within the scope of this application.
Claims
1. A fingerprint image processing method, characterized in that: The method comprises: Obtain user authorization to input fingerprint image; After obtaining the user's authorization for the input fingerprint image, the input fingerprint image is segmented using a Gaussian mixture model based on the expectation-maximization clustering algorithm to obtain a segmented fingerprint image; Enhance the segmented fingerprint image using a direction- and frequency-adaptive Gabor filter to obtain an enhanced fingerprint image, wherein the direction of the Gabor filter is determined by the fingerprint local ridge direction and the frequency is determined by the local ridge frequency; performing a binarization process on the enhanced fingerprint image using a local threshold method to obtain a binarized fingerprint image; and The binary fingerprint image is processed using a sequential thinning algorithm, and boundary pixels are deleted until a skeleton with a single pixel width is retained, thereby obtaining a processed fingerprint image.
2. The method according to claim 1, characterized in that The expectation maximization clustering algorithm includes an E step and an M step. The Gaussian mixture model based on the expectation maximization clustering algorithm is used to segment the input fingerprint image, including: Randomly sampling red, green, and blue values from the yellow, green, red, white, and purple regions of the fingerprint image to initialize the parameters of the Gaussian mixture model, including the mixing ratio, mean vector, and covariance matrix; Calculate the posterior probability of each pixel in the input fingerprint image belonging to each Gaussian component through step E; Update the parameters of the Gaussian mixture model in M steps to maximize the log-likelihood function; Iteratively executing the E step and the M step until the parameters converge or a maximum number of iterations is reached; The pixels are divided into foreground and background categories according to the posterior probability.
3. The method according to claim 1, characterized in that The step of enhancing the segmented fingerprint image by using a direction- and frequency-adaptive Gabor filter includes: Calculate the local ridge direction and local ridge frequency of the fingerprint image; determining a direction parameter of a Gabor filter according to the local ridge direction, and determining a frequency parameter of the Gabor filter according to the local ridge frequency; Based on the direction parameter and the frequency parameter, a two-dimensional Gabor filter is constructed, and a convolution operation is performed on the segmented fingerprint image to obtain an enhanced fingerprint image.
4. The method according to claim 3, characterized in that Calculate the local ridge direction and local ridge frequency of the fingerprint image, including: extracting fingerprint ridge spectrum features in the enhanced fingerprint image by wavelet transform; Calculating the gradient field of the enhanced fingerprint image in blocks, and fitting the local ridge direction using the least square method; The local ridge frequency is calculated according to the statistical characteristics of the ridge spacing in the fingerprint ridge spectrum characteristics.
5. The method according to claim 1, wherein The binarization process of the enhanced fingerprint image using a local threshold method includes: performing low-pass filtering on the enhanced fingerprint image to obtain a filtered image; Estimate the grayscale distribution of the background area and calculate the grayscale value of the background area by interpolating the adjacent background intensities; Dynamically adjust the threshold according to the grayscale value of the background area to convert the filtered image into a binary image; Performing morphological operations on the binary image to eliminate noise and holes; Connected region analysis is performed on the binary image after morphological operation to remove isolated areas and obtain a binary fingerprint image.
6. The method according to claim 1, wherein The step of processing the binary fingerprint image using a sequential thinning algorithm includes: Sequentially scanning the pixels of the binary fingerprint image, and gradually deleting the boundary pixels according to the connectivity conditions of the local neighborhood pixels; Iteratively perform the boundary pixel deletion operation until a skeleton with a single pixel width is retained to obtain the refined image; Deburring the thinned image to eliminate small branches; Connect the broken points of the image after burr removal and repair the broken fingerprint skeleton. The conditions for deleting pixels include that the pixels are black and are not isolated points or end points; and that deleting the pixels does not change the connectivity of the image.
7. The method according to claim 5, characterized in that The performing morphological operations on the binary image includes: Use opening operation to eliminate noise and small holes; Filling in the breaks in the fingerprint ridges using a closing operation; and The size of the structure elements for opening and closing operations is dynamically adjusted according to the resolution and noise level of the fingerprint image.
8. A fingerprint image processing device, characterized in that: The device comprises: Obtaining authorization module, used to obtain user authorization for inputting fingerprint image; An image segmentation module is used to segment the input fingerprint image using a Gaussian mixture model based on an expectation-maximization clustering algorithm after obtaining authorization from the user to input the fingerprint image, thereby obtaining a segmented fingerprint image; an image enhancement module, configured to enhance the segmented fingerprint image using a direction- and frequency-adaptive Gabor filter to obtain an enhanced fingerprint image, wherein the direction of the Gabor filter is determined by the direction of the local ridge of the fingerprint, and the frequency is determined by the local ridge frequency; an image binarization module, configured to perform binarization processing on the enhanced fingerprint image using a local threshold method to obtain a binarized fingerprint image; and The image thinning module is used to process the binary fingerprint image using a sequential thinning algorithm, delete boundary pixels until a skeleton with a single pixel width is retained, and obtain a processed fingerprint image.
9. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.