Fingerprint direction field calculation method and device, computer equipment and storage medium
By determining the average gray level at multiple predetermined locations in the fingerprint image, the problems of large error and low accuracy in the neighborhood orientation method are solved, achieving higher precision and more accurate fingerprint orientation field recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2026-03-20
AI Technical Summary
The existing neighborhood orientation method has large errors and low accuracy in fingerprint orientation field calculation, and the number of predetermined orientations is limited by the pixel arrangement.
In multiple predetermined directions of the fingerprint image, the average gray level of multiple predetermined positions centered on the current pixel is determined, and the direction of the ridge line at the current pixel is determined based on the average gray level of the multiple predetermined directions. The predetermined positions can be located at the pixel or between pixels, and the number of predetermined directions is not limited by the pixel arrangement.
It improves the accuracy and precision of fingerprint orientation field recognition, achieves sub-pixel level calculation, and ensures the accuracy of average grayscale and the controllability of the number of predetermined directions.
Smart Images

Figure CN115953808B_ABST
Abstract
Description
[0001] Technical field
[0002] The present application relates to the fingerprint image recognition technical field, in particular to a fingerprint direction field calculation method and device, computer equipment and storage medium. BACKGROUND
[0003] The fingerprint direction field as a global and reliable feature of the fingerprint plays an important role in fingerprint image enhancement, fingerprint classification, fingerprint retrieval and fingerprint matching. There are various fingerprint direction field calculation methods in the related art, including the neighborhood direction method. However, the conventional neighborhood direction method has large error and low precision. SUMMARY
[0004] Therefore, the present application provides a fingerprint direction field calculation method and device, computer equipment and storage medium to solve the problem of large error and low precision of the neighborhood direction method for fingerprint direction field estimation in the prior art.
[0005] The first aspect of the present application provides a fingerprint direction field calculation method, comprising: determining the average gray scale of a plurality of predetermined positions centered on a current pixel point in a plurality of predetermined directions of a fingerprint image, wherein the predetermined position refers to a position with a distance of a preset value from the current pixel point; determining the direction of a ridge line at the current pixel point based on the average gray scale of the plurality of predetermined directions; and determining the direction of each pixel point in the fingerprint image as the fingerprint direction field of the fingerprint image when the current pixel point traverses the pixel points in the fingerprint image.
[0006] The second aspect of the present application provides a fingerprint direction field estimation device, comprising: a first determination module configured to determine the average gray scale of a plurality of predetermined positions centered on a current pixel point in a plurality of predetermined directions of a fingerprint image, wherein the predetermined position refers to a position with a distance of a preset value from the current pixel point; a second determination module configured to determine the direction of a ridge line at the current pixel point based on the average gray scale of the plurality of predetermined directions; and a third determination module configured to determine the direction of each pixel point in the fingerprint image as the fingerprint direction field of the fingerprint image when the current pixel point traverses the pixel points in the fingerprint image.
[0007] The third aspect of the present application provides a computer equipment, comprising a memory, a processor and a computer program stored in the memory and executed by the processor, wherein the processor executes the computer program to implement the steps of the fingerprint direction field calculation method provided by any of the above embodiments.
[0008] The fourth aspect of the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the fingerprint direction field calculation method provided by any of the above embodiments.
[0009] According to the method and device for calculating a fingerprint direction field, the computer device, and the storage medium provided in the embodiments of the present application, the average gray levels of a plurality of predetermined positions centered on a current pixel point are determined in a plurality of predetermined directions of a fingerprint image; the direction of the current pixel point is determined based on the average gray levels in the plurality of predetermined directions; and the directions of the pixel points in the fingerprint image are determined as the fingerprint direction field when the current pixel point traverses the pixel points in the fingerprint image. It can be seen that, according to the method for calculating a fingerprint direction field provided in the embodiments of the present application, a plurality of predetermined positions centered on a current pixel point are selected in each predetermined direction. In this case, a predetermined direction is rotated with the current pixel point as the origin, and when the predetermined direction coincides with another predetermined direction, the plurality of predetermined positions in the predetermined direction coincide with the plurality of predetermined positions in the another predetermined direction respectively. According to the neighborhood direction method, a predetermined direction is rotated with the current pixel point as the origin, and when the predetermined direction coincides with another predetermined direction, the plurality of predetermined positions in the predetermined direction do not coincide with the plurality of predetermined positions in the another predetermined direction respectively. It can be seen that, according to the method for calculating a fingerprint direction field provided in the embodiments of the present application, the pixel points selected in the plurality of predetermined directions are more comparable, thereby improving the accuracy of direction field recognition. Meanwhile, according to the method for calculating a fingerprint direction field provided in the embodiments of the present application, the predetermined positions can be located on the pixel points or in the pixel gaps, that is, the regions between the pixel points. The predetermined positions selected in the neighborhood direction method are located on the pixel points. In comparison, according to the method for calculating a fingerprint direction field provided in the embodiments of the present application, the number of predetermined directions is not limited by the arrangement of the pixel points, and since the number of predetermined directions is proportional to the recognition accuracy, the recognition accuracy can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0010] Figure 1 A partial enlarged view of a gray level diagram of a fingerprint image is shown.
[0011] Figure 2 A structural schematic diagram of a neighborhood direction template is shown.
[0012] Figure 3 A schematic diagram of the principle of fingerprint direction field recognition using the neighborhood direction method is shown.
[0013] Figure 4 A schematic diagram of the flow of the method for calculating a fingerprint direction field provided in the first embodiment of the present application is shown.
[0014] Figure 5 A schematic diagram of the principle of determining the direction of a current pixel point in a fingerprint line provided in an embodiment of the present application is shown.
[0015] Figure 6 A schematic diagram of the flow of the method for calculating a fingerprint direction field provided in the second embodiment of the present application is shown.
[0016] Figure 7According to Figure 6 The diagram shows the principle of the fingerprint orientation field calculation method for calculating the average gray level in a predetermined direction.
[0017] Figure 8 This is a flowchart illustrating the fingerprint orientation field calculation method provided in the third embodiment of this application.
[0018] Figure 9 for Figure 7 A magnified view of a portion of the image.
[0019] Figure 10 This is a flowchart illustrating the fingerprint orientation field calculation method provided in the fourth embodiment of this application.
[0020] Figure 11 This is a flowchart illustrating the fingerprint orientation field calculation method provided in the fifth embodiment of this application.
[0021] Figure 12 This is a structural block diagram of the fingerprint orientation field estimation device provided in the first embodiment of this application.
[0022] Figure 13 This is a structural block diagram of the fingerprint orientation field estimation device provided in the second embodiment of this application.
[0023] Figure 14 This is a structural block diagram of the fingerprint orientation field estimation device provided in the third embodiment of this application.
[0024] Figure 15 This is a structural block diagram of the fingerprint orientation field estimation device provided in the fourth embodiment of this application.
[0025] Figure 16 This is a structural block diagram of a computer device provided in an embodiment of this application. Detailed Implementation
[0026] Fingerprint orientation field calculation refers to determining the orientation information of the ridges in a fingerprint image at each pixel. The ridges include valleys and ridges, and they form the fingerprint pattern. Theoretically, the orientation information of a ridge at a pixel is the direction of its tangent at that pixel; therefore, fingerprint orientation field calculation is essentially determining the direction of the tangent to the ridge at each pixel.
[0027] Figure 1 A magnified view of a grayscale image of a fingerprint is shown. (See attached image.) Figure 1 As shown, the fingerprint image 10 is a grayscale image obtained through binarization processing, and the pixels in the image include only white and black pixels. The fingerprint image 10 includes multiple pixels 110 arranged in an array. Figure 1The intersection of the horizontal and vertical lines indicates the location of pixel 110. Ridges in a fingerprint appear black in the grayscale image, with a grayscale value of 0. Valleys in a fingerprint appear white in the grayscale image, with a grayscale value of 255. This fingerprint image 10 shows a ridge... Figure 1 The fingerprint image is composed of black pixels. When performing fingerprint orientation field recognition on this fingerprint image using the neighborhood orientation method, the orientation of the ridges at each pixel can be determined with the help of a preset neighborhood orientation template. The fingerprint orientation field is then determined by traversing all pixels in the fingerprint image using the same method, and the orientation of the ridges at all pixels is used to define the fingerprint orientation field of the fingerprint image.
[0028] Figure 2 This is a schematic diagram of the neighborhood direction template. (Example) Figure 2 As shown, the neighborhood direction template 20 consists of an array of 9*9 small cells. The neighborhood direction template 20 includes a central cell Q, a first layer of surrounding cells 21, a second layer of surrounding cells 22, a third layer of surrounding cells 23, and a fourth layer of surrounding cells 24. The first layer of surrounding cells 21 surrounds the central cell Q, the second layer of surrounding cells 22 surrounds the first layer of surrounding cells 21, the third layer of surrounding cells 23 surrounds the second layer of surrounding cells 22, and the fourth layer of surrounding cells 24 surrounds the third layer of surrounding cells 23. Using the center point of the central cell Q as the origin, the 180° angle interval is divided into 8 equal parts, with each part corresponding to an angle indicating a predetermined direction. A direction identifier is assigned to each predetermined direction. For example, the numbers 0-7 are used as the direction identifiers for the 8 predetermined directions. That is, the direction identifier for the first predetermined direction is 0, the direction identifier for the second predetermined direction is 1, ..., the direction identifier for the eighth predetermined direction is 7, and so on. The second layer surrounding small grid 22 and the fourth layer surrounding small grid 24 are marked with direction indicators, which indicate the direction of the small grid. In this case, such as Figure 2 As shown, a small square marked "0" indicates that the small square is located in the first predetermined direction. A small square marked "1" indicates that the small square is located in the second predetermined direction. ...and so on.
[0029] Figure 3 This is a schematic diagram illustrating the principle of fingerprint orientation field recognition using the neighborhood orientation method. Figure 3 As shown, using Figure 2When the neighborhood orientation template 20 is used to identify the fingerprint orientation field, the neighborhood orientation template 20 is overlaid on the fingerprint image 10 so that the center cell Q covers the current pixel point. In this case, all the cells in the neighborhood orientation template 20 cover one pixel point 110 respectively. In each direction, the average gray level of the pixel points 110 covered by the cells marked with the direction identifier is calculated. In theory, the tangent line of the ridge line at the current pixel point only passes through the current pixel point, i.e., the tangent line only passes through one black pixel point and the rest are white pixel points, so the average gray level in the tangent direction is the smallest. Based on this principle, a predetermined direction is determined from the eight predetermined directions according to the average gray level in the eight predetermined directions, as the direction of the ridge line at the current pixel point. According to the above method, the neighborhood orientation template is used to traverse each pixel point 110 in the fingerprint image to obtain the fingerprint orientation field of the fingerprint image.
[0030] In one embodiment, after obtaining the direction of the fingerprint at all pixel points, the fingerprint image can be further divided into a plurality of non-overlapping image blocks, and the size of the image block can be the same as or different from the size of the neighborhood orientation template 20. For each image block, the predetermined direction of each pixel point in the image block is counted, and the direction with the largest number of pixel points corresponding to the same predetermined direction is taken as the direction of the ridge line in the image block. According to the above method, the direction of the ridge line in each image block in the entire fingerprint image is obtained as the fingerprint orientation field of the fingerprint image.
[0031] The inventors have found that the above-mentioned identification process of the fingerprint orientation field has the following problems:
[0032] First, in the above-mentioned identification process, the distance between the pixel points selected in different predetermined directions, i.e., the pixel points covered by the cells marked with the direction identifier in the neighborhood orientation template and the current pixel point, is inconsistent. For example, as shown in Figure 2 The distance from the cell marked with "0" to the center cell Q is not equal to the distance from the cell marked with "1" to the center cell Q in the second layer of surrounding cells 22, resulting in an inconsistent distance between the pixel points covered by the two cells and the current pixel point, reducing the comparability of the average gray levels in the first predetermined direction and the second predetermined direction, and further reducing the accuracy of the estimated fingerprint orientation field.
[0033] Second, according to the above-mentioned identification process, the pixel points passed through by the predetermined direction are selected to calculate the average gray level of the predetermined direction. In this case, for Figure 2 As shown in the 9*9 neighborhood orientation template 20, at most eight predetermined directions can be set, and the identification accuracy = 180 / 8 = 22.5°.
[0034] Therefore, the fingerprint direction field calculation method provided in the embodiments of the present application selects a plurality of predetermined positions centered on the current pixel point in each predetermined direction, and the predetermined position refers to a position with a predetermined distance from the current pixel point. In this case, the number of predetermined positions selected in different predetermined directions is the same, and the distance between the same predetermined position in different predetermined directions and the current pixel point is equal. In this way, the pixel points selected in the plurality of predetermined directions are more comparable, thereby improving the accuracy of the direction field recognition. At the same time, according to the fingerprint direction field calculation method provided in the embodiments of the present application, the predetermined position can be located in the pixel gap, i.e., the area between the pixel points, and does not necessarily be located on the pixel point. That is, the fingerprint direction field recognition method provided in the present application can calculate the average gray scale of the predetermined direction at the sub-pixel level. In this case, on the one hand, the calculated average gray scale is more accurate; on the other hand, the number of predetermined directions is no longer limited by the arrangement of the pixel points. For example, for the neighborhood direction template 20 shown in FIG. 1, more than 8 predetermined directions can be set, so as to realize controllable precision and improve the recognition precision. Figure 2
[0035] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the scope of the present application.
[0036] Figure 4 The flowchart of the fingerprint direction field calculation method provided in the first embodiment of the present application is shown in FIG. 4. As shown in FIG. 4, the fingerprint direction field calculation method 400 includes: Figure 4
[0037] In step S410, the average gray scale of a plurality of predetermined positions centered on the current pixel point is determined in a plurality of predetermined directions of the fingerprint image, and the predetermined position refers to a position with a predetermined distance from the current pixel point.
[0038] The plurality of predetermined directions are pre-set, and the number of predetermined directions can be reasonably set according to actual needs. For example, the 180° angle interval is equally divided into 8 equal parts, and each equal part corresponds to a predetermined direction, obtaining 8 predetermined directions, which can be denoted as 0° direction, 22.5° direction, 50° direction, 67.5° direction, 90° direction, 112.5° direction, 135° direction and 157.5° direction. It should be noted that the 180° angle interval can also be randomly divided into 8 parts, in which case the angle difference between adjacent predetermined directions can be equal or unequal.
[0039] Preferably, N equally divided directions are taken within 180°, 8≤N≤180, N is a divisor of 180, and the larger N is, the higher the accuracy is; for example, N is 10, 30 or 60, so as to divide into 8 predetermined directions.
[0040] In each predetermined direction, a plurality of predetermined positions are determined, which are centrally symmetric about the current pixel point, i.e., the number of predetermined positions is even. In the same predetermined direction, the distances between adjacent predetermined positions are equal or unequal. In different predetermined directions, the number of predetermined positions is equal. Specifically, it can be understood that:
[0041] Taking the plurality of predetermined directions including two predetermined directions, i.e., the first predetermined direction and the second predetermined direction, as an example, the first predetermined direction is rotated around the current pixel point, and when the first predetermined direction and the second predetermined direction coincide, the plurality of predetermined positions on the first predetermined direction and the plurality of predetermined positions on the second predetermined direction coincide one by one. Each predetermined position can be located on a pixel point or a pixel gap.
[0042] Step S420, determining the direction of the current pixel point based on the average gray scale of the plurality of predetermined directions.
[0043] Figure 5 The principle diagram for determining the direction of the current pixel point provided by an embodiment of the present application is shown in FIG. 4. Figure 5 As shown in FIG. 4, the current pixel point o is Figure 1 selected in the fingerprint image, and the current pixel point o is located on the ridge, and the gray scale is 0. In this case, among the straight lines passing through the current pixel point o, the average gray scale of the pixel points through by the tangent L of the ridge at the current pixel point o is the smallest, because theoretically the tangent L only passes through the current pixel point o, and the rest are points on the valley, and the gray scale is 255. Therefore, when the current pixel point o is located on the ridge, the predetermined direction with the minimum average gray scale can be determined as the direction of the current pixel point.
[0044] When the current pixel point o is located on a valley, the predetermined direction with the maximum average gray level can be determined as the direction of the ridge line at the current pixel point. The specific principle is the same as the case that the current pixel point o is located on a ridge, which will not be described here.
[0045] In step S430, when the current pixel point traverses the pixel points in the fingerprint image, the directions of the pixel points in the fingerprint image are determined as the fingerprint direction field of the fingerprint image. That is, for all the pixel points in the fingerprint image, steps S410 and S420 are performed respectively to obtain the direction of each pixel point as the fingerprint direction field of the entire fingerprint image.
[0046] According to the fingerprint direction field calculation method provided in the embodiments of the present application, a plurality of predetermined positions are selected in each predetermined direction with the current pixel point as the center. In this case, the number of predetermined positions selected in different predetermined directions is the same, and the distances between the same plurality of predetermined positions and the current pixel point in different predetermined directions are equal. In this way, the pixel points selected in the plurality of predetermined directions are more comparable, thereby improving the accuracy of the direction field recognition. At the same time, according to the fingerprint direction field calculation method provided in the embodiments of the present application, the predetermined positions can be located in the pixel gap, i.e., the area between the pixel points, and not necessarily on the pixel points. That is, the fingerprint direction field recognition method provided in the present application can calculate the average gray level of the predetermined direction at the sub-pixel level. In this case, on the one hand, the calculated average gray level is more accurate; on the other hand, the number of predetermined directions is no longer limited by the arrangement of the pixel points. For example, for the neighborhood direction template 20 shown in Figure 2 As shown in the neighborhood direction template 20, more than 8 predetermined directions can be set, so as to realize controllable precision and improve the recognition accuracy.
[0047] Figure 6 The flowchart of the fingerprint direction field calculation method provided in the second embodiment of the present application is shown. Figure 7 The principle of calculating the average gray level of the predetermined direction according to the fingerprint direction field calculation method shown in Figure 6 The principle diagram of calculating the average gray level of the predetermined direction according to the fingerprint direction field calculation method shown in
[0048] In combination with Figure 6 and Figure 7 In the present embodiment, step S410 specifically includes:
[0049] In step S610, in each predetermined direction, a line segment with a predetermined length and with the current pixel point o as the center is determined.
[0050] Referring to Figure 7, a plurality of predetermined directions are set for the fingerprint image, and each predetermined direction is indicated by a straight line. For example, in the embodiment, the number of predetermined directions Li (i = 1, 2, …, 8) is 8. Taking the predetermined direction L4 as an example, the direction angle a of the predetermined direction L4 and the coordinates of the current pixel point o are known, and the two end points of the line segment ab of the predetermined length with the current pixel point o as the center can be determined, including the first end point a and the second end point b. The coordinates of the first end point a are (x a ,y a ), and the coordinates of the second end point b are (x b ,y b ).
[0051] The predetermined length can be reasonably set according to actual needs. In an example, the predetermined length is greater than or equal to the sum of the lengths of 2 pixel points 110 and less than or equal to the sum of the lengths of 20 pixel points 110. The minimum value of the predetermined length, i.e., the sum of the lengths of 2 pixel points 110, is determined based on the two-point-one-line principle. To determine the direction of the ridge line at the current pixel point o, the tangent line indicating the direction needs to be determined, so at least two pixel points 110 are needed. The maximum value of the predetermined length, i.e., the sum of the lengths of 20 pixel points 110, depends on the ridge line width. The ridge line width usually occupies 9-11 pixel points 110, and the predetermined length should be less than the spacing between two adjacent ridge lines, i.e., the predetermined length cannot contain two ridge lines at the same time to avoid errors.
[0052] In step S620, a plurality of equal division points of the line segment are determined as a plurality of predetermined positions. That is, in the embodiment, the spacing of adjacent predetermined positions on the same predetermined direction is equal.
[0053] Continuing to refer to Figure 7 , taking 8 equal division points as an example, 4 equal division points are set on the line segment ao, and 4 equal division points are set on the line segment ob. The 8 equal division points determine 8 predetermined positions P j , j = 1, 2, 3, …, 8 on the line segment ab.
[0054] In step S630, the gray scale of each predetermined position is determined.
[0055] Continuing to refer to Figure 7 , the predetermined position can be located on the pixel point 110, as shown by the predetermined positions P3, P4, P6, and P7. The predetermined position can also be located in the pixel gap, as shown by the predetermined positions P1, P2, P5, and P6. When the predetermined position is located on the pixel point 110, the gray scale of the pixel point 110 can be obtained from the gray scale map of the fingerprint image as the gray scale of the predetermined position. When the predetermined position is located in the pixel gap, i.e., the predetermined position is located on the sub-pixel point, the gray scale of the pixel point 110 closest to the predetermined position can be determined as the gray scale of the predetermined position.
[0056] Step S640: Determine the average gray level based on the gray levels of each of the multiple predetermined positions. The average gray level is the mean of the gray levels of the multiple predetermined positions.
[0057] The fingerprint orientation field calculation method provided in this embodiment executes steps S610-S640 separately in each predetermined direction. This means that the execution processes in multiple predetermined directions are independent and do not interfere with each other. Therefore, steps S610-S640 can be executed in parallel for multiple predetermined directions, thereby improving the recognition efficiency of the fingerprint orientation field.
[0058] Figure 8 This is a flowchart illustrating the fingerprint orientation field calculation method provided in the third embodiment of this application. Figure 8 As shown, in this embodiment, the predetermined position includes a first predetermined position. Step S630 specifically includes:
[0059] Step S810: Determine that the first predetermined position is located in the pixel gap.
[0060] Figure 9 for Figure 7 A magnified view of a portion of the image. (See attached image.) Figure 9 The coordinates of a pixel have a first precision. When the coordinates of a first predetermined position have a second precision, the first predetermined position is determined to be located within a pixel gap. The second precision is 1 / n of the first precision, where n is an integer multiple of 10. For example, if the first precision is 1, then both the x-coordinate and y-coordinate of the pixel are integers. When both the x-coordinate and y-coordinate of the first predetermined position have one decimal place, i.e., the coordinates of the first predetermined position have a second precision, the first predetermined position is determined to be located within a pixel gap.
[0061] Step S820: Determine multiple adjacent pixels at the first predetermined position.
[0062] Specifically, the top-left, bottom-right, and top-right adjacent pixels of the first predetermined position are determined. Taking predetermined position P6 as the first predetermined position, the spacing between pixels is a unit length. The coordinates of predetermined position P6 are, for example, (1.5, 3.0). The x-coordinate of predetermined position P6 is rounded to obtain the x-coordinate baseline value x0 = 1. The y-coordinate of predetermined position P6 is rounded to obtain the y-coordinate baseline value y0 = 3. Based on the x-coordinate baseline value x0, the first x-coordinate x1 = x0 = 1 and the second x-coordinate x2 = x0 + 1 = 2 are determined. Based on the y-coordinate baseline value y0, the first y-coordinate y1 = y0 = 3 and the second y-coordinate y2 = y0 + 1 = 4 are determined. Combining the first x-coordinate and the second y-coordinate, the top-left adjacent pixel A (1, 4) is obtained. Combining the second x-coordinate and the second y-coordinate, the top-right adjacent pixel B (2, 4) is obtained. Combining the first x-coordinate and the first y-coordinate, the bottom-left adjacent pixel C (1, 3) is obtained. Combining the second x-coordinate with the first y-coordinate, we obtain the lower right adjacent pixel point D(2,3).
[0063] Step S830: Determine the gray level of the first predetermined position based on the gray levels of multiple adjacent pixels.
[0064] Bilinear interpolation is used to calculate the gray level at the first predetermined position based on the gray levels of multiple adjacent pixels. Bilinear interpolation is a fast computation method. For more details, please refer to [link / reference]. Figure 9 Let u be the distance between the predetermined position P6 and AC, and v be the distance between P6 and BD. Then the distance between P6 and BD is 1-u, and the distance between P6 and CD is 1-v. Determine the gray level of the predetermined position P6 as Pg = Ag*(1-u)(1-v) + Bg*u(1-v) + Cg*(1-u)v + Dg*uv, where Ag represents the gray level of the upper left neighboring pixel A, Bg represents the gray level of the upper right neighboring pixel B, Cg represents the gray level of the lower left neighboring pixel C, and Dg represents the gray level of the lower right neighboring pixel D.
[0065] In other examples, cubic convolution interpolation can be used instead of bilinear interpolation to determine the grayscale at the first predetermined position.
[0066] According to the fingerprint orientation field calculation method provided in this embodiment, when the predetermined position is located in the pixel gap, multiple adjacent pixels of the predetermined position are determined, weights are determined based on the distances of each of the multiple adjacent pixels to the predetermined position, and the gray level of the first predetermined position is determined based on the gray levels of the multiple adjacent pixels and their respective weights, thereby further improving the accuracy of orientation field recognition.
[0067] In one embodiment, step S630 further includes:
[0068] Step S840: Determine that the second predetermined position is located on the pixel.
[0069] Specifically, the coordinates of the pixel point have a first precision. When the coordinates of the first predetermined position have the first precision, it is determined that the first predetermined position is located on the pixel point. For example, the first precision is 1, and the horizontal coordinate and the vertical coordinate of the pixel point are both integers. When the horizontal coordinate and the vertical coordinate of the first predetermined position are both integers, that is, the coordinates of the first predetermined position have the first precision, it is determined that the first predetermined position is located on the pixel point.
[0070] Step S850, obtaining the gray scale of the predetermined position from the gray scale image corresponding to the fingerprint image.
[0071] It should be noted that steps S810-S830 and steps S840-S850 are two parallel judgment branches, and the execution order of the two judgment branches is not sequential.
[0072] Figure 10 The flowchart of the fingerprint direction field calculation method provided by the fourth embodiment of the present application is shown in FIG. 4. As shown in the figure, in the present embodiment, step S420 includes: Figure 10
[0073] Step S1010, determining the mean value of the average gray scales of the plurality of predetermined directions to obtain a target average gray scale.
[0074] Referring to Figure 7 , for example, the average gray scales of the 8 predetermined directions Li are Gi respectively. Then the mean value of the average gray scales of the 8 predetermined directions, that is, the target average gray scale G0=(G1+G2+G3+G4+G5+G6+G7+G8) / 8.
[0075] Step S1020, determining the difference between the average gray scale of each predetermined direction and the target average gray scale.
[0076] The difference ΔGi=|Gi-G0| between the average gray scale and the target average gray scale corresponding to each of the 8 predetermined directions Li.
[0077] Step S1030, determining that the predetermined direction corresponding to the maximum value of the difference is the direction of the fingerprint line at the current pixel point.
[0078] The maximum difference ΔGi includes two cases: the first is the minimum average gray scale, and the second is the maximum average gray scale. Therefore, according to the fingerprint direction field calculation method provided by the present embodiment, without determining whether the current pixel point is located on a ridge or a valley, the direction of the fingerprint line at the current pixel point can be determined, thereby simplifying the process and improving the recognition efficiency of the fingerprint direction field.
[0079] Figure 11 This is a flowchart illustrating the fingerprint orientation field calculation method provided in the fifth embodiment of this application. After obtaining the fingerprint orientation field of a fingerprint image according to the fingerprint orientation field calculation method provided in any of the above embodiments, the fingerprint orientation field can be further optimized. For example... Figure 11 As shown, the optimization process 1100 includes:
[0080] Step S1110: Obtain the orientation of multiple pixels surrounding the current pixel.
[0081] Step S1120: Correct the orientation of the current pixel based on the orientation of multiple pixels.
[0082] Specifically, the orientation of each of the surrounding pixels is determined to be different from the orientation of the current pixel. The current orientation is then corrected based on the orientations of pixels whose differences are less than a threshold. In one example, the threshold is 45°. For instance, the average orientation of pixels with differences less than 45° can be determined, and this average can be used to update the orientation of the current pixel.
[0083] According to the fingerprint orientation field calculation method provided in this embodiment, the orientation of the current pixel is corrected by using the orientations of multiple pixels around the current pixel, thereby further improving the accuracy of fingerprint orientation field recognition.
[0084] This application also provides a fingerprint orientation field estimation device. Figure 12 This is a structural block diagram of the fingerprint orientation field estimation device provided in the first embodiment of this application. Figure 12 As shown, the fingerprint orientation field estimation device 1200 includes: a first determining module 1210, a second determining module 1220, and a third determining module 1230. The first determining module 1210 is used to determine the average grayscale of multiple predetermined positions centered on the current pixel point in multiple predetermined directions of the fingerprint image. The predetermined positions refer to positions at a preset distance from the current pixel point. The second determining module 1220 is used to determine the direction of the ridges at the current pixel point based on the average grayscale of the multiple predetermined directions. The third determining module 1230 is used to determine the direction of each pixel point in the fingerprint image as the fingerprint orientation field of the fingerprint image when the current pixel point traverses all pixels in the fingerprint image.
[0085] According to the fingerprint orientation field estimation apparatus provided in the embodiments of this application, multiple predetermined positions centered on the current pixel are selected in each predetermined direction. A predetermined position refers to a position whose distance from the current pixel is a predetermined value. In this case, the number of predetermined positions selected in different predetermined directions is the same, and the distance between the same predetermined position and the current pixel is equal in different predetermined directions. This makes the pixels selected in multiple predetermined directions more comparable, thereby improving the accuracy of orientation field recognition. Meanwhile, according to the fingerprint orientation field calculation method provided in the embodiments of this application, the predetermined positions can be located in the pixel gaps, i.e., the region between pixels, and not necessarily on the pixels themselves. In this case, for... Figure 2 The neighborhood direction template 20 shown can be set with more than 8 predetermined directions, thereby improving recognition accuracy.
[0086] Figure 13 This is a structural block diagram of the fingerprint orientation field estimation device provided in the second embodiment of this application. Figure 13 As shown, in this embodiment, the first determining module 1210 includes a first determining submodule 1310, a second determining submodule 1320, a third determining submodule 1330, and a fourth determining submodule 1340. The first determining submodule 1310 is used to determine a line segment of a predetermined length centered on the current pixel in each predetermined direction. The second determining submodule 1320 is used to determine multiple equally spaced points of the line segment as multiple predetermined positions. The third determining submodule 1330 is used to determine the grayscale of each predetermined position. The fourth determining submodule 1340 is used to determine an average grayscale based on the respective grayscale values of the multiple predetermined positions.
[0087] The fingerprint orientation field estimation device provided in this embodiment can determine the average gray level of multiple predetermined directions in parallel, which has high recognition efficiency.
[0088] In one embodiment, the third determining submodule 1330 is specifically used for:
[0089] First, the first predetermined position is determined to be located within the pixel gap. For example, the coordinates of the pixel have a first precision. When the coordinates of the first predetermined position have a second precision, the first predetermined position is determined to be located within the pixel gap. The second precision is 1 / n of the first precision, where n is an integer multiple of 10.
[0090] Next, multiple adjacent pixels at the first predetermined position are determined. For example, the horizontal coordinate of the first predetermined position is rounded to obtain a horizontal coordinate reference value, and the vertical coordinate of the first predetermined position is rounded to obtain a vertical coordinate reference value; the first horizontal coordinate and the second horizontal coordinate are determined based on the horizontal coordinate reference value, and the first vertical coordinate and the second vertical coordinate are determined based on the vertical coordinate reference value; the upper left adjacent pixel is determined based on the first horizontal coordinate and the second vertical coordinate, the upper right adjacent pixel is determined based on the second horizontal coordinate and the second vertical coordinate, the lower left adjacent pixel is determined based on the first horizontal coordinate and the first vertical coordinate, and the lower right adjacent pixel is determined based on the second horizontal coordinate and the first vertical coordinate.
[0091] Next, the gray level at the first predetermined position is determined based on the gray levels of multiple adjacent pixels. For example, bilinear interpolation can be used to determine the gray level at the first predetermined position based on the gray levels of multiple adjacent pixels.
[0092] According to the fingerprint orientation field estimation device provided in this embodiment, when the predetermined position is located in the pixel gap, multiple adjacent pixels of the predetermined position are determined, weights are determined based on the distances of each of the multiple adjacent pixels to the predetermined position, and the gray level of the first predetermined position is determined based on the gray levels of the multiple adjacent pixels and their respective weights, thereby further improving the accuracy of orientation field recognition.
[0093] In one embodiment, the first determining submodule 1310 is further configured to determine that the second predetermined position is located on a pixel. In this case, the first determining module 1210 further includes an acquisition module 1350, configured to acquire the grayscale of the second predetermined position from the grayscale image of the fingerprint image.
[0094] Figure 14 This is a structural block diagram of the fingerprint orientation field estimation device provided in the third embodiment of this application. Figure 14 As shown, in this embodiment, the second determining module 1220 includes a fifth determining submodule 1410, a sixth determining submodule 1420, and a seventh determining submodule 1430. The fifth determining submodule 1410 is used to determine the average grayscale value of multiple predetermined directions to obtain a target average grayscale. The sixth determining submodule 1420 is used to determine the difference between the average grayscale value of each predetermined direction and the target average grayscale value. The seventh determining submodule 1430 is used to determine that the predetermined direction corresponding to the maximum value of the difference is the direction of the ridge line at the current pixel.
[0095] According to the fingerprint orientation field estimation device provided in this embodiment, the orientation of the ridge line at the current pixel point can be determined without determining whether the current pixel point is located at a ridge or a valley, thereby simplifying the process and improving the recognition efficiency of the fingerprint orientation field.
[0096] Figure 15 This is a structural block diagram of the fingerprint orientation field estimation device provided in the fourth embodiment of this application. Figure 15 As shown, withFigure 12 The fingerprint direction field estimation device 1200 shown in the figure is based on the fingerprint direction field estimation device 1500 provided in the embodiment, and the fingerprint direction field estimation device provided in any of the above embodiments further comprises an acquisition module 1510 and a correction module 1520. The acquisition module 1510 is configured to acquire the directions of a plurality of pixel points around the current pixel point. The correction module 1520 is configured to correct the direction of the current pixel point based on the directions of the plurality of pixel points.
[0097] In one embodiment, the correction module 1520 is specifically configured to determine the difference between the direction of the current pixel point and the direction of each of the plurality of pixel points, and correct the current direction based on the direction of the pixel point with a difference less than a threshold.
[0098] The fingerprint direction field estimation device provided in the embodiment corrects the direction of the current pixel point based on the directions of a plurality of pixel points around the current pixel point, thereby further improving the accuracy of fingerprint direction field recognition.
[0099] The present application also provides a computer device. Figure 16 The computer device provided in the embodiment of the present application has a structure diagram as shown in the figure. Figure 16 As shown in the figure, the computer device 1600 comprises a memory 1610, a processor 1620, and a computer program stored in the memory 1610 and executed by the processor 1620. The processor 1620 executes the computer program to implement the steps of the fingerprint direction field calculation method provided in any of the above embodiments.
[0100] The memory 1610 can comprise one or more computer program products, which can comprise various forms of computer readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory includes random access memory (RAM), cache memory, and the like. Non-volatile memory includes read-only memory (ROM), hard disks, flash memory, and the like. The memory 1610 can also store a plurality of predetermined directions, and the distance of each of a plurality of predetermined positions from the current pixel point.
[0101] The processor 1620 can be a processing unit with data processing and / or instruction execution capabilities, such as a central processing unit (CPU).
[0102] The computer program can be written in one or more programming languages. Programming languages include object-oriented programming languages such as Java, C++, and the like, and conventional procedural programming languages such as the "C" language. The computer program can be executed entirely on the computer device 1600, partially on the computer device 1600 and partially on a server, or as a standalone software package.
[0103] In one embodiment, the computer device 1600 further includes an input device 1630 and an output device 1640 connected with the processor 1620 respectively. The input device 1630 can be a microphone or microphone array, a keyboard, a mouse, etc. The output device 1640 can output various information to the outside, including the determined fingerprint direction field. The output device 1640 can be a display, a speaker, a printer, etc.
[0104] The present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the fingerprint direction field calculation method provided by any of the above embodiments.
[0105] The computer readable storage medium can adopt any combination of one or more readable media. The readable storage medium can be any one of the following forms: electric, magnetic, optical, electromagnetic, infrared, semiconductor, or a combination thereof. For example, the readable storage medium includes: a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, etc.
[0106] The above description has been given for the purpose of illustration and description. Furthermore, this description does not intend to limit the embodiments of the present application to the forms disclosed herein. Although a plurality of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for calculating fingerprint orientation field, characterized in that, include: In multiple predetermined directions of the fingerprint image, the average gray level of multiple predetermined positions centered on the current pixel is determined respectively. The predetermined position refers to the position at a distance of a preset value from the current pixel. The direction of the ridge line at the current pixel is determined based on the average gray level of the multiple predetermined directions; With the current pixel as the origin, rotate in one of the predetermined directions. When the predetermined direction coincides with other predetermined directions, the multiple predetermined positions in the predetermined direction coincide with the multiple predetermined positions in the other predetermined directions. When the current pixel traverses the pixels in the fingerprint image, the orientation of each pixel in the fingerprint image is determined as the fingerprint orientation field of the fingerprint image.
2. The fingerprint orientation field calculation method according to claim 1, characterized in that, Determining the average grayscale of multiple predetermined positions centered on the current pixel in multiple predetermined directions of the fingerprint image includes: In each of the predetermined directions, a line segment of predetermined length centered on the current pixel is determined; Determine multiple equal division points of the line segment as the multiple predetermined positions; Determine the grayscale for each of the predetermined positions; The average gray level is determined based on the gray levels of each of the multiple predetermined locations.
3. The fingerprint orientation field calculation method according to claim 2, characterized in that, The plurality of predetermined locations includes a first predetermined location; determining the grayscale of each predetermined location includes: The first predetermined position is determined to be located in the pixel gap; Determine multiple adjacent pixels at the first predetermined position; The gray level of the first predetermined position is determined based on the gray levels of the multiple adjacent pixels.
4. The fingerprint orientation field calculation method according to claim 3, characterized in that, The coordinates of the pixel have a first precision; determining that the first predetermined position is located in the pixel gap includes: when the coordinates of the first predetermined position have a second precision, determining that the first predetermined position is located in the pixel gap, wherein the second precision is 1 / n of the first precision, and n is an integer multiple of 10.
5. The fingerprint orientation field calculation method according to claim 3, characterized in that, The determination of the plurality of adjacent pixels at the first predetermined position includes: determining the upper left adjacent pixel, the lower left adjacent pixel, the upper right adjacent pixel, and the lower right adjacent pixel at the first predetermined position.
6. The fingerprint orientation field calculation method according to any one of claims 2-5, characterized in that, The plurality of predetermined positions includes a second predetermined position; determining the grayscale of each predetermined position further includes: The second predetermined position is determined to be located on a pixel; Obtain the grayscale of the second predetermined position from the grayscale image of the fingerprint image.
7. The fingerprint orientation field calculation method according to claim 1, characterized in that, The direction of the average grayscale determination line at the current pixel based on the plurality of predetermined directions includes: The mean value of the average gray levels in the multiple predetermined directions is determined to obtain the target average gray level; Determine the difference between the average gray level and the target average gray level for each of the predetermined directions; The predetermined direction corresponding to the maximum value of the difference is determined as the direction of the ridge line at the current pixel point.
8. The fingerprint orientation field calculation method according to claim 1, characterized in that, Also includes: Obtain the orientation of multiple pixels surrounding the current pixel; The orientation of the current pixel is corrected based on the orientation of the plurality of pixels.
9. The fingerprint orientation field calculation method according to claim 8, characterized in that, The step of correcting the orientation of the current pixel based on the orientation of the plurality of pixels includes: The difference between the orientation of the plurality of pixels and the orientation of the current pixel is determined respectively; The current direction is corrected based on the direction of pixels whose difference is less than the threshold.
10. A fingerprint orientation field estimation device, characterized in that, include: The first determining module is used to determine the average gray level of multiple predetermined positions centered on the current pixel in multiple predetermined directions of the fingerprint image, wherein the predetermined position refers to a position at a distance of a preset value from the current pixel; The second determining module is used to determine the direction of the ridge line at the current pixel point based on the average gray level of the plurality of predetermined directions; With the current pixel as the origin, rotate in one of the predetermined directions. When the predetermined direction coincides with other predetermined directions, the multiple predetermined positions in the predetermined direction coincide with the multiple predetermined positions in the other predetermined directions. The third determining module is used to determine the direction of each pixel in the fingerprint image as the fingerprint direction field grayscale of the fingerprint image when the current pixel traverses the pixels in the fingerprint image.
11. A computer device comprising a memory, a processor, and a computer program stored in the memory and executed by the processor, characterized in that, When the processor executes the computer program, it implements the steps of the fingerprint orientation field calculation method as described in any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the fingerprint orientation field calculation method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Direction filtering reinforcement method of fingerprint image
CN101271516A
Method and device for recognizing fingerprint streakline point
CN106503609A