Fingerprint feature point acquisition methods, devices, electronic devices and storage media
By performing pixel value compensation, image block division and filtering on the fingerprint image, the ridges are directly tracked on the ridge-valley contrast enhancement map to obtain fingerprint feature points, which solves the problems of slow fingerprint feature point extraction and low accuracy in the existing technology. problem, improving extraction efficiency and accuracy.
Patent Information
- Application Number
- CN202210596333.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2042-05-30
AI Technical Summary
In existing fingerprint recognition technology, extracting feature points from larger fingerprint images consumes a lot of time, is slow and has low accuracy.
By obtaining the initial fingerprint foreground of the initial fingerprint image, compensation is performed according to the average pixel value of the preset neighborhood, dividing the image blocks, obtaining the gradient direction, and performing smoothing filtering and sharpening filtering in the gradient direction to obtain the ridge-valley contrast enhancement map. , traverse the pixels to determine the ridge tracking points, obtain key feature points, and thereby determine the fingerprint feature points.
It improves the extraction speed and accuracy of fingerprint feature points, reduces the impact of burrs, can better connect fractures, and enhances the ridge tracking effect.
Smart Images

Figure CN114913555B
Abstract
Description
Technical Field
[0001] The present application relates to the field of fingerprint recognition technology, and in particular to a fingerprint feature point acquisition method, device, electronic device and storage medium. Background Art
[0002] At present, fingerprint recognition technology is widely used in people's daily life and work because of the uniqueness of fingerprint features and their high security. Extracting fingerprint features is the key technology to realize fingerprint recognition. Currently, the main fingerprint features extracted are fingerprint endpoints and fingerprint cross points. For larger fingerprint images, feature extraction takes a long time, and the speed of extracting fingerprint feature points is relatively slow and the accuracy is relatively low. Summary of the invention
[0003] In order to solve the above technical problems, the embodiments of the present application provide a fingerprint feature point acquisition method, device, electronic device and storage medium.
[0004] In a first aspect, an embodiment of the present application provides a method for acquiring fingerprint feature points, the method comprising:
[0005] Acquire an initial fingerprint foreground of an initial fingerprint image, and compensate each pixel value of the initial fingerprint foreground according to an average pixel value of a preset neighborhood to obtain an enhanced fingerprint foreground;
[0006] Dividing the enhanced fingerprint foreground into a plurality of image blocks, and obtaining the gradient direction of each of the image blocks;
[0007] Performing smoothing filtering processing on each of the image blocks in the gradient direction of each of the image blocks and performing sharpening filtering processing in the target direction to obtain a plurality of ridge-valley contrast enhancement images, respectively, wherein the target direction is a direction perpendicular to the gradient direction of each of the image blocks;
[0008] Traversing the pixel points of each ridge-valley contrast enhancement image, determining a ridge line tracking point according to each traversed pixel point, and obtaining a key feature point of each ridge-valley contrast enhancement image according to the gradient direction of each image block and each ridge line tracking point;
[0009] The fingerprint feature points of the initial fingerprint image are determined according to the key feature points of each of the ridge-valley contrast enhancement images.
[0010] In one embodiment, the step of determining the ridge tracking point according to the traversed pixel points includes:
[0011] Taking the traversed pixel point as the center point, a pixel point set is obtained on the normal line corresponding to each pixel point;
[0012] Determine whether there is a target pixel in the pixel set, the pixel value of the target pixel is less than or equal to the pixel value of the adjacent previous pixel of the target pixel, and the pixel value of the target pixel is less than or equal to the pixel value of the adjacent next pixel of the target pixel;
[0013] If there is a target pixel point, then determine the target pixel point as the ridge line tracking point;
[0014] If there are at least two target pixel points, the target pixel point closest to the center point is determined from the at least two target pixel points as the ridge line tracking point.
[0015] In one embodiment, the key feature points include: ridge endpoints and ridge bifurcation points;
[0016] The step of obtaining the key feature points of each ridge-valley contrast enhancement image according to the gradient direction of each image block and each ridge line tracking point comprises:
[0017] Starting from each ridgeline tracking point according to the gradient direction of each image block, determining other tracking points from the ridgeline with a preset step length until the ridgeline endpoint is tracked;
[0018] The pixel points marked twice as tracking points determine the ridge line fork points.
[0019] In one embodiment, the fingerprint feature points include fingerprint endpoints and fingerprint fork points, and the step of determining the fingerprint feature points of the initial fingerprint image according to the key feature points of each ridge-valley contrast enhancement image includes:
[0020] Taking the ridgeline endpoints of each image block as the fingerprint endpoints of the initial fingerprint image;
[0021] The ridge fork point of each image block is used as the fingerprint fork point of the initial fingerprint image.
[0022] In one embodiment, the method further comprises:
[0023] If the pixel distance between the two fingerprint endpoints is less than or equal to the first preset pixel distance, and the direction errors of the two fingerprint endpoints are within a preset direction error range, the two fingerprint endpoints are determined to be fingerprint matching points.
[0024] In one embodiment, the method further comprises:
[0025] If the pixel distance between any two fingerprint feature points is less than or equal to the second preset pixel distance, the quality of each fingerprint feature point is calculated according to a plurality of pixel gradient values of each fingerprint feature point;
[0026] Delete the target feature point whose quality is less than or equal to the preset quality threshold among the two fingerprint feature points.
[0027] In one implementation, the step of obtaining the gradient direction of each of the image blocks includes:
[0028] Obtaining a first direction gradient vector and a second direction gradient vector of each of the image blocks;
[0029] The gradient direction of each image block is calculated according to the first direction gradient vector and the second direction gradient vector of each image block.
[0030] In a second aspect, an embodiment of the present application provides a fingerprint feature point acquisition device, the device comprising:
[0031] A compensation module, used for obtaining an initial fingerprint foreground of an initial fingerprint image, and compensating each pixel value of the initial fingerprint foreground according to an average pixel value of a preset neighborhood to obtain an enhanced fingerprint foreground;
[0032] An acquisition module, used for dividing the enhanced fingerprint foreground into a plurality of image blocks, and acquiring a gradient direction of each of the image blocks;
[0033] A filtering module, used to perform smoothing filtering processing on each of the image blocks in the gradient direction of each of the image blocks and sharpening filtering processing in the target direction to obtain a plurality of ridge-valley contrast enhancement images, wherein the target direction is a direction perpendicular to the gradient direction of each of the image blocks;
[0034] A traversal processing module, used to traverse the pixel points of each ridge-valley contrast enhancement image, determine the ridge tracking point according to each traversed pixel point, and obtain the key feature point of each ridge-valley contrast enhancement image according to the gradient direction of each image block and each ridge tracking point;
[0035] A determination module is used to determine the fingerprint feature points of the initial fingerprint image according to the key feature points of each ridge-valley contrast enhancement image.
[0036] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is run by the processor, the fingerprint feature point acquisition method provided in the first aspect is executed.
[0037] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which executes the fingerprint feature point acquisition method provided in the first aspect when running on a processor.
[0038] The fingerprint feature point acquisition method, device, electronic device and storage medium provided by the present application obtain an initial fingerprint foreground of an initial fingerprint image, compensate each pixel value of the initial fingerprint foreground according to the average pixel value of a preset neighborhood, and obtain an enhanced fingerprint foreground; divide the enhanced fingerprint foreground into multiple image blocks, and obtain the gradient direction of each image block; perform smoothing filtering processing on each image block in the gradient direction of each image block and sharpening filtering processing in the target direction, and obtain multiple ridge-valley contrast enhancement images respectively, wherein the target direction is a vertical direction perpendicular to the gradient direction of each image block; traverse the pixel points of each ridge-valley contrast enhancement image, determine the ridge line tracking point according to each traversed pixel point, and obtain the key feature points of each ridge-valley contrast enhancement image according to the gradient direction of each image block and each ridge line tracking point; determine the fingerprint feature points of the initial fingerprint image according to the key feature points of each ridge-valley contrast enhancement image. In this way, by directly tracing the ridge line in the ridge-valley contrast enhancement image, detecting key feature points on the ridge line, and determining the fingerprint feature points by the key feature points, it takes less time and can better avoid the influence of burrs. Due to the directional enhancement, the broken marks can be better connected, the ridge line tracking effect is better, and the accuracy of fingerprint feature point extraction is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and should not be regarded as limiting the scope of protection of the present application. In each of the drawings, similar components are numbered similarly.
[0040] Figure 1 A schematic diagram of a process of obtaining fingerprint feature points provided by an embodiment of the present application is shown;
[0041] Figure 2 A partial schematic diagram of a fingerprint image provided by an embodiment of the present application is shown;
[0042] Figure 3 Another partial schematic diagram of a fingerprint image provided by an embodiment of the present application is shown;
[0043] Figure 4 A schematic diagram of the structure of a fingerprint feature point acquisition device provided in an embodiment of the present application is shown.
[0044] Icons: 400 - fingerprint feature point acquisition device; 401 - compensation module; 402 - acquisition module; 403 - filtering module; 404 - traversal processing module; 405 - determination module; 301 - first fingerprint endpoint; 302 - second fingerprint endpoint. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0046] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0047] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing items.
[0048] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0049] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0050] Example 1
[0051] The disclosed embodiment provides a method for acquiring fingerprint feature points.
[0052] For details, see Figure 1 , the fingerprint feature point acquisition method includes:
[0053] Step S101, obtaining an initial fingerprint foreground of an initial fingerprint image, compensating each pixel value of the initial fingerprint foreground according to an average pixel value of a preset neighborhood, and obtaining an enhanced fingerprint foreground.
[0054] In this embodiment, the fingerprint image can be collected by the camera, and the collected fingerprint image can be filtered and denoised to obtain the initial fingerprint image after filtering and denoising. Specifically, the filtering and denoising process can include median filtering and / or mean filtering, or other filtering processing methods, as long as the noise signal can be removed, which is not limited here. In this way, the initial fingerprint image has less noise information, which can improve the clarity of the initial fingerprint image.
[0055] In this embodiment, the initial fingerprint foreground and the initial fingerprint background are obtained by segmenting the initial fingerprint image by judging the regional gradient. The initial fingerprint foreground is a foreground image containing a large amount of fingerprint information, and the initial fingerprint background is an image that does not contain fingerprint information. In this embodiment, the initial fingerprint foreground obtained by segmentation is selected for subsequent pixel value compensation processing. The preset neighborhoods can be 8 adjacent neighborhoods, and the adjacent 8 neighborhoods refer to 8 neighborhoods in which the second pixel value in the second row of the 3×3 pixel value array is the center value, and the other pixel values in the 3×3 pixel value array except the center value are the center pixel values. The average pixel value of the 8 neighborhoods is calculated, and the center value is supplemented according to the pixel difference between the average pixel value and the center value. The pixel value compensation processing is performed on each pixel value of the initial fingerprint foreground, thereby obtaining an enhanced fingerprint foreground.
[0056] In this way, by performing pixel compensation on each pixel value of the initial fingerprint foreground, an enhanced fingerprint foreground is obtained, so that the enhanced fingerprint foreground has clearer fingerprint lines.
[0057] Step S102: dividing the enhanced fingerprint foreground into a plurality of image blocks, and obtaining the gradient direction of each image block.
[0058] In one implementation, the step of obtaining the gradient direction of each image block in step S102 includes:
[0059] Obtaining a first direction gradient vector and a second direction gradient vector of each of the image blocks;
[0060] The gradient direction of each image block is calculated according to the first direction gradient vector and the second direction gradient vector of each image block.
[0061] In this embodiment, the enhanced fingerprint foreground may be divided into a plurality of image blocks according to a preset size, and the preset size may be determined based on empirical data. For example, the enhanced fingerprint foreground may be divided into image blocks with a size of w×w pixels, indicating that each image block is a pixel array with w rows and w columns, and the number of pixels is w×w. The following describes the calculation process of the gradient direction of each image block using the distance of an image block with w×w pixels.
[0062] First, the Sobel operator is used to find the gradient vector dx and the gradient vector dy in each image block. For example, the Sobel operator includes a horizontal operator S1 and a vertical operator S2. For example, the horizontal operator S1 and the vertical operator S2 can be determined by the following formulas 1 and 2 respectively;
[0063] Formula 1: Horizontal operator s1 = [-1, 0, 1; -2, 0, 2; -1, 0, 1];
[0064] Formula 2: Vertical operator s2 = [-1, -2, -1; 0, 0, 0; 1, 2, 1];
[0065] The horizontal gradient neighbor vx of each pixel in each image block is calculated according to the horizontal operator S1, and the vertical gradient vy of each pixel in each image block is calculated according to the vertical operator S2; the gradient vector of each image block is calculated according to the horizontal gradient neighbor vx and the vertical gradient vy of each pixel in each image block. Specifically, the gradient vector of each image block is calculated according to the following formula 3 and formula 4.
[0066] Formula 3:
[0067] Formula 4:
[0068] Wherein, dx represents the x-direction gradient vector of each image block; dy represents the y-direction gradient vector of each image block.
[0069] The square gradient vector of each image block is calculated according to the horizontal gradient neighbor vx and the vertical gradient vy of each pixel point in each image block. Specifically, the square gradient vector of each image block is calculated according to the following formula 6 and formula 7.
[0070] Formula 5: GX = 2 × dx × dy;
[0071] Formula 6: GY=dx 2 -dy 2 ;
[0072] Among them, GX and GY represent the square gradient vectors of each image block.
[0073] The gradient direction of each image block is calculated according to the square gradient vector of each image block. Specifically, the gradient direction of each image block is calculated according to the following formula 7.
[0074] Formula 7: θ=0.5×Arctan(GX / GY);
[0075] Among them, θ represents the gradient direction of each image block.
[0076] Step S103, performing smoothing filtering processing on each of the image blocks in the gradient direction of each of the image blocks and performing sharpening filtering processing in the target direction to obtain a plurality of ridge-valley contrast enhancement images, respectively, wherein the target direction is a direction perpendicular to the gradient direction of each of the image blocks.
[0077] For example, the smoothing filter can be: [4, 8, 16, 23, 26, 23, 16, 8, 4], and the sharpening filter can be: [-11, -19, 0, 53, 82, 53, 0, -19, -11]. The smoothing filter is used to perform smoothing filtering on the pixels of each image block according to the gradient direction of each image block, and the sharpening filter is used to perform sharpening filtering in a direction perpendicular to the gradient direction of each image block. The specific filtering method is: weighted calculation is performed on the pixels in the opposite direction by the smoothing filter and the sharpening filter, and each ridge and valley contrast enhancement map is obtained to increase the contrast of the ridge and valley.
[0078] Step S104, traversing the pixel points of each of the ridge-valley contrast enhancement images, determining ridge line tracking points according to the traversed pixel points, and obtaining key feature points of each of the ridge-valley contrast enhancement images according to the gradient direction of each of the image blocks and each of the ridge line tracking points.
[0079] In one embodiment, the step of determining the ridge tracking point according to each traversed pixel point in step S104 includes:
[0080] Taking the traversed pixel point as the center point, a pixel point set is obtained on the normal line corresponding to each pixel point;
[0081] Determine whether there is a target pixel in the pixel set, the pixel value of the target pixel is less than or equal to the pixel value of the adjacent previous pixel of the target pixel, and the pixel value of the target pixel is less than or equal to the pixel value of the adjacent next pixel of the target pixel;
[0082] If there is a target pixel point, then determine the target pixel point as the ridge line tracking point;
[0083] If there are at least two target pixel points, the target pixel point closest to the center point is determined from the at least two target pixel points as the ridge line tracking point.
[0084] See also Figure 2 , Figure 2 The figure shows the schematic diagram of the ridge-valley contrast enhancement image. Figure 2 The local schematic diagram first Figure 2 The ridge-valley contrast enhancement image shown in the figure traverses each pixel point from left to right and from top to bottom, and determines whether the traversed pixel point is a point on the ridge line, that is, determines whether the traversed pixel point is a ridge line tracking point. Figure 2 The traversal process is described.
[0085] like Figure 2 As shown, let pixel point s be the pixel point traversed in the ridge-valley contrast enhancement image. Since the ridge width is generally 8-16 pixels, assume that pixel point s is traversed at this time, and the gradient direction of pixel point s is determined according to the gradient direction of each image block, and the normal d1 perpendicular to the gradient direction of pixel point s is determined. In the normal d1, pixel point s is taken as the center point and pixels within the preset radius are selected to generate the pixel point set x[i]. For example, the preset radius range is 9 pixel points, that is, with pixel point s as the center point, 18 pixel points are selected in sequence along the normal d1 to obtain the pixel point set x[i], i=1~18.
[0086] For each pixel point in the pixel point set x[i], specifically, for the 18 pixel points x[i], the pixel values of the pixel point set x[i] are traversed by Gaussian filtering, and it is determined whether there is a pixel value that meets the following conditions in the pixel point set x[i], i=1~18: x[i]<=x[i-1] and x[i]<=x[i+1], x[i] represents the pixel value of the pixel point i, x[i-1] represents the pixel value of the adjacent previous pixel point of the pixel point i, and x[i+1] represents the pixel value of the adjacent next pixel point of the pixel point i. If there is a pixel point that meets the above conditions, the pixel point i that meets the above conditions is determined as the target pixel point. If the number of target pixel points is one pixel point 8, the 8 pixel point 8 is determined as the ridge tracking point p1. If the number of target pixels is at least two, for example, pixel 3 and pixel 7 meet the above conditions, then the pixel closest to pixel s among pixel 3 and pixel 7 is determined as the ridge tracking point. If the distance between pixel 3 and pixel s is the shortest, pixel 3 is determined as ridge tracking point p1. If the above conditions are not met, it cannot be determined that the ridge tracking point has been found, and the above judgment operation is continued for the pixel next to pixel s.
[0087] In one embodiment, the step of acquiring the key feature points of each ridge-valley contrast enhancement image according to the gradient direction of each image block and each ridge tracking point in step S104 includes:
[0088] Determine the direction of each ridge tracking point according to the gradient direction of each image block, and select candidate points from the ridge tracking point according to the direction of each ridge tracking point according to a preset pixel step size;
[0089] Determine whether the candidate point is the next ridge tracking point;
[0090] If the candidate point is the next ridge tracking point, the ridge is marked according to the ridge tracking point and the next ridge tracking point, and the next ridge tracking point is tracked in sequence until the next ridge tracking point cannot be determined, and the last ridge tracking point of the ridge is used as the ridge endpoint.
[0091] For example, if pixel point p1 is a ridge tracking point, the direction of pixel point p1 is determined according to the gradient direction of the directional map where pixel point p1 is located. According to the direction of pixel point p1, tracking is performed from pixel point p1 according to a preset pixel step size. For example, the preset pixel step size d is 3 pixels. According to the direction of pixel point p1, starting from pixel point p1, a pixel point p2 is selected at intervals of 3 pixels along the direction of pixel point p1 to determine whether pixel point p2 is a ridge tracking point. If pixel point p2 is a ridge tracking point, the ridge is marked according to pixel point p1 and pixel point p2, and the ridge is tracked in sequence until the ridge can no longer be marked. Figure 2 In the process, the last ridge tracking point of the ridge is determined as the ridge endpoint E. If the ridge tracking point is marked at least twice, the ridge tracking point marked at least twice is marked as the ridge fork F.
[0092] Combination Figure 2 , when traversing and determining the ridge tracking point, if the pixel point s is determined as the ridge tracking point, then according to the direction of the pixel point s, that is, in Figure 2 The ridge line is traced in the direction of d1 to the last pixel E, and the ridge line is marked. Then, starting from pixel s, the ridge line is traced in the opposite direction of d1, that is, the ridge line is traced in the direction of d2 to the last pixel T, and the ridge line is marked. At this point, all the ridges where pixel s is located are marked. Therefore, when traversing and determining the ridge line points, if a pixel point has been marked as a ridge line tracking point when tracing the ridge line before, there is no need to repeat the ridge line determination for the pixel point marked as the ridge line tracking point.
[0093] In this embodiment, the direction of the ridge fork can be determined according to the following steps: taking the ridge fork as the center, determining an auxiliary circle according to a preset pixel radius, wherein the auxiliary circle intersects with the corresponding three ridges at three intersection points respectively;
[0094] Connect each of the intersection points with the center of the circle to form three angles, determine the acute angle among the three angles, and determine the direction indicated by the angle bisector of the acute angle as the direction of the fork point.
[0095] For example, the preset pixel radius may be a circle with a radius of 20 pixels.
[0096] In one embodiment, the key feature points include: ridge endpoints and ridge fork points; the step of obtaining the key feature points of each ridge-valley contrast enhancement image according to the gradient direction of each image block and each ridge tracking point in step S104 includes:
[0097] Starting from each ridgeline tracking point according to the gradient direction of each image block, determining other tracking points from the ridgeline with a preset step length until the ridgeline endpoint is tracked;
[0098] The pixel points marked twice as tracking points determine the ridge line fork points.
[0099] Step S105, determining fingerprint feature points of the initial fingerprint image according to the key feature points of each of the ridge-valley contrast enhancement images.
[0100] In one embodiment, the fingerprint feature points include fingerprint endpoints and fingerprint fork points, and step S105 includes the following steps:
[0101] Taking the ridgeline endpoints of each image block as the fingerprint endpoints of the initial fingerprint image;
[0102] The ridge fork point of each image block is used as the fingerprint fork point of the initial fingerprint image.
[0103] Compared with the existing fingerprint feature extraction schemes that require peeling off layers layer by layer to obtain the skeleton and then tracking the ridges, this embodiment directly tracks the ridges on the ridge and valley contrast enhanced map, which consumes less time; compared with the existing fingerprint feature extraction schemes in which the refinement map has high requirements for image enhancement, binarization, and refinement, otherwise there will be voids, burrs and other pseudo feature points, this embodiment provides ridge line tracking on the ridge and valley contrast enhanced map, which better avoids the influence of burrs in the refinement map, and due to directional enhancement and better connection of broken marks, the ridge line tracking can be better tracked through pixel value differences.
[0104] In one embodiment, the fingerprint feature point acquisition method further includes:
[0105] If the pixel distance between the two fingerprint endpoints is less than or equal to the first preset pixel distance, and the direction errors of the two fingerprint endpoints are within a preset direction error range, the two fingerprint endpoints are determined to be fingerprint matching points.
[0106] In this embodiment, the first preset pixel distance is a custom setting value, which can be personalized according to different fingerprint images, and the first preset pixel distance can be 7-13 pixels. In a special case, if the pixel distance between the two fingerprint endpoints is less than or equal to the first preset pixel distance, and the directions of the two fingerprint endpoints are the same, the two fingerprint endpoints are determined to be fingerprint end points.
[0107] See also Figure 3 , the first fingerprint endpoint 301 and the second fingerprint endpoint 302 are fingerprint counterparts.
[0108] In one embodiment, the fingerprint feature point acquisition method further includes:
[0109] If the pixel distance between any two fingerprint feature points is less than or equal to the second preset pixel distance, the quality of each fingerprint feature point is calculated according to a plurality of pixel gradient values of each fingerprint feature point;
[0110] Delete the target feature point whose quality is less than or equal to the preset quality threshold among the two fingerprint feature points.
[0111] It should be noted that the second preset pixel distance is a custom value, for example, the second preset pixel distance may be 4 pixels.
[0112] In this embodiment, the step of calculating the quality of each fingerprint feature point according to the multiple pixel gradient values of each fingerprint feature point may include the following steps:
[0113] Determine multiple gradient directions of each of the fingerprint feature points, obtain the difference values of each of the fingerprint feature points in each of the gradient directions, calculate the difference mean based on the difference values in each of the gradient directions; determine the quality of each of the fingerprint feature points based on the difference values and the difference mean in each of the gradient directions.
[0114] For example, if the fingerprint feature point is pixel point P0, then with pixel point p0 as the center point, a 3×3 pixel array is determined, and the 3×3 pixel array can be expressed as [p4, p5, p6; p1, p0, p2; p7, p8, p9], where p4 represents the pixel point in the 1st row and 1st column, p5 represents the pixel point in the 1st row and 2nd column, and p6 represents the pixel point in the 1st row and 3rd column; p1 represents the pixel point in the 2nd row and 1st column, p0 represents the pixel point in the 2nd row and 2nd column, and p2 represents the pixel point in the 2nd row and 3rd column; p7 represents the pixel point in the 3rd row and 1st column, p8 represents the pixel point in the 3rd row and 2nd column, and p9 represents the pixel point in the 3rd row and 3rd column. The difference values in the up-down direction, left-right direction, upper left to lower right direction, and upper right to lower left direction are calculated respectively, and the specific values can be determined according to formulas 8-11.
[0115] Formula 8: dx1=abs(p0-p1)+abs(p0-p2);
[0116] Formula 9: dy1 = abs(p0-p5)+abs(p0-p8);
[0117] Formula 10: dm1=abs(p0-p4)+abs(p0-p9);
[0118] Formula 11: dn1=abs(p0-p6)+abs(p0-p2);
[0119] Among them, abs means taking the absolute value, dx1 means the difference value in the up and down direction, dy1 means the difference value in the left and right direction, dm1 means the difference value from the upper left to the lower right direction, and dn1 means the difference value from the upper right to the lower left direction.
[0120] According to formula 12, the mean difference values in the up-down direction, the left-right direction, the upper left to the lower right direction, and the upper right to the lower left direction are calculated.
[0121] Formula 12: mean=(dx1+dy1+dm1+dn1) / 4;
[0122] Among them, mean represents the difference mean, dx1 represents the difference value in the up-down direction, dy1 represents the difference value in the left-right direction, dm1 represents the difference value from the upper left to the lower right, and dn1 represents the difference value from the upper right to the lower left.
[0123] The quality of each fingerprint feature point is determined according to formula 12.
[0124] Formula 12:
[0125] Q=50×((|dx1-mean|+|dy1-mean|+|dm1-mean|+|dn1-mean|) / mean)
[0126] Wherein, Q represents the quality of each fingerprint feature point, mean represents the mean difference, dx1 represents the difference value in the up-down direction, dy1 represents the difference value in the left-right direction, dm1 represents the difference value in the upper left to lower right direction, dn1 represents the difference value in the upper right to lower left direction, and the “||” in Formula 12 represents the absolute value symbol. For example, |dx1-mean| represents the absolute value of the error between the difference value in the left-right direction and the mean difference, |dy1-mean| represents the absolute value of the error between the difference value in the left-right direction and the mean difference, |dm1-mean| represents the absolute value of the error between the difference value in the upper left to lower right direction and the mean difference, and |dn1-mean| represents the absolute value of the error between the difference value in the upper right to lower left direction and the mean difference.
[0127] In this embodiment, the greater the quality of the fingerprint feature point, the better the fingerprint feature point, and the smaller the quality of the fingerprint feature point, the worse the fingerprint feature point. The preset quality threshold can be determined based on experience, for example, the preset quality threshold can be 10. The fingerprint feature points less than or equal to the preset quality threshold of 10 are regarded as poor fingerprint feature points, and the fingerprint feature points greater than the preset quality threshold of 10 are regarded as good fingerprint feature points. The poor fingerprint feature points are deleted, and the good fingerprint features are retained to improve the quality of the fingerprint feature points.
[0128] The fingerprint feature point acquisition method provided in the present embodiment obtains an initial fingerprint foreground of an initial fingerprint image, compensates each pixel value of the initial fingerprint foreground according to the average pixel value of a preset neighborhood, and obtains an enhanced fingerprint foreground; divides the enhanced fingerprint foreground into multiple image blocks, and obtains the gradient direction of each image block; performs smoothing filtering processing on each image block in the gradient direction of each image block and sharpening filtering processing in the target direction, and obtains multiple ridge-valley contrast enhancement images, respectively, wherein the target direction is a vertical direction perpendicular to the gradient direction of each image block; traverses the pixel points of each ridge-valley contrast enhancement image, determines the ridge line tracking point according to each traversed pixel point, and obtains the key feature points of each ridge-valley contrast enhancement image according to the gradient direction of each image block and each ridge line tracking point; and determines the fingerprint feature points of the initial fingerprint image according to the key feature points of each ridge-valley contrast enhancement image. In this way, by directly tracing the ridge line in the ridge-valley contrast enhancement image, detecting key feature points on the ridge line, and determining the fingerprint feature points by the key feature points, it takes less time and can better avoid the influence of burrs. Due to the directional enhancement, the broken marks can be better connected, the ridge line tracking effect is better, and the accuracy of fingerprint feature point extraction is improved.
[0129] Example 2
[0130] In addition, an embodiment of the present disclosure provides a fingerprint feature point acquisition device.
[0131] For details, see Figure 4 , the fingerprint feature point acquisition device 400 includes:
[0132] The compensation module 401 is used to obtain an initial fingerprint foreground of an initial fingerprint image, and to compensate each pixel value of the initial fingerprint foreground according to an average pixel value of a preset neighborhood to obtain an enhanced fingerprint foreground;
[0133] An acquisition module 402 is used to divide the enhanced fingerprint foreground into a plurality of image blocks and acquire a gradient direction of each of the image blocks;
[0134] A filtering module 403 is used to perform a smoothing filtering process on each of the image blocks in a gradient direction and a sharpening filtering process in a target direction to obtain a plurality of ridge-valley contrast enhancement images, wherein the target direction is a direction perpendicular to the gradient direction of each of the image blocks;
[0135] A traversal processing module 404 is used to traverse the pixel points of each ridge-valley contrast enhancement image, determine the ridge tracking point according to each traversed pixel point, and obtain the key feature point of each ridge-valley contrast enhancement image according to the gradient direction of each image block and each ridge tracking point;
[0136] The determination module 405 is used to determine the fingerprint feature points of the initial fingerprint image according to the key feature points of each of the ridge-valley contrast enhancement images.
[0137] In one embodiment, the traversal processing module 404 is further used to obtain a pixel point set on a normal line corresponding to each pixel point with the traversed pixel point as a center point;
[0138] Determine whether there is a target pixel in the pixel set, the pixel value of the target pixel is less than or equal to the pixel value of the adjacent previous pixel of the target pixel, and the pixel value of the target pixel is less than or equal to the pixel value of the adjacent next pixel of the target pixel;
[0139] If there is a target pixel point, then determine the target pixel point as the ridge line tracking point;
[0140] If there are at least two target pixel points, the target pixel point closest to the center point is determined from the at least two target pixel points as the ridge line tracking point.
[0141] In one embodiment, the key feature points include: a ridge endpoint and a ridge fork; the traversal processing module 404 is further configured to start from each ridge tracking point according to the gradient direction of each image block, and determine other tracking points from the ridge with a preset step length until the ridge endpoint is tracked;
[0142] The pixel points marked twice as tracking points determine the ridge line fork points.
[0143] In one embodiment, the fingerprint feature points include fingerprint endpoints and fingerprint fork points, and the determination module 405 is further configured to use the ridge endpoints of each image block as the fingerprint endpoints of the initial fingerprint image;
[0144] The ridge fork point of each image block is used as the fingerprint fork point of the initial fingerprint image.
[0145] In one embodiment, the determination module 405 is further configured to determine that the two fingerprint endpoints are fingerprint opposite points if the pixel distance between the two fingerprint endpoints is less than or equal to a first preset pixel distance and the direction errors of the two fingerprint endpoints are within a preset direction error range.
[0146] In one embodiment, the fingerprint feature point acquisition device 400 further includes:
[0147] The processing module is further configured to calculate the quality of each fingerprint feature point according to a plurality of pixel gradient values of each fingerprint feature point if the pixel distance between any two fingerprint feature points is less than or equal to a second preset pixel distance;
[0148] Delete the target feature point whose quality is less than or equal to the preset quality threshold among the two fingerprint feature points.
[0149] In one embodiment, the acquisition module 402 is further configured to acquire the first directional gradient vector and the second directional gradient vector of each image block;
[0150] The gradient direction of each image block is calculated according to the first direction gradient vector and the second direction gradient vector of each image block.
[0151] The fingerprint feature point acquisition device provided in the present embodiment acquires an initial fingerprint foreground of an initial fingerprint image, compensates each pixel value of the initial fingerprint foreground according to the average pixel value of a preset neighborhood, and obtains an enhanced fingerprint foreground; divides the enhanced fingerprint foreground into a plurality of image blocks, and acquires the gradient direction of each of the image blocks; performs smoothing filtering processing on each of the image blocks in the gradient direction and sharpening filtering processing in the target direction, and obtains a plurality of ridge-valley contrast enhancement images, respectively, wherein the target direction is a vertical direction perpendicular to the gradient direction of each of the image blocks; traverses the pixel points of each of the ridge-valley contrast enhancement images, determines the ridge line tracking point according to each of the traversed pixel points, and acquires the key feature points of each of the ridge-valley contrast enhancement images according to the gradient direction of each of the image blocks and the ridge line tracking point; and determines the fingerprint feature points of the initial fingerprint image according to the key feature points of each of the ridge-valley contrast enhancement images. In this way, by directly tracing the ridge line in the ridge-valley contrast enhancement image, detecting key feature points on the ridge line, and determining the fingerprint feature points by the key feature points, it takes less time and can better avoid the influence of burrs. Due to the directional enhancement, the broken marks can be better connected, the ridge line tracking effect is better, and the accuracy of fingerprint feature point extraction is improved.
[0152] Example 3
[0153] In addition, an embodiment of the present disclosure provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the fingerprint feature point acquisition method provided in Embodiment 1 is executed.
[0154] The electronic device provided in this embodiment can implement the fingerprint feature point acquisition method provided in Embodiment 1, and will not be described again here to avoid repetition.
[0155] Example 4
[0156] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run on a processor, the fingerprint feature point acquisition method provided in Example 1 is executed.
[0157] The computer-readable storage medium of this embodiment can implement the fingerprint feature point acquisition method provided in Embodiment 1, and will not be described again here to avoid repetition.
[0158] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.
[0159] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0160] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A fingerprint feature point acquisition method, It is characterized in that The method comprises: Acquire an initial fingerprint foreground of an initial fingerprint image, and compensate each pixel value of the initial fingerprint foreground according to an average pixel value of a preset neighborhood to obtain an enhanced fingerprint foreground; Dividing the enhanced fingerprint foreground into a plurality of image blocks, and obtaining the gradient direction of each of the image blocks; Performing smoothing filtering processing on each of the image blocks in the gradient direction of each of the image blocks and performing sharpening filtering processing in the target direction to obtain a plurality of ridge-valley contrast enhancement images, respectively, wherein the target direction is a direction perpendicular to the gradient direction of each of the image blocks; Traversing the pixel points of each ridge-valley contrast enhancement image, determining a ridge line tracking point according to each traversed pixel point, and obtaining a key feature point of each ridge-valley contrast enhancement image according to the gradient direction of each image block and each ridge line tracking point; Determining fingerprint feature points of the initial fingerprint image according to key feature points of each of the ridge-valley contrast enhancement images; The step of determining the ridgeline tracking point according to the traversed pixel points comprises: Taking the traversed pixel point as the center point, a pixel point set is obtained on the normal line corresponding to each pixel point; Determine whether there is a target pixel in the pixel set, the pixel value of the target pixel is less than or equal to the pixel value of the adjacent previous pixel of the target pixel, and the pixel value of the target pixel is less than or equal to the pixel value of the adjacent next pixel of the target pixel; If there is a target pixel point, then determine the target pixel point as the ridge line tracking point; If there are at least two target pixel points, determine the target pixel point closest to the center point from the at least two target pixel points as the ridge line tracking point; The key feature points include: ridge endpoints and ridge fork points; The step of obtaining the key feature points of each ridge-valley contrast enhancement image according to the gradient direction of each image block and each ridge line tracking point comprises: Starting from each ridgeline tracking point according to the gradient direction of each image block, determining other tracking points from the ridgeline with a preset step length until the ridgeline endpoint is tracked; The pixel points marked twice as tracking points determine the ridge line fork points.
2. The method according to claim 1, It is characterized in that The fingerprint feature points include fingerprint endpoints and fingerprint fork points. The step of determining the fingerprint feature points of the initial fingerprint image according to the key feature points of each ridge-valley contrast enhancement image includes: Taking the ridgeline endpoints of each image block as the fingerprint endpoints of the initial fingerprint image; The ridge fork point of each image block is used as the fingerprint fork point of the initial fingerprint image.
3. The method according to claim 2, It is characterized in that The method further comprises: If the pixel distance between the two fingerprint endpoints is less than or equal to the first preset pixel distance, and the direction errors of the two fingerprint endpoints are within a preset direction error range, the two fingerprint endpoints are determined to be fingerprint matching points.
4. The method according to claim 1, It is characterized in that The method further comprises: If the pixel distance between any two fingerprint feature points is less than or equal to the second preset pixel distance, the quality of each fingerprint feature point is calculated according to a plurality of pixel gradient values of each fingerprint feature point; Delete the target feature point whose quality is less than or equal to the preset quality threshold among the two fingerprint feature points.
5. The method according to claim 1, It is characterized in that The step of obtaining the gradient direction of each image block comprises: Obtaining a first direction gradient vector and a second direction gradient vector of each of the image blocks; The gradient direction of each image block is calculated according to the first direction gradient vector and the second direction gradient vector of each image block.
6. A fingerprint feature point acquisition device, It is characterized in that The device comprises: A compensation module, used for obtaining an initial fingerprint foreground of an initial fingerprint image, and compensating each pixel value of the initial fingerprint foreground according to an average pixel value of a preset neighborhood to obtain an enhanced fingerprint foreground; An acquisition module, used for dividing the enhanced fingerprint foreground into a plurality of image blocks, and acquiring a gradient direction of each of the image blocks; A filtering module, used to perform smoothing filtering processing on each of the image blocks in the gradient direction of each of the image blocks and sharpening filtering processing in the target direction to obtain a plurality of ridge-valley contrast enhancement images, wherein the target direction is a direction perpendicular to the gradient direction of each of the image blocks; A traversal processing module, used to traverse the pixel points of each ridge-valley contrast enhancement image, determine the ridge tracking point according to each traversed pixel point, and obtain the key feature point of each ridge-valley contrast enhancement image according to the gradient direction of each image block and each ridge tracking point; A determination module, used to determine the fingerprint feature points of the initial fingerprint image according to the key feature points of each ridge-valley contrast enhancement image; The traversal processing module is further used to obtain a pixel point set on a normal line corresponding to each pixel point with the traversed pixel point as the center point; Determine whether there is a target pixel in the pixel set, the pixel value of the target pixel is less than or equal to the pixel value of the adjacent previous pixel of the target pixel, and the pixel value of the target pixel is less than or equal to the pixel value of the adjacent next pixel of the target pixel; If there is a target pixel point, then determine the target pixel point as the ridge line tracking point; If there are at least two target pixel points, determine the target pixel point closest to the center point from the at least two target pixel points as the ridge line tracking point; The key feature points include: ridge endpoints and ridge fork points; the traversal processing module is further used to start from each ridge tracking point according to the gradient direction of each image block, and determine other tracking points from the ridge with a preset step length until the ridge endpoint is tracked; The pixel points marked twice as tracking points determine the ridge line fork points.
7. An electronic device, It is characterized in that The method comprises a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program, the method for acquiring fingerprint feature points according to any one of claims 1 to 5 is executed.
8. A computer-readable storage medium, It is characterized in that The computer program is stored therein, and when the computer program is run on a processor, the fingerprint feature point acquisition method according to any one of claims 1 to 5 is executed.
