A method for segmenting a fingerprint image
By calculating the intensity and gradient field of fingerprint images, and combining histogram equalization under contrast constraints and methods for maximizing inter-class variance, the problem of distinguishing between effective and invalid regions in fingerprint image segmentation is solved, achieving high-precision fingerprint feature recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-23
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies struggle to effectively distinguish between valid and invalid regions in fingerprint image segmentation, resulting in low feature extraction accuracy and efficiency.
By calculating the intensity field and gradient field of the fingerprint image, a gradient threshold is set to initially segment the foreground and background. Then, the fingerprint image segmentation is optimized by combining histogram equalization under contrast-limited conditions and the method of maximizing inter-class variance.
It achieves accurate segmentation of fingerprint images, improves the accuracy of feature recognition and segmentation quality, and is applicable to fingerprint images of different qualities.
Smart Images

Figure CN116433705B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of fingerprint image processing, and in particular to a fingerprint image segmentation method. Background Technology
[0002] Fingerprints, the lines on a person's fingers, are formed by the unevenness of the skin at the tips of the fingers. These lines are arranged in a varied and orderly fashion, creating a wide variety of patterns. Furthermore, because everyone is different, and even the ten fingers of the same person exhibit significant differences in fingerprints, the advantages of using fingerprints for identification are numerous: they are difficult to forge, unlikely to be forgotten or lost, and highly practical.
[0003] However, not all parts of a captured fingerprint image are useful for subsequent processing. A fingerprint image can generally be divided into three parts: First, the background region, which contains no ridges or has very blurry ridges that are almost impossible to recover using algorithms; this is the invalid region. Second, the blurred region, where the fingerprint ridges are blurred but easily recoverable using algorithms; this is the valid region. Third, the foreground region, where the fingerprint ridges are very clear and continuous; this is also a valid region. Separating the invalid and valid regions in a fingerprint image is achieved through fingerprint image segmentation technology. This allows only the valid regions to be processed, ignoring the invalid regions, thus greatly improving the accuracy and efficiency of feature extraction.
[0004] Based on the above discussion, a fingerprint image segmentation method has been invented, which has high practical application value. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings and deficiencies of the prior art and propose a fingerprint image segmentation method. Based on the characteristics of fingerprint images, this method improves the extraction effect of fingerprint ridge regions and enhances the accuracy of fingerprint image segmentation range, thereby enabling more accurate fingerprint feature recognition.
[0006] To achieve the above objectives, the technical solution provided by this invention is: a fingerprint image segmentation method, comprising the following steps:
[0007] 1) For a single fingerprint image, image field modeling is performed. The intensity field of each pixel in the fingerprint image is calculated, and then the gradient field of each pixel in the fingerprint image is calculated. For each pixel, the gradient value is compared with a suitable gradient threshold. If the gradient value is greater than the threshold, the point is the foreground and is retained. Otherwise, if the gradient value is less than or equal to the threshold, the point is the background. In this way, the foreground and background are initially separated, and the foreground part obtained by the initial calculation is retained.
[0008] 2) Apply histogram equalization under contrast-limited conditions to process the foreground portion initially segmented after step 1);
[0009] 3) The image processed in step 2) is processed by maximizing the inter-class variance to complete the fingerprint image processing, output the fingerprint image, and realize the fingerprint image segmentation.
[0010] Furthermore, step 1) includes the following steps:
[0011] 1.1) Calculate the intensity field and gradient field of the fingerprint image, where V represents the intensity field of a pixel in the fingerprint image, and the intensity field represents the grayscale value of the image; The gradient field represents the gradient field of a pixel in the fingerprint image, which indicates the rate of change of grayscale values along the normal direction of the fingerprint ridges. The energy of the intensity field is measured using grayscale values. The intensity field of a fingerprint image is a quantity describing the brightness of a point on the fingerprint ridge; if the intensity field decreases, the fingerprint ridges become darker, and if the intensity field increases, the fingerprint ridges become brighter. Let f(x,y) represent the magnitude of the grayscale value at a point in the fingerprint image field, then the intensity field... The calculation formula is:
[0012]
[0013] The steepness of the raised fingerprint ridges is measured using the gradient field, and the direction of the normal to the fingerprint ridges is its direction. If we start from this point and use partial derivatives to process it, the partial derivative points in the direction of the steepest point. Then, as a vector, it represents the amplitude change of the field strength. Taking the partial derivative at a point (x, y) on the fingerprint ridge... This partial derivative refers to the gradient value at this point; the gradient vector at (x, y) is... Then the gradient field of the image is Remember G x (x,y) is the partial derivative in the x-direction at the point (x,y). The calculation formula is:
[0014] G x(x,y)=f(x+1,y)-f(x,y)
[0015] In the formula, f(x+1,y) refers to the gray value of the point with coordinates (x+1,y);
[0016] Remember G y (x,y) is the partial derivative in the y-direction at the point (x,y). The calculation formula is:
[0017] G y (x,y)=f(x,y+1)-f(x,y)
[0018] In the formula, f(x,y+1) refers to the gray value of the point with coordinates (x,y+1);
[0019] The gradient value |T(x,y)| at the point (x,y) is calculated using the following formula:
[0020]
[0021] This allows us to obtain the gradient value at each point in the fingerprint image.
[0022] 1.2) Based on the gradient value of the entire fingerprint image calculated by the method in step 1.1), set an appropriate gradient threshold and compare it with the calculated gradient value. Because the background area of the fingerprint image has a uniform color and no black and white intervals, the gradient is small, while the foreground area has a large gradient due to the black and white intervals of the ridges. The choice of this threshold is related to the image quality. When the quality is good, a threshold of 35 is selected, but for the average quality, the threshold is set to 50. Perform image segmentation according to the threshold. Assuming the segmentation threshold is Y, if |T(x,y)|>Y, then it means that point (x,y) belongs to the foreground part of the fingerprint image. If |T(x,y)|≤Y, then it means that point (x,y) belongs to the background part of the fingerprint image. Remove the background part from the image to obtain the foreground image after preliminary segmentation.
[0023] Furthermore, the foreground image after preliminary segmentation is processed using a contrast-limited histogram equalization method. Step 2) includes the following steps:
[0024] 2.1) First, the original fingerprint image grayscale is divided into b equal-sized, non-overlapping sub-blocks;
[0025] 2.2) Distribute the number of pixels in each sub-block equally among the corresponding gray levels of the sub-block to obtain the average number of pixels N allocated to each gray level. average The calculation formula is:
[0026]
[0027] In the formula, n x This refers to the number of pixels in the x-direction of the sub-block, n. y N refers to the number of pixels in the y-direction of the sub-block. g This refers to the number of gray levels contained in the sub-block;
[0028] 2.3) The grayscale histogram of each sub-block is segmented using a threshold T. The formula for calculating the threshold T is:
[0029] T = βN average
[0030] In the formula, β is the cutoff factor, and the threshold T cannot exceed N. average β times;
[0031] The number of excess pixels obtained from cropping is evenly distributed among the other gray levels, resulting in the number N of pixels allocated to each gray level. e The calculation formula is:
[0032]
[0033] In the formula, S refers to the total number of pixels captured;
[0034] Let G(i) represent the number of pixels corresponding to the i-th gray level in the image before pixel allocation, and let R represent the lower threshold, which is calculated using the following formula:
[0035] R = TN e
[0036] If G(i) > T, then G(i) = T; if R < G(i) ≤ T, then G(i) = T; if G(i) ≤ R, then the value of G(i) is increased by N. e ;
[0037] After the above allocation is completed, there will be some unmatched pixels. These pixels can be evenly distributed to gray levels that are still less than T. The allocation is repeated until the remaining pixels are 0.
[0038] 2.4) Perform histogram equalization on each sub-block after pixel redistribution. First, establish the probability density function P(q) of the image, calculated as follows:
[0039]
[0040] In the formula, q represents the gray level, H(q) represents the histogram function, and A0 represents the area of the fingerprint image;
[0041] Assume the probability density function of the image before transformation is P. r (r), the probability density function of the transformed image is P s(s), where r and s represent the gray levels before and after the conversion, respectively, and P s (s) and P r (r) has the following relation:
[0042]
[0043] In order for the probability density function of the transformed histogram to be 1, then the following must be satisfied: Then, integrating both sides of this equation with respect to r, we can obtain the cumulative distribution function (CDF) of the image, calculated as follows:
[0044]
[0045] Thus, the probability density function P s (s) satisfies P s (s)=1, 0≤s≤1;
[0046] Here, the grayscale value of the fingerprint image ranges from [0, 255]. However, the transformed random variable s, obtained through normalization, ranges from [0, 1]. Therefore, the random variable s needs to be multiplied by the maximum grayscale value of 255 to obtain the equalized grayscale value. Thus, the grayscale equalization conversion formula for discrete images is:
[0047]
[0048] In the formula, D B This represents the pixel value after histogram equalization, where z refers to the total number of gray levels, and H... i This refers to the number of pixels at the i-th gray level;
[0049] This histogram equalization method is used to process each sub-block of the fingerprint image separately;
[0050] 2.5) Bilinear interpolation is used to interpolate each point in the image. This is because if the value of each sub-block pixel is obtained solely through a mapping function transformation, the final image will exhibit a blocky effect. Therefore, to improve image quality, bilinear interpolation is used, with the center point of each sub-block serving as a reference point. The coordinates of the four reference points are Q... 11 (x1, y1), Q 12 (x1,y2), Q 21 (x2,y1), Q 22 (x2, y2), Q 11 Q represents the center point of the bottom left sub-block. 12 Q represents the center point of the top-left sub-block. 21 Q represents the center point of the bottom right sub-block. 22 This represents the center point of the top right sub-block. Assume point P is located at Q.11 Q 12 Q 21 Q 22 Inside the enclosed quadrilateral, let the coordinates of point P be (a, b). First, perform linear interpolation calculations in the x-direction. Assume R1 is Q. 11 and Q 21 If a point on the line has the same x-coordinate as point P, then the formula for calculating the pixel value f(R1) of point R1 is:
[0051]
[0052] Assume R2 is Q 12 and Q 22 If a point on the line has the same x-coordinate as point P, then the formula for calculating the pixel value f(R2) of point R2 is:
[0053]
[0054] Then, by interpolating in the y-direction, the formula for calculating the pixel value f(P) at point P is:
[0055]
[0056] Bilinear interpolation only applies to the center point of the surrounding four sub-blocks, meaning that there are four reference points for the pixels. For the pixels in the top left, bottom left, top right, and bottom right sub-blocks, only the mapping function of the sub-block is used for transformation. For the remaining sub-blocks, the two adjacent reference points are found for interpolation. This process is applied to the entire fingerprint image to eliminate the blockiness of the image.
[0057] Furthermore, using the method of maximizing inter-class variance, in step 3), we first assume that the threshold for foreground and background segmentation is denoted as T. o Let ω1 be the proportion of foreground pixels to the entire image, μ1 be the average gray level of the foreground pixels, ω2 be the proportion of background pixels to the entire image, μ2 be the average gray level of the background pixels, μ be the overall average gray level of the image, and Var be the inter-class variance. Assume the length of the entire image is M, the width is N, and the pixel values in the image are less than a threshold T. o The number of pixels is denoted as N1, and the pixel values in the image are greater than or equal to the threshold T. o Let N2 be the number of pixels, then the formula for calculating ω1 is:
[0058] ω1=N1 / (M×N)
[0059] The formula for calculating ω2 is:
[0060] ω2=N2 / (M×N)
[0061] Where N1+N2=M×N, ω1+ω2=1,
[0062] The formula for calculating μ is:
[0063] μ=ω1×μ1+ω2×μ2
[0064] The formula for calculating the inter-class variance Var is:
[0065] Var=ω1×(μ1-μ) 2 +ω2×(μ2-μ) 2
[0066] To maximize the value of the inter-class variance Var, for the threshold T o The threshold T that maximizes the inter-class variance Var is obtained by iterating through the range 0-255. o According to this threshold T o Traverse the fingerprint image. For each point in the fingerprint image, since the ridges are black and their pixel values are lower than the background area, if the pixel value of this point is greater than T... o If a point is considered part of the background, then it is determined if the pixel value of that point is less than or equal to T. o If the point is determined to be the foreground, after the fingerprint image is traversed, the fingerprint image is output, and finally the segmented fingerprint image is obtained.
[0067] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0068] 1. The fingerprint image output by this invention not only achieves accurate extraction of ridge information, but also achieves accurate segmentation of the foreground and background. This allows the invention to work better with existing fingerprint recognition algorithms, thereby achieving accurate segmentation of the foreground image in the preprocessing stage.
[0069] 2. This invention combines the gradient and grayscale information of the fingerprint image in the segmentation stage, which is more effective than using only one type of information for image segmentation.
[0070] 3. The segmentation scheme proposed in this invention is designed specifically for the characteristics of fingerprint images, and improves the quality of fingerprint image segmentation compared with other image segmentation methods.
[0071] 4. This invention is applicable to fingerprint images of different qualities obtained by different fingerprint acquisition devices, and has universality. Attached Figure Description
[0072] Figure 1 This is a flowchart of the method of the present invention.
[0073] Figure 2 This is a flowchart illustrating the specific steps of the method of the present invention.
[0074] Figure 3 This is an original fingerprint image used in the method of the present invention.
[0075] Figure 4 This is an image field modeling diagram of fingerprint ridges in the method of the present invention.
[0076] Figure 5 This is a gradient field angle modeling diagram of fingerprint image pixels in the method of the present invention.
[0077] Figure 6 for Figure 3 The result image after the fingerprint image is initially segmented using the gradient field according to the method of this invention.
[0078] Figure 7 This is a schematic diagram illustrating the distribution of cut pixels in the process of processing the foreground image after preliminary segmentation using the contrast-limited histogram equalization method in the method of the present invention, in which the number of redundant pixels obtained by cutting is evenly distributed to other gray levels.
[0079] Figure 8 This is a schematic diagram of bilinear interpolation coordinate modeling during the processing of the foreground image after preliminary segmentation using the contrast-limited histogram equalization method in the method of the present invention.
[0080] Figure 9 This is a schematic diagram illustrating the selection of reference points using bilinear interpolation during the processing of the foreground image after preliminary segmentation using the contrast-limited histogram equalization method in the method of this invention.
[0081] Figure 10 The method of the present invention uses histogram equalization under contrast-limited conditions to... Figure 6 The result after processing.
[0082] Figure 11 for Figure 3 Fingerprint image segmentation diagram after processing by the method of the present invention. Detailed Implementation
[0083] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0084] like Figures 1 to 11 As shown, this embodiment provides a fingerprint image segmentation method, including the following steps:
[0085] 1) such as Figure 3The image shown is an original fingerprint image. The fingerprint ridges are analyzed to model the image field. Then, the intensity field of each pixel in the fingerprint image is calculated, followed by the gradient field of each pixel. For each pixel, its gradient value is compared with a suitable gradient threshold. If the gradient value is greater than the threshold, the pixel is considered foreground and is retained. Otherwise, if the gradient value is less than or equal to the threshold, the pixel is considered background. This initially separates the foreground from the background, retaining the foreground portion obtained from the preliminary calculation. Specifically, the following steps are included:
[0086] 1.1) As Figure 4 As shown, the fingerprint image field is modeled, where V represents the intensity field of a pixel in the fingerprint image. R represents the gradient field of a pixel in the fingerprint image, and R represents the orientation of a pixel in the fingerprint image. Let f(x,y) represent the frequency of a pixel in the fingerprint image. Then, the intensity field and gradient field of the fingerprint image are calculated. The intensity field represents the magnitude of the grayscale value of the image, and the gradient field represents the rate of change of the grayscale value along the normal direction of the fingerprint ridges. The energy of the intensity field is measured using grayscale values. The intensity field of the fingerprint image is a quantity describing the brightness of a point on the fingerprint ridge. If the intensity field decreases, it means the fingerprint ridge is darker; if the intensity field increases, it means the fingerprint ridge is brighter. Let f(x,y) represent the magnitude of the grayscale value at a point in the fingerprint image field, then the intensity field... The calculation formula is:
[0087]
[0088] The steepness of the raised fingerprint ridges is measured using the gradient field, and the direction of the normal to the fingerprint ridges is its direction. If we start from this point and use partial derivatives to process it (because partial derivatives point in the steepest direction), then as a vector, it represents the amplitude change of the field strength. Taking the partial derivative at a point (x, y) on the fingerprint ridge... This partial differential refers to the gradient G at this point, such as... Figure 5 As shown, the gradient vector at (x,y) is Then the gradient field of the image is Remember G x (x,y) is the partial derivative in the x-direction at the point (x,y). like Figure 5 As shown, the calculation formula is:
[0089] G x (x,y)=f(x+1,y)-f(x,y)
[0090] Where f(x+1,y) refers to the gray value of the point with coordinates (x+1,y);
[0091] Remember G y (x,y) is the partial derivative in the y-direction at the point (x,y). like Figure 5 As shown, the calculation formula is:
[0092] G y (x,y)=f(x,y+1)-f(x,y)
[0093] Here, f(x,y+1) refers to the gray value of the point with coordinates (x,y+1);
[0094] The gradient value |T(x,y)| at the point (x,y) is calculated using the following formula:
[0095]
[0096] Taking a single pixel in an image as an example, if f(x,y)=7, f(x+1,y)=8, and f(x,y+1)=185, then what is the gradient value at that point?
[0097] This allows us to obtain the gradient value at each point in the fingerprint image.
[0098] 1.2) Based on the gradient value of the entire fingerprint image calculated using the method in step 1.1), a suitable gradient threshold is set and compared with the calculated gradient value. Because the background area of a fingerprint image usually has a uniform color without black and white intervals, the gradient is relatively small. However, the foreground area has a larger gradient due to the alternating black and white lines of the ridges. The choice of this threshold is related to the image quality. A threshold of 35 is chosen for high-quality images, but for average-quality images, a threshold of 50 is used. Image segmentation is performed according to the threshold. Assuming the segmentation threshold is Y, if |T(x,y)|>Y, then point (x,y) belongs to the foreground part of the fingerprint image; if |T(x,y)|≤Y, then point (x,y) belongs to the background part of the fingerprint image. The background part is removed from the image, thus obtaining the pre-segmented foreground image. Figure 6 As shown, the image quality is good at this point. A threshold of 35 is selected. Figure 3 Foreground image after initial segmentation.
[0099] 2) Apply contrast-limited histogram equalization to process the initially segmented foreground portion obtained after step 1). Specifically, this includes the following steps:
[0100] 2.1) First, the original fingerprint image, a 256×256 grayscale image, is divided into 1024 equal and non-overlapping sub-blocks;
[0101] 2.2) Distribute the number of pixels in each sub-block equally among the corresponding gray levels of the sub-block to obtain the average number of pixels N allocated to each gray level. average The calculation formula is:
[0102]
[0103] Where, n x This refers to the number of pixels in the x-direction of the sub-block, taking the value n. x =8,n y This refers to the number of pixels in the y-direction of the sub-block, taking the value n. y =8, N g This refers to the number of gray levels contained in the sub-block;
[0104] 2.3) The grayscale histogram of each sub-block is segmented using a threshold T. The formula for calculating the threshold T is:
[0105] T = βN average
[0106] Where β is the truncation limit factor, and the threshold T cannot exceed N. average β times;
[0107] The number of excess pixels obtained from cropping is evenly distributed among the other gray levels, resulting in the number N of pixels allocated to each gray level. e The calculation formula is:
[0108]
[0109] Where S refers to the total number of pixels captured;
[0110] Let G(i) represent the number of pixels corresponding to the i-th gray level in the image before pixel allocation, and let R represent the lower threshold, which is calculated using the following formula:
[0111] R = TN e
[0112] If G(i) > T, then G(i) = T; if R < G(i) ≤ T, then G(i) = T; if G(i) ≤ R, then the value of G(i) is increased by N. e ;
[0113] After the above allocation round, there will be some unmatched pixels. These pixels can be evenly distributed to gray levels that are still less than T, as illustrated in the diagram. Figure 7 As shown, the allocation is repeated cyclically until the remaining pixels are 0;
[0114] 2.4) Perform histogram equalization on each sub-block after pixel redistribution. First, establish the probability density function P(q) of the image, calculated as follows:
[0115]
[0116] In the formula, q represents the gray level, H(q) represents the histogram function, and A0 represents the area of the fingerprint image;
[0117] Assume the probability density function of the image before transformation is P. r (r), the probability density function of the transformed image is P s (s), where r and s represent the gray levels before and after the conversion, respectively, and P s (s) and P r (r) has the following relation:
[0118]
[0119] In order for the probability density function of the transformed histogram to be 1, then the following must be satisfied: Then, integrating both sides of this equation with respect to r, we can obtain the cumulative distribution function (CDF) of the image, calculated as follows:
[0120]
[0121] Thus, the probability density function P s (s) satisfies P s (s)=1, 0≤s≤1;
[0122] Here, the grayscale value of the fingerprint image ranges from [0, 255]. However, the transformed random variable s, obtained through normalization, ranges from [0, 1]. Therefore, the random variable s needs to be multiplied by the maximum grayscale value of 255 to obtain the equalized grayscale value. Thus, the grayscale equalization conversion formula for discrete images is:
[0123]
[0124] In the formula, D B This represents the pixel value after histogram equalization, where z refers to the total number of gray levels, and H... i This refers to the number of pixels at the i-th gray level;
[0125] This histogram equalization method is used to process each sub-block of the fingerprint image separately;
[0126] 2.5) Use bilinear interpolation to interpolate each point in the image, such as... Figure 8As shown, if the value of each sub-block pixel is obtained simply through the transformation of the mapping function, the final image will exhibit a blocky effect. Therefore, to improve image quality, bilinear interpolation is used, taking the center point of each sub-block as a reference point. The coordinates of the four reference points are Q... 11 (x1, y1), Q 12 (x1,y2), Q 21 (x2,y1), Q 22 (x2, y2), Q 11 Q represents the center point of the bottom left sub-block. 12 Q represents the center point of the top-left sub-block. 21 Q represents the center point of the bottom right sub-block. 22 This represents the center point of the top right sub-block. Assume point P is located at Q. 11 Q 12 Q 21 Q 22 Inside the enclosed quadrilateral, let the coordinates of point P be (a, b). First, perform linear interpolation calculations in the x-direction. Assume R1 is Q. 11 and Q 21 If a point on the line has the same x-coordinate as point P, then the formula for calculating the pixel value f(R1) of point R1 is:
[0127]
[0128] Assume R2 is Q 12 and Q 22 If a point on the line has the same x-coordinate as point P, then the formula for calculating the pixel value f(R2) of point R2 is:
[0129]
[0130] Then, by interpolating in the y-direction, the formula for calculating the pixel value f(P) at point P is:
[0131]
[0132] like Figure 9 As shown, bilinear interpolation only operates on the center point of the surrounding four sub-blocks, meaning it includes pixels with four reference points. Figure 9 The image shows the four central sub-blocks. For the pixels in the top-left, bottom-left, top-right, and bottom-right sub-blocks, only the mapping function of that sub-block is used for transformation. For the remaining sub-blocks, interpolation is performed using two adjacent reference points. The entire fingerprint image is processed to eliminate block artifacts. The image after step 2) is shown below. Figure 10 As shown.
[0133] 3) The image after step 2) is processed using the method of maximizing inter-class variance to complete the fingerprint image processing, output the fingerprint image, and realize fingerprint image segmentation. Specifically, it includes the following steps:
[0134] First, let's assume the threshold for foreground and background segmentation is denoted as T. o Let ω1 be the proportion of foreground pixels to the entire image, μ1 be the average gray level of the foreground pixels, ω2 be the proportion of background pixels to the entire image, μ2 be the average gray level of the background pixels, μ be the overall average gray level of the image, and Var be the inter-class variance. Assume the length of the entire image is M, the width is N, and the pixel values in the image are less than a threshold T. o The number of pixels is denoted as N1, and the pixel values in the image are greater than or equal to the threshold T. o Let N2 be the number of pixels, then the formula for calculating ω1 is:
[0135] ω1=N1 / (M×N)
[0136] The formula for calculating ω2 is:
[0137] ω2=N2 / (M×N)
[0138] Where N1+N2=M×N, ω1+ω2=1,
[0139] The formula for calculating μ is:
[0140] μ=ω1×μ1+ω2×μ2
[0141] The formula for calculating the inter-class variance Var is:
[0142] Var=ω1×(μ1-μ) 2 +ω2×(μ2-μ) 2
[0143] To maximize the value of the inter-class variance Var, for the threshold T o The threshold T that maximizes the inter-class variance Var is obtained by iterating through the range 0-255. o ,like Figure 10 As shown, the threshold is T o =111, based on this threshold T o Traverse the fingerprint image. For each point in the fingerprint image, since the ridges are black and their pixel values are lower than the background area, if the pixel value of this point is greater than T... o If a point is considered part of the background, then it is determined if the pixel value of that point is less than or equal to T. o If this point is determined to be the foreground, after the fingerprint image traversal is completed, the fingerprint image is output, and finally the segmented fingerprint image is obtained, as shown below. Figure 11 As shown.
[0144] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A fingerprint image segmentation method, characterized in that, Includes the following steps: 1) For a single fingerprint image, image field modeling is performed. The intensity field of each pixel in the fingerprint image is calculated, and then the gradient field of each pixel in the fingerprint image is calculated. For each pixel, the gradient value is compared with a suitable gradient threshold. If the gradient value is greater than the threshold, the point is the foreground and is retained. Otherwise, if the gradient value is less than or equal to the threshold, the point is the background. In this way, the foreground and background are initially separated, and the foreground part obtained by the initial calculation is retained. 2) Apply contrast-limited histogram equalization to process the initially segmented foreground portion obtained after step 1), including the following steps: 2.1) First, the original fingerprint image grayscale is divided into b equal-sized, non-overlapping sub-blocks; 2.2) Distribute the number of pixels in each sub-block equally among the corresponding gray levels of the sub-block to obtain the average number of pixels N allocated to each gray level. average The calculation formula is: In the formula, n x This refers to the number of pixels in the x-direction of the sub-block, n. y N refers to the number of pixels in the y-direction of the sub-block. g This refers to the number of gray levels contained in the sub-block; 2.3) The grayscale histogram of each sub-block is segmented using a threshold T. The formula for calculating the threshold T is: T=βN average In the formula, β is the cutoff factor, and the threshold T cannot exceed N. average β times; The number of excess pixels obtained from cropping is evenly distributed among the other gray levels, resulting in the number N of pixels allocated to each gray level. e The calculation formula is: In the formula, S refers to the total number of pixels captured; Let G(i) represent the number of pixels corresponding to the i-th gray level in the image before pixel allocation, and let R represent the lower threshold, which is calculated using the following formula: R=T-N e If G(i) > T, then G(i) = T; if R < G(i) ≤ T, then G(i) = T; if G(i) ≤ R, then the value of G(i) is incremented by N e ; After the above allocation is completed, there will be some unmatched pixels. These pixels can be evenly distributed to gray levels that are still less than T. The allocation is repeated until the remaining pixels are 0. 2.4) Perform histogram equalization on each sub-block after pixel redistribution. First, establish the probability density function P(q) of the image, calculated as follows: In the formula, q represents the gray level, H(q) represents the histogram function, and A0 represents the area of the fingerprint image; Assume the probability density function of the image before transformation is P. r (r), the probability density function of the transformed image is P s (s), where r and s represent the gray levels before and after the conversion, respectively, and P s (s) and P r (r) has the following relation: In order for the probability density function of the transformed histogram to be 1, then the following must be satisfied: Then, integrating both sides of this equation with respect to r, we can obtain the cumulative distribution function (CDF) of the image, calculated as follows: Thus, the probability density function P s (s) satisfies P s (s)=1, 0≤s≤1; Here, the grayscale value of the fingerprint image ranges from [0, 255]. However, the transformed random variable s, obtained through normalization, ranges from [0, 1]. Therefore, the random variable s needs to be multiplied by the maximum grayscale value of 255 to obtain the equalized grayscale value. Thus, the grayscale equalization conversion formula for discrete images is: In the formula, D B This represents the pixel value after histogram equalization, where z refers to the total number of gray levels, and H... i This refers to the number of pixels at the i-th gray level; This histogram equalization method is used to process each sub-block of the fingerprint image separately; 2.5) Bilinear interpolation is used to interpolate each point in the image. This is because if the value of each sub-block pixel is obtained solely through a mapping function transformation, the final image will exhibit a blocky effect. Therefore, to improve image quality, bilinear interpolation is used, with the center point of each sub-block serving as a reference point. The coordinates of the four reference points are Q... 11 (x1, y1), Q 12 (x1,y2), Q 21 (x2,y1), Q 22 (x2, y2), Q 11 Q represents the center point of the bottom left sub-block. 12 Q represents the center point of the top-left sub-block. 21 Q represents the center point of the bottom right sub-block. 22 This represents the center point of the top right sub-block. Assume point P is located at Q. 11 Q 12 Q 21 Q 22 Inside the enclosed quadrilateral, let the coordinates of point P be (a, b). First, perform linear interpolation calculations in the x-direction. Assume R1 is Q. 11 and Q 21 If a point on the line has the same x-coordinate as point P, then the formula for calculating the pixel value f(R1) of point R1 is: Assume R2 is Q 12 and Q 22 If a point on the line has the same x-coordinate as point P, then the formula for calculating the pixel value f(R2) of point R2 is: Then, by interpolating in the y-direction, the formula for calculating the pixel value f(P) at point P is: Bilinear interpolation only applies to the center point of the surrounding four sub-blocks, that is, the pixels containing four reference points. For the pixels in the top left, bottom left, top right, and bottom right sub-blocks, only the mapping function of the sub-block is used for transformation. For the remaining sub-blocks, the two adjacent reference points are found for interpolation. This process is applied to the entire fingerprint image to eliminate the block effect. 3) The image processed in step 2) is processed by maximizing the inter-class variance to complete the fingerprint image processing, output the fingerprint image, and realize the fingerprint image segmentation.
2. The fingerprint image segmentation method according to claim 1, characterized in that, Step 1) includes the following steps: 1.1) Calculate the intensity field and gradient field of the fingerprint image, where V represents the intensity field of a pixel in the fingerprint image, and the intensity field represents the grayscale value of the image; The gradient field represents the gradient field of a pixel in the fingerprint image, which indicates the rate of change of grayscale values along the normal direction of the fingerprint ridges. The energy of the intensity field is measured using grayscale values. The intensity field of a fingerprint image is a quantity describing the brightness of a point on the fingerprint ridge; if the intensity field decreases, the fingerprint ridges become darker, and if the intensity field increases, the fingerprint ridges become brighter. Let f(x,y) represent the magnitude of the grayscale value at a point in the fingerprint image field, then the intensity field... The calculation formula is: The steepness of the raised fingerprint ridges is measured using the gradient field, and the direction of the normal to the fingerprint ridges is its direction. If we start from this point and use partial derivatives to process it, the partial derivative points in the direction of the steepest point. Then, as a vector, it represents the amplitude change of the field strength. Taking the partial derivative at a point (x, y) on the fingerprint ridge... This partial derivative refers to the gradient value at this point; the gradient vector at (x, y) is... Then the gradient field of the image is Remember G x (x,y) is the partial derivative in the x-direction at the point (x,y). The calculation formula is: G x (x,y)=f(x+1,y)-f(x,y) In the formula, f(x+1,y) refers to the gray value of the point with coordinates (x+1,y); Remember G y (x,y) is the partial derivative in the y-direction at the point (x,y). The calculation formula is: G y (x,y)=f(x,y+1)-f(x,y) In the formula, f(x,y+1) refers to the gray value of the point with coordinates (x,y+1); The gradient value |T(x,y)| at the point (x,y) is calculated using the following formula: This allows us to obtain the gradient value at each point in the fingerprint image. 1.2) Based on the gradient value of the entire fingerprint image calculated by the method in step 1.1), set an appropriate gradient threshold and compare it with the calculated gradient value. Because the background area of the fingerprint image has a uniform color and no black and white intervals, the gradient is small, while the foreground area has a large gradient due to the black and white intervals of the ridges. The choice of this threshold is related to the image quality. When the quality is good, a threshold of 35 is selected, but for the average quality, the threshold is set to 50. Perform image segmentation according to the threshold. Assuming the segmentation threshold is Y, if |T(x,y)|>Y, then it means that point (x,y) belongs to the foreground part of the fingerprint image. If |T(x,y)|≤Y, then it means that point (x,y) belongs to the background part of the fingerprint image. Remove the background part from the image to obtain the foreground image after preliminary segmentation.
3. The fingerprint image segmentation method according to claim 2, characterized in that, Using the method of maximizing inter-class variance, in step 3), we first assume that the threshold for foreground and background segmentation is denoted as T. o Let ω1 be the proportion of foreground pixels to the entire image, μ1 be the average gray level of the foreground pixels, ω2 be the proportion of background pixels to the entire image, μ2 be the average gray level of the background pixels, μ be the overall average gray level of the image, and Var be the inter-class variance. Assume the length of the entire image is M, the width is N, and the pixel values in the image are less than a threshold T. o The number of pixels is denoted as N1, and the pixel values in the image are greater than or equal to the threshold T. o Let N2 be the number of pixels, then the formula for calculating ω1 is: ω1=N1 / (M×N) The formula for calculating ω2 is: ω2=N2 / (M×N) Where N1+N2=M×N, ω1+ω2=1, The formula for calculating μ is: μ=ω1×μ1+ω2×μ2 The formula for calculating the inter-class variance Var is: Var=ω1×(μ1-μ) 2 +ω2×(μ2-μ) 2 To maximize the value of the inter-class variance Var, for the threshold T o The threshold T that maximizes the inter-class variance Var is obtained by iterating through the range 0-255. o According to this threshold T o Traverse the fingerprint image. For each point in the fingerprint image, since the ridges are black and their pixel values are lower than the background area, if the pixel value of this point is greater than T... o If a point is considered part of the background, then it is determined if the pixel value of that point is less than or equal to T. o If the point is determined to be the foreground, after the fingerprint image is traversed, the fingerprint image is output, and finally the segmented fingerprint image is obtained.
Citation Information
Patent Citations
Fingerprint image splitting method
CN102208021A
Segmenting method of fingerprint image
CN103020953A