Fingerprint image calibration method and device and storage medium

Through standard DPI lattice molds and image processing algorithms, perspective transformation relationships are established to correct fingerprint images, solving the geometric distortion problem caused by optical sensors, and improving the accuracy and acquisition efficiency of fingerprint recognition.

CN119228695APending Publication Date: 2024-12-31HANGZHOU SYNOCHIP DATA SECURITY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411061231.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

During the fingerprint image acquisition process, existing optical sensors have geometric distortion due to CMOS assembly errors, which affects the accuracy of fingerprint recognition. They also need to manually adjust parameters to achieve standard DPI, which reduces the acquisition efficiency.

Method used

The standard DPI lattice mold is used to collect distorted lattice images, edge enhancement and denoising are performed through image processing algorithms, coordinate systems are established, horizontal lines search algorithm is used to determine the positions of horizontal lines and vertical lines in the effective area, obtain the intersection coordinates, and establish Perspective transformation relationship, fingerprint image correction is performed.

Benefits of technology

The acquired fingerprint images are corrected through perspective transformation relationships, and the standard DPI fingerprint images are output, which improves fingerprint recognition efficiency and solves the problems of geometric distortion and low recognition accuracy caused by optical path problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228695A_ABST
    Figure CN119228695A_ABST
Patent Text Reader

Abstract

The invention discloses a fingerprint image calibration method and device and a storage medium, and belongs to the technical field of fingerprint identification, and the method comprises the steps: taking a standard DPI square grid mold as a reference standard, and obtaining a distorted square grid image of a fingerprint identification system through the standard DPI square grid mold, determining and storing a horizontal straight line, a vertical straight line and an intersection point coordinate between the horizontal straight line and the vertical straight line in an effective area of the distorted square grid by adopting a straight line search algorithm, and establishing a perspective transformation relation according to a relation between coordinates of four vertexes of the effective area in the intersection point coordinate and coordinates of four vertexes of the standard DPI square grid mold; therefore, the perspective transformation relation is applied to a fingerprint acquisition system, and the acquired fingerprint image is corrected through the perspective transformation relation to obtain a standard DPI fingerprint image, so that the fingerprint identification efficiency is improved, and the existing defects are overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of fingerprint recognition, and in particular relates to a fingerprint image calibration method, device and storage medium. Background Art

[0002] The images used in fingerprint recognition are collected by various sensors, such as optical sensors and semiconductor sensors. In actual applications, optical sensors are often chosen to collect fingerprint images due to cost reasons. However, optical sensors have optical path problems. During the image acquisition process, CMOS assembly errors will cause the collected fingerprint images to be geometrically distorted and unable to achieve the standard DPI, which in turn affects the final fingerprint recognition effect and fingerprint image recognition accuracy. Currently, during the production process, manual parameter adjustment is required to ensure that the collected fingerprint images have the required DPI, which reduces the acquisition efficiency of standard DPI fingerprint images.

[0003] Based on the above analysis, this application designs a fingerprint image calibration method, device and storage medium. Summary of the Invention

[0004] The purpose of the present invention is to provide a fingerprint image calibration method, device and storage medium to solve the problem that the existing optical sensor light path problem easily leads to geometric distortion of the collected fingerprint image and thus causes low fingerprint recognition accuracy.

[0005] In order to solve the above problems, the present application provides a fingerprint image calibration method, comprising the following steps:

[0006] S1: using a standard DPI square grid mold to collect a distorted square grid image in a fingerprint recognition system, and using an image processing algorithm to perform edge enhancement and denoising on the distorted square grid image;

[0007] S2: Establish a coordinate system using the edge-processed distorted grid image as a plane. At the same time, obtain the largest valid area in the coordinate system and use a line search algorithm to find and determine the positions and number of horizontal and vertical lines in the valid area. Then, obtain and store the coordinates of each intersection point between the horizontal and vertical lines.

[0008] S3: Obtain the coordinates of the four vertices in the valid area in the intersection coordinates, and compare the coordinates of the four vertices with the coordinates of the four vertices on the standard DPI grid mold to establish a perspective transformation relationship;

[0009] S4: Correcting the collected fingerprint image using the perspective change relationship to obtain a standard DPI fingerprint image.

[0010] As the preferred solution of this application:

[0011] In S1, an image processing algorithm is used to perform edge enhancement and denoising on the distorted grid image, including:

[0012] S11: Use the Gaussian function with a convolution kernel of 3*3 to smooth the image;

[0013] S12: sharpening the smoothed image using a sharpening algorithm with sharpening operators of [-1, -1, -1], [-1, 9, -1], [-1, -1, -1];

[0014] S13: binarizing the sharpened image and removing outlier regions from the binarized image using a connected domain algorithm;

[0015] S14: Perform a dilation operation on the binarized image to fill the holes in the line segments.

[0016] As the preferred solution of this application:

[0017] In S2, a line search algorithm is used to determine the position and number of horizontal and vertical lines in the valid area, including:

[0018] S21: Determine the minimum horizontal value (X min ) and the maximum value (X max ), and the minimum value of the effective area in the vertical direction (Y min ) and the maximum value (Y max );

[0019] S22: Set an inclined straight line in the effective area, the starting point of the straight line is located at ((X min ~X max ), Ymin)) interval, the end point is at ((X min ~X max ), Ymax), use the Bresenham line search algorithm to find the demand points on the line, and calculate and store the coordinates of the middle point between two adjacent demand points until the line search is completed;

[0020] S23: Shift the line rightward or leftward by P pixels and then continue to repeat the above line search algorithm. This operation is repeated until the number of obtained intermediate point coordinate groups is greater than or equal to the upper threshold T. At this time, the intermediate point search is terminated.

[0021] S24: Using the RANSAC algorithm, a straight line fitting is performed on the found number of intermediate point groups in rows or columns to determine the position and number of horizontal and vertical straight lines in the effective area.

[0022] As the preferred solution of this application:

[0023] The value of P is any value between 1 and 10; the value of T is any value between 9 and 11.

[0024] As the preferred solution of this application:

[0025] In S22, when using the Bresenham line search algorithm to search for the required points on the line to determine the position and number of horizontal lines, the left horizontal line and the right horizontal line in the distorted grid image are searched respectively.

[0026] When searching for the horizontal line on the left, the starting point and the end point of the line are points (X min , Y min ) and point (X max +add,Y max );

[0027] When searching for the horizontal line on the right, the starting point and the end point of the line are points (X max , Y min ) and point (X max -add, Y max );

[0028] The value of add can be any value between 5 and 40.

[0029] As the preferred solution of this application:

[0030] In S3, the distorted grid is preliminarily calibrated according to the established perspective transformation relationship, the preliminarily calibrated distorted grid is used as the effective area, and the above steps S2 and S3 are performed again to obtain the final perspective transformation relationship.

[0031] The fingerprint image calibration method according to claim 1 is characterized in that: the standard square grid mold is a square pattern template with a resolution of 500 DPI, the size of each square is 2 mm * 2 mm, and the corresponding pixel size is 39.4 * 39.4.

[0032] The present application also provides a fingerprint image calibration device, which is characterized by comprising:

[0033] A distorted grid image acquisition module, comprising a standard DPI grid mold and an image processing unit. The standard DPI grid mold is used to capture distorted grid images in a fingerprint recognition system. The image processing unit is used to perform edge enhancement and denoising on the distorted grid images using an image processing algorithm.

[0034] A grid line search module establishes a coordinate system using the distorted grid image after edge processing as a plane. It also obtains the largest valid area in the coordinate system and uses a line search algorithm to find and determine the position and number of horizontal and vertical lines in the valid area. It then obtains and stores the coordinates of each intersection point between the horizontal and vertical lines.

[0035] A perspective transformation relationship establishment module, which obtains the coordinates of the four vertices located in the valid area from the intersection coordinates, compares the four vertex coordinates with the four vertex coordinates on the standard DPI grid mold, and then establishes a perspective transformation relationship;

[0036] A standard fingerprint image output module uses a perspective change relationship to correct the collected fingerprint image to obtain a standard DPI fingerprint image.

[0037] The present application also provides a storage medium storing a computer program, which runs the above-mentioned fingerprint image calibration method when executed by a processor.

[0038] Compared with the prior art, the advantages of the fingerprint image calibration method, device and storage medium of the present application are:

[0039] This application uses a standard DPI grid mold as a reference standard, adopts the standard DPI grid mold to obtain a distorted grid image of the fingerprint recognition system, and adopts a straight line search algorithm to determine and store the horizontal straight lines, vertical straight lines and the intersection coordinates between the two in the effective area of ​​the distorted grid. According to the relationship between the coordinates of the four vertices located in the effective area in the intersection coordinates and the coordinates of the four vertices of the standard DPI grid mold, a perspective transformation relationship is established, and then this perspective transformation relationship is applied to the fingerprint collection system. The collected fingerprint image is corrected through the perspective transformation relationship to obtain a standard DPI fingerprint image; that is, this application uses the standard DPI grid mold as an auxiliary, and realizes the correction of the fingerprint image in the fingerprint recognition system by calculating the perspective relationship between the standard DPI grid mold and the distorted grid image, and can output a standard fingerprint image, thereby improving the efficiency of fingerprint recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 This is a flow chart of the fingerprint image calibration method provided by an embodiment of the present invention.

[0041] Figure 2 A schematic structural diagram of a standard 500 DPI square grid mold provided in an embodiment of the present invention.

[0042] Figure 3 A schematic diagram of a distorted grid structure obtained according to an embodiment of the present invention.

[0043] Figure 4 A schematic diagram of a distorted grid structure after edge processing provided by an embodiment of the present invention.

[0044] Figure 5 A schematic diagram of the structure of establishing a coordinate system in a valid area provided by an embodiment of the present invention.

[0045] Figure 6 A schematic diagram of the distribution of intersection points between horizontal and vertical lines provided in an embodiment of the present invention.

[0046] Figure 7 A schematic diagram of the structure of the output standard DPI fingerprint image provided by an embodiment of the present invention.

[0047] Figure 8 A schematic diagram of the distorted grid image structure after preliminary calibration provided by an embodiment of the present invention.

[0048] Figure 9 This is a schematic diagram of the distribution of the upper and lower fitting lines in the horizontal direction on the preliminary calibration image provided by an embodiment of the present invention.

[0049] Figure 10 Schematic diagram of the distribution of vertical left and right fitting lines on the preliminary calibration image provided by an embodiment of the present invention.

[0050] Figure 11 A schematic diagram of the distribution of coordinates of four vertices of the intersection of horizontal and vertical lines on the initial calibration image provided by an embodiment of the present invention.

[0051] Figure 12 A schematic diagram of the distribution of the back-derived four vertex coordinates on the initial calibration image provided by an embodiment of the present invention.

[0052] Figure 13 This is the final corrected grid image provided by the embodiment of the present invention.

[0053] Figure 14 A schematic diagram of the distribution of the left horizontal middle point in the distorted grid provided by an embodiment of the present invention.

[0054] Figure 15 Schematic diagram of the distribution of the horizontally fitted straight lines in the distorted grid on the left side provided by an embodiment of the present invention.

[0055] Figure 16 A schematic diagram of the distribution of the right horizontal middle point in the distorted grid provided by an embodiment of the present invention.

[0056] Figure 17 A schematic diagram of the distribution of the horizontally fitted straight lines in the distorted grid on the right side provided by an embodiment of the present invention.

[0057] Figure 18 A schematic diagram of vertical line fitting provided by an embodiment of the present invention.

[0058] Figure 19 This is a schematic structural diagram of a fingerprint image calibration device provided by an embodiment of the present invention.

[0059] Reference numerals

[0060] Distorted grid image acquisition module 101, grid line search module 201, perspective transformation relationship establishment module 301, standard fingerprint image output module 401. DETAILED DESCRIPTION

[0061] The present invention will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be emphasized that the following description is merely illustrative and is not intended to limit the scope of the present invention and its applications.

[0062] like Figure 1 The present embodiment provides a fingerprint image calibration method, which includes the following steps:

[0063] S1: Use a standard DPI square grid mold to collect the distorted square grid image in the fingerprint recognition system, and use image processing algorithms to perform edge enhancement and denoising on the distorted square grid image.

[0064] In this step, the standard DPI square pattern template used is a square pattern template with a resolution of 500 DPI. The size of each square is 2mm*2mm, and the corresponding pixel size is 39.4*39.4. Figure 2 As shown; in order to improve the acquisition accuracy, the resolution and brightness parameters of the fingerprint system can be adjusted before acquiring the distorted grid image. During acquisition, the standard DPI grid mold is aligned with the scanning area of ​​the fingerprint recognition system for one or more acquisitions. When multiple acquisitions are made, one of the multiple images with high similarity is selected as the target distorted grid image, as shown in Figure 3 shown.

[0065] The edge enhancement and denoising of the collected distorted grid image are performed to improve the clarity of the image. The processed image is as follows: Figure 4 As shown; the specific method for image edge processing in this embodiment preferably includes:

[0066] S11: Use a Gaussian function with a convolution kernel of 3*3 to smooth the image to reduce noise and details in the image. The purpose of setting the convolution kernel to 3*3 is to reduce the convolution kernel and speed up the algorithm.

[0067] S12: sharpening the smoothed image using a sharpening algorithm with sharpening operators of [-1, -1, -1], [-1, 9, -1], [-1, -1, -1]. Compared with traditional sharpening operators, this sharpening operator can enhance the edges and details of the image, especially the lines in the grid image, making them clearer and more obvious;

[0068] S13: Binarizing the sharpened image and removing outlier regions from the binarized image using a connected domain algorithm. In this embodiment, the purpose of binarizing the sharpened image is to convert the grayscale values ​​of the image pixels into black and white for subsequent analysis and processing. The connected domain algorithm is used to remove irrelevant regions in the image to make the valid image region more distinct.

[0069] S14: performing a dilation operation on the binarized image to fill holes in the line segments, so that the lines in the effective image area are more continuous and complete, which is helpful for subsequent image analysis and line search.

[0070] S2: Establish a coordinate system using the distorted grid image after edge processing as a plane. At the same time, obtain the largest valid area in the coordinate system and use a line search algorithm to find and determine the position and number of horizontal and vertical lines in the valid area. Then, obtain and store the coordinates of each intersection point between the horizontal and vertical lines.

[0071] In this step, the plane coordinate system is preferably established with its origin located in the upper left corner, the horizontal line to the right is the X axis, and the vertical line downward is the Y axis, such as Figure 5 As shown, compared with the traditional coordinate system with the origin located in the lower left corner, the advantage of this coordinate system is that it facilitates data storage (when image data is stored, it is stored row by row starting from the upper left corner. Choosing a coordinate system with this structure makes it easier to follow the order of image data and is more convenient to operate).

[0072] After processing the distorted grid image in step S1, the outer contour of the distorted grid image becomes clearer and more obvious. At this time, the maximum effective area of ​​the distorted grid image in the coordinate system can be quickly and accurately determined. The effective area is Figure 5 The green box area.

[0073] The line search algorithm first determines the position and number of horizontal and vertical lines in the valid area. Since the horizontal and vertical lines in the grid are intertwined, the coordinates of the intersection between the two lines can be obtained after the position and number of the horizontal and vertical lines are determined. For example, Figure 6 shown.

[0074] S3: Obtain the coordinates of the four vertices located in the valid area in the intersection coordinates, and compare the four vertex coordinates with the four vertex coordinates on the standard DPI grid mold to establish a perspective transformation relationship. Specifically, use the corresponding points on the selected standard DPI grid image and the distorted grid image (that is, the four vertex coordinates mentioned above) to calculate a 3*3 transformation matrix through the perspective transformation formula. The matrix describes the perspective transformation relationship from the standard DPI grid image to the distorted grid image.

[0075] The specific calculation process can be implemented through programming, for example, using the getPerspectiveTransform function provided by the OpenCV library in Python, inputting the coordinates of the corresponding points of the obtained standard DPI grid image and the distorted grid image, and then obtaining the perspective transformation matrix.

[0076] S4: Correct the collected fingerprint image using the perspective transformation relationship to obtain a standard DPI fingerprint image. Specifically, obtain multiple points in the distorted fingerprint image, transform the multiple points using the perspective transformation relationship calculated in step S3, and obtain their corresponding positions in the standard grid. Then, the standard DPI fingerprint image can be output, such as Figure 7 shown.

[0077] In this embodiment, it is preferred that in S3, the distorted grid is preliminarily calibrated according to the established perspective transformation relationship, and then the preliminarily calibrated distorted grid is used as the target image, and the above steps S2 and S3 are performed again to obtain the final perspective transformation relationship, that is, the perspective transformation relationship is calibrated to further improve the accuracy of the output fingerprint image.

[0078] The steps for preliminary calibration of the distorted grid based on the established perspective transformation relationship include:

[0079] Use the calculated perspective transformation matrix to transform the other intersection points in the distorted grid to obtain the corresponding position of the distorted grid image in the standard grid. This process can be implemented through the warpPerspective function in the OpenCV library. By inputting parameters such as the other intersection points in the distorted grid, the perspective transformation matrix, and the size of the output image, the image after perspective transformation can be obtained, that is, the distorted grid image after preliminary calibration, such as Figure 8 shown.

[0080] The distorted grid image after preliminary calibration is used as the target image, and the above steps S2 and S3 are performed again. Specifically, the horizontal and vertical lines in the target image are searched respectively using the line search algorithm, as shown in FIG. Figure 9-10 As shown, the intersection coordinates of the four top positions of the target image are selected according to the intersection of the horizontal and vertical lines, as shown in Figure 11 As shown, based on the coordinates and the perspective transformation relationship established in step S4, the positions of the four vertex coordinates in the initial distorted grid image can be inferred by using the inverse transformation of the perspective transformation. Specifically:

[0081] The perspective transformation matrix H is a 3*3 transformation matrix that maps the point (x, y) in the original image to the point (x', y') in the new image.

[0082] When pushing back:

[0083] Use the inverse matrix H of the perspective transformation -1 To reverse the positions of the above four vertex coordinates in the initial distorted grid image, the reverse formula is

[0084] Calculate the inverse matrix H of the perspective transformation matrix H -1 , and then substitute the coordinates of the intersection points at the four top positions in the target image into the above formula to obtain the corresponding coordinates of the four vertex coordinates in the initial distorted grid image. The specific positions are as follows: Figure 12 shown.

[0085] The coordinate group at this time is more accurate. Finally, the final perspective transformation relationship is calculated using the four vertex coordinates of the reversed four vertex coordinates and the four vertex coordinates of the standard DPI grid image. The final corrected grid image is as follows Figure 13 shown.

[0086] In this embodiment, in S2, a line search algorithm is used to determine the positions and numbers of horizontal lines and vertical lines in the valid area, specifically including:

[0087] S21: Determine the minimum horizontal value (X min ) and the maximum value (X max ), and the minimum value of the effective area in the vertical direction (Y min ) and the maximum value (Y max );

[0088] S22: Set an inclined straight line in the effective area, the starting point of the straight line is located at ((X min ~X max ), Ymin)) interval, the end point is at ((X min ~X max ), Ymax), the Bresenham line search algorithm is used to search for demand points on the line, and the coordinates of the middle point between two adjacent demand points are calculated and stored until the line search is completed; in this embodiment, the demand points are points on the line that change from black to white (that is, the pixel value changes from 0 to 255) and points that change from white to black (that is, the pixel value changes from 255 to 0), and the two-dimensional coordinates of these points are temporarily stored in pairs.

[0089] S23: After translating the straight line to the right or left by P pixels, continue to repeat the above-mentioned straight line search algorithm, and loop this operation until the number of intermediate point coordinate groups obtained is greater than or equal to the upper threshold value T, at which time the intermediate point search is terminated; in this embodiment, translating the straight line to the right or left facilitates the search for multiple intermediate points, which is conducive to the accurate fitting of subsequent straight lines; in this embodiment, the value of P is any value between 1 and 10, preferably 5; the value of T is any value between 9 and 11, preferably 10.

[0090] S24: Using the RANSAC algorithm, a straight line fitting is performed on the found number of intermediate point groups in rows or columns to determine the position and number of horizontal and vertical straight lines in the effective area.

[0091] In step S22 , in order to improve the fitting accuracy, in the horizontal line search step, the left horizontal line and the right horizontal line in the distorted grid image are searched separately.

[0092] The steps to find the left horizontal line include:

[0093] The starting point and end point of the straight line are points (X min , Y min ) and point (X max +add,Y max ), wherein the value of add is any value between 5 and 40, preferably 20, and the purpose of selecting the add is to ensure that the straight line is inclined; Bresenham straight line search algorithm is used to find the straight line from point (X min , Y min ) Start searching for demand points along the straight line and calculate and store the midpoint between the two demand points. After completing the search for the straight line, move 5 pixels to the right and continue to execute the Bresenham line search algorithm. Repeat the above operation and traverse X min ~X max Interval, until the number of intermediate points obtained is greater than the upper threshold T, the intermediate point search is terminated, such as Figure 14 shown.

[0094] The RANSAC iterative method is used to estimate the parameters of the straight line mathematical model from the data containing multiple sets of intermediate points. The fitted straight line model is expressed in the form of y=ax+b or x=c. According to the number of squares N, N+1 sets of (a, b, c) parameters representing the straight line will be obtained, and then the fitted straight line on the left is as follows: Figure 15 shown.

[0095] When searching for the horizontal line on the right, the starting point and end point of the line are points (X max , Y min ) and point (Xmax -add, Y max ); The calculation of the horizontal line on the right is similar to that on the left, and the traversal range is also X min ~X max , use the Bresenham line search algorithm to find the middle point on the line at the initial position, and after completing the current search, move the line to the left by P pixels, and cycle in sequence until the number of middle points obtained is greater than or equal to the upper threshold, then stop the middle point search, such as Figure 16 As shown, it is a schematic diagram of the distribution of the middle points searched in the horizontal direction on the right.

[0096] The RANSAC iterative method is used to estimate the parameters of the straight line mathematical model from the data containing multiple sets of intermediate points. The fitted straight line model is expressed in the form of y=ax+b or x=c, which means that N+1 sets of (a, b, c) parameters representing the straight line are obtained. The fitted straight line is as follows: Figure 17 shown.

[0097] The method of finding a straight line in the vertical direction is similar to that in the horizontal direction. The difference is that since the midpoints obtained by the above-mentioned straight line search method are in the horizontal direction, the fitting of the horizontal straight line can directly use the calculated multiple groups of horizontal midpoints, while the fitting of the vertical straight line is to select one point from each group of horizontal midpoints for fitting. For example, the fitting of the first vertical line uses the first point of each group of horizontal midpoints, which can increase the accuracy of the straight line calculation. Since the determination of the vertical straight line is similar to that of the horizontal straight line, this embodiment will not be described in detail. Figure 18 As shown, it is a fitting schematic diagram of the vertical line provided in this embodiment.

[0098] In summary, the method of this embodiment uses the standard DPI grid mold as a reference standard, adopts the standard DPI grid mold to obtain the distorted grid image of the fingerprint recognition system, and adopts a line search algorithm to determine and store the horizontal straight lines, vertical straight lines and the intersection coordinates between the two in the effective area of ​​the distorted grid. A perspective transformation relationship is established based on the relationship between the coordinates of the four vertices located in the effective area in the intersection coordinates and the coordinates of the four vertices of the standard DPI grid mold. This perspective transformation relationship is then applied to the fingerprint collection system, and the collected fingerprint image is corrected through the perspective transformation relationship to obtain a standard DPI fingerprint image. That is, this embodiment uses the standard DPI grid mold as an auxiliary, and realizes the correction of the fingerprint image in the fingerprint recognition system by calculating the perspective relationship between the standard DPI grid mold and the distorted grid image, so as to output a standard fingerprint image and improve the fingerprint recognition efficiency.

[0099] like Figure 19As shown, the present application also provides a fingerprint image calibration device, which includes a distorted grid image acquisition module, a grid line search module 201, a perspective transformation relationship establishment module 301 and a standard fingerprint image output module 401.

[0100] The distorted grid image acquisition module includes a standard DPI grid mold and an image processing unit. The standard DPI grid mold is used to collect the distorted grid image in the fingerprint recognition system, and the image processing unit is used to use an image processing algorithm to perform edge enhancement and denoising on the distorted grid image.

[0101] In this embodiment, the standard DPI square grid mold used is a square pattern template with a resolution of 500 DPI. The size of each square is 2mm*2mm, and the corresponding pixel size is 39.4*39.4. In order to improve the acquisition accuracy, before acquiring the distorted square grid image, the resolution and brightness and other parameters of the fingerprint system can be adjusted. During acquisition, the standard DPI square grid mold is aligned with the scanning area of ​​the fingerprint recognition system for one or more acquisitions. When multiple acquisitions are performed, one image among the multiple images with high similarity is selected as the target distorted square grid image.

[0102] In this embodiment, edge enhancement and denoising are performed on the collected distorted grid image to improve the clarity of the image. In this embodiment, the specific method for the image processing unit to process the image edge includes:

[0103] S11: Use a Gaussian function with a convolution kernel of 3*3 to smooth the image to reduce noise and details in the image. The purpose of setting the convolution kernel to 3*3 is to reduce the convolution kernel and speed up the algorithm.

[0104] S12: sharpening the smoothed image using a sharpening algorithm with sharpening operators of [-1, -1, -1], [-1, 9, -1], [-1, -1, -1]. Compared with traditional sharpening operators, this sharpening operator can enhance the edges and details of the image, especially the lines in the grid image, making them clearer and more obvious;

[0105] S13: Binarizing the sharpened image and removing outlier regions from the binarized image using a connected domain algorithm. In this embodiment, the purpose of binarizing the sharpened image is to convert the grayscale values ​​of the image pixels into black and white for subsequent analysis and processing. The connected domain algorithm is used to remove irrelevant regions in the image to make the valid image region more distinct.

[0106] S14: performing a dilation operation on the binarized image to fill holes in the line segments, so that the lines in the effective image area are more continuous and complete, which is helpful for subsequent image analysis and line search.

[0107] The grid line search module 201 establishes a coordinate system using the distorted grid image after edge processing as a plane. At the same time, it obtains the largest valid area in the coordinate system and uses a line search algorithm to find and determine the position and number of horizontal and vertical lines in the valid area. It then obtains and stores the coordinates of each intersection point between the horizontal and vertical lines.

[0108] In this embodiment, the grid line search module 201 first establishes a plane coordinate system before searching. The plane coordinate system preferably has its origin at the upper left corner, the horizontal rightward line is the X axis, and the vertical downward line is the Y axis, such as Figure 5 As shown, compared with the traditional coordinate system with the origin located in the lower left corner, the advantage of this coordinate system is that it facilitates data storage (when image data is stored, it is stored row by row starting from the upper left corner. Choosing a coordinate system with this structure makes it easier to follow the order of image data and is more convenient to operate).

[0109] After the distorted grid image acquisition module processes the distorted grid image, the outer contour of the distorted grid image becomes clearer and more obvious. At this time, the maximum effective area of ​​the distorted grid image in the coordinate system can be quickly and accurately determined. The effective area is Figure 5 The green box area.

[0110] The grid line search module 201 uses a line search algorithm to determine the positions and numbers of horizontal lines and vertical lines in the valid area. Since the horizontal lines and vertical lines in the grid intersect with each other, the coordinates of the intersection between the two lines can be obtained after the positions and numbers of the horizontal lines and vertical lines are determined. Figure 6 shown.

[0111] In this embodiment, a line search algorithm is used to determine the positions and numbers of horizontal and vertical lines in the valid area, specifically including:

[0112] S21: Determine the minimum horizontal value (X min ) and the maximum value (X max ), and the minimum value of the effective area in the vertical direction (Y min ) and the maximum value (Y max );

[0113] S22: Set an inclined straight line in the effective area, the starting point of the straight line is located at ((X min ~X max ), Ymin)) interval, the end point is at ((X min ~X max), Ymax), the Bresenham line search algorithm is used to search for demand points on the line, and the coordinates of the middle point between two adjacent demand points are calculated and stored until the line search is completed; in this embodiment, the demand points are points on the line that change from black to white (that is, the pixel value changes from 0 to 255) and points that change from white to black (that is, the pixel value changes from 255 to 0), and the two-dimensional coordinates of these points are temporarily stored in pairs.

[0114] S23: After translating the straight line to the right or left by P pixels, continue to repeat the above-mentioned straight line search algorithm, and loop this operation until the number of intermediate point coordinate groups obtained is greater than or equal to the upper threshold value T, at which time the intermediate point search is terminated; in this embodiment, translating the straight line to the right or left facilitates the search for multiple intermediate points, which is conducive to the accurate fitting of subsequent straight lines; in this embodiment, the value of P is any value between 1 and 10, preferably 5; the value of T is any value between 9 and 11, preferably 10.

[0115] S24: Using the RANSAC algorithm, a straight line fitting is performed on the found number of intermediate point groups in rows or columns to determine the position and number of horizontal and vertical straight lines in the effective area.

[0116] In step S22 , in order to improve the fitting accuracy, in the horizontal line search step, the left horizontal line and the right horizontal line in the distorted grid image are searched separately.

[0117] The steps to find the left horizontal line include:

[0118] The starting point and end point of the straight line are points (X min , Y min ) and point (X max +add,Y max ), wherein the value of add is any value between 5 and 40, preferably 20, and the purpose of selecting the add is to ensure that the straight line is inclined; Bresenham straight line search algorithm is used to find the straight line from point (X min , Y min ) Start searching for demand points along the straight line and calculate and store the midpoint between the two demand points. After completing the search for the straight line, move 5 pixels to the right and continue to execute the Bresenham line search algorithm. Repeat the above operation and traverse X min ~X max Interval, until the number of intermediate points obtained is greater than the upper threshold T, the intermediate point search is terminated, such as Figure 14 shown.

[0119] The RANSAC iterative method is used to estimate the parameters of the straight line mathematical model from the data containing multiple sets of intermediate points. The fitted straight line model is expressed in the form of y=ax+b or x=c. According to the number of squares N, N+1 sets of (a, b, c) parameters representing the straight line will be obtained, and then the fitted straight line on the left is as follows: Figure 15 shown.

[0120] When searching for the horizontal line on the right, the starting point and end point of the line are points (X max , Y min ) and point (X max -add, Y max ); The calculation of the horizontal line on the right is similar to that on the left, and the traversal range is also X min ~X max , use the Bresenham line search algorithm to find the middle point on the line at the initial position, and after completing the current search, move the line to the left by P pixels, and cycle in sequence until the number of middle points obtained is greater than or equal to the upper threshold, then stop the middle point search, such as Figure 16 As shown, it is a schematic diagram of the distribution of the middle points searched in the horizontal direction on the right.

[0121] The RANSAC iterative method is used to estimate the parameters of the straight line mathematical model from the data containing multiple sets of intermediate points. The fitted straight line model is expressed in the form of y=ax+b or x=c, which means that N+1 sets of (a, b, c) parameters representing the straight line are obtained. The fitted straight line is as follows: Figure 17 shown.

[0122] The method of finding a straight line in the vertical direction is similar to that in the horizontal direction. The difference is that since the midpoints obtained by the above-mentioned straight line search method are in the horizontal direction, the fitting of the horizontal straight line can directly use the calculated multiple groups of horizontal midpoints, while the fitting of the vertical straight line is to select one point from each group of horizontal midpoints for fitting. For example, the fitting of the first vertical line uses the first point of each group of horizontal midpoints, which can increase the accuracy of the straight line calculation. Since the determination of the vertical straight line is similar to that of the horizontal straight line, this embodiment will not be described in detail. Figure 18 As shown, it is a fitting schematic diagram of the vertical line provided in this embodiment.

[0123] The perspective transformation relationship establishment module 301 obtains the coordinates of the four vertices located in the valid area in the intersection coordinates, and establishes a perspective transformation relationship after comparing the four vertex coordinates with the four vertex coordinates on the standard DPI grid mold; specifically, using the corresponding points on the selected standard DPI grid image and the distorted grid image (that is, the four vertex coordinates mentioned above), a 3*3 transformation matrix is ​​calculated through the perspective transformation formula, which describes the perspective transformation relationship from the standard DPI grid image to the distorted grid image.

[0124] The specific calculation process can be implemented through programming, for example, using the getPerspectiveTransform function provided by the OpenCV library in Python, inputting the coordinates of the corresponding points of the obtained standard DPI grid image and the distorted grid image, and then obtaining the perspective transformation matrix.

[0125] The standard fingerprint image output module 401 uses the perspective transformation relationship to correct the collected fingerprint image to obtain a standard DPI fingerprint image. Specifically, multiple points in the distorted fingerprint image are obtained, and the multiple points are transformed using the perspective transformation relationship calculated in step S3 to obtain their corresponding positions in the standard grid, and then the standard DPI fingerprint image can be output.

[0126] In this embodiment, after completing the establishment of the preliminary perspective transformation relationship, the perspective transformation relationship establishment module 301 performs preliminary calibration on the distorted grid according to the established perspective transformation relationship, and then uses the preliminary calibrated distorted grid as the target image, and again obtains the final perspective transformation relationship through the grid line search module 201 and the perspective transformation relationship establishment module 301, that is, calibrates the perspective transformation relationship, thereby further improving the accuracy of the output fingerprint image.

[0127] In this embodiment, the step of performing preliminary calibration on the distorted grid according to the established perspective transformation relationship specifically includes:

[0128] Use the calculated perspective transformation matrix to transform the other intersection points in the distorted grid to obtain the corresponding positions of the distorted grid image in the standard grid. This process can be implemented using the warpPerspective function in the OpenCV library. By inputting parameters such as the other intersection points in the distorted grid, the perspective transformation matrix, and the size of the output image, you can get the image after perspective transformation, that is, the distorted grid image after preliminary calibration.

[0129] The distorted grid image after preliminary calibration is used as the target image, and the final perspective transformation relationship is obtained again through the grid line search module 201 and the perspective transformation relationship establishment module 301; specifically, the horizontal and vertical lines in the target image are searched respectively using the line search algorithm, such as Figure 9-10 As shown, the intersection coordinates of the four top positions of the target image are selected according to the intersection of the horizontal and vertical lines, as shown in Figure 11 As shown, according to the coordinates and the perspective transformation relationship established in step S4, the positions of the four vertex coordinates in the initial distorted grid image are reversed, as shown in FIG. Figure 12As shown, the coordinate group at this time is more accurate. Finally, the final perspective transformation relationship is calculated using the four vertex coordinates of the reversed four vertex coordinates and the four vertex coordinates of the standard DPI grid image. The final corrected grid image is as follows Figure 13 shown.

[0130] From the above analysis, it can be seen that the device of this embodiment has a simple structure and is easy to use. Its standard DPI square grid mold is used as a reference standard. By calculating the perspective relationship between the standard DPI square grid mold and the distorted square grid image, the fingerprint image in the fingerprint recognition system is corrected, and a standard fingerprint image can be output, thereby improving the efficiency of fingerprint recognition.

[0131] As a preferred embodiment of the present application, the present application further provides a storage medium storing a computer program, which runs the fingerprint image calibration method described in the above embodiment when executed by a processor.

[0132] The above is only an embodiment of the present invention, and the common knowledge such as the specific structure and characteristics of the scheme is not described in detail here. It should be pointed out that for those skilled in the art, several improvements can be made without departing from the present invention, and these should also be regarded as the scope of protection of the present invention. These will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of the claims, and the specific implementation methods and other records in the description can be used to interpret the content of the claims.

Claims

1. A fingerprint image calibration method, characterized in that: The following steps are included: S1: using a standard DPI square grid mold to collect a distorted square grid image in a fingerprint recognition system, and using an image processing algorithm to perform edge enhancement and denoising on the distorted square grid image; S2: Establish a coordinate system with the distorted square grid image after edge processing as the plane, and at the same time, obtain the largest valid area in the coordinate system, and use the line search algorithm to find and determine the position and number of horizontal lines and vertical lines in the valid area, and then obtain and store the coordinates of each intersection between the horizontal lines and the vertical lines; S3: Obtain the coordinates of the four vertices in the effective area in the intersection coordinates, and compare the four vertex coordinates with the four vertex coordinates on the standard DPI square grid mold to establish a perspective transformation relationship; S4: Correcting the collected fingerprint image using the perspective change relationship to obtain a standard DPI fingerprint image.

2. The fingerprint image calibration method according to claim 1, characterized in that: In S1, an image processing algorithm is used to perform edge enhancement and denoising on the distorted square grid image, including: S11: Use the Gaussian function with a convolution kernel of 3*3 to smooth the image; S12: sharpening the smoothed image using a sharpening algorithm with sharpening operators of [-1, -1, -1], [-1, 9, -1], [-1, -1, -1]; S13: binarizing the sharpened image, and removing outlier regions from the binarized image using a connected domain algorithm; S14: Perform a dilation operation on the binarized image to fill the holes in the line segments.

3. The fingerprint image calibration method according to claim 1, characterized in that: In S2, a line search algorithm is used to determine the position and number of horizontal and vertical lines in the effective area, including: S21: Determine the minimum horizontal value (X min ) and the maximum value (X max ), and the minimum vertical value of the effective area (Y min ) and the maximum value (Y max ); S22: Set an inclined straight line in the effective area, the starting point of which is located at ((X min ~X max ), Ymin)) and the end point is located at ((X min ~X max ), Ymax), using the Bresenham straight line search algorithm to find the demand points on the straight line, and calculating and storing the coordinates of the middle points of two adjacent demand points until the straight line search is completed; S23: Shift the straight line to the right or left by P pixels and continue to repeat the straight line search algorithm. This operation is repeated until the number of intermediate point coordinate groups obtained is greater than or equal to the upper threshold value T. At this time, the intermediate point search is terminated. S24: Using the RANSAC algorithm, straight line fitting is performed on the found number of intermediate point groups in rows or columns to determine the positions and numbers of horizontal and vertical straight lines in the effective area.

4. The fingerprint image calibration method according to claim 3, characterized in that: The value of P is any value between 1 and 10; the value of T is any value between 9 and 11.

5. The fingerprint image calibration method according to claim 3, characterized in that: In S22, when using the Bresenham line search algorithm to search for the required points on the line to determine the position and number of horizontal lines, the left horizontal line and the right horizontal line in the distorted grid image are searched respectively. When searching for the horizontal line on the left, the starting point and the end point of the line are respectively (X min , Y min ) and point (X max +add,Y max ); When searching for the horizontal line on the right, the starting point and the end point of the line are respectively (X max , Y min ) and point (X max -add,Y max ); The value of add can be any value between 5 and 40.

6. The fingerprint image calibration method according to claim 1, characterized in that: In S3, the distorted grid is preliminarily calibrated according to the established perspective transformation relationship, the preliminarily calibrated distorted grid is used as the effective area, and the above steps S2 and S3 are performed again to obtain the final perspective transformation relationship.

7. The fingerprint image calibration method according to claim 1, characterized in that: The standard square grid mold is a square pattern template with a resolution of 500 DPI, the size of each square is 2mm*2mm, and the corresponding pixel size is 39.4*39.

4.

8. A fingerprint image calibration device, characterized in that: Include: A distorted square grid image acquisition module, which includes a standard DPI square grid mold and an image processing unit. The standard DPI square grid mold is used to collect distorted square grid images in a fingerprint recognition system. The image processing unit is used to perform edge enhancement and denoising on the distorted square grid images using an image processing algorithm. A square grid straight line search module, which establishes a coordinate system with the distorted square grid image after edge processing as a plane, and at the same time, obtains the largest valid area in the coordinate system, and uses a straight line search algorithm to find and determine the position and number of horizontal lines and vertical lines in the valid area, and then obtains and stores the coordinates of each intersection between the horizontal lines and the vertical lines; A perspective transformation relationship establishment module, which obtains the coordinates of the four vertices located in the effective area in the intersection coordinates, and compares the four vertex coordinates with the four vertex coordinates on the standard DPI square grid mold to establish a perspective transformation relationship; A standard fingerprint image output module uses a perspective change relationship to correct the collected fingerprint image to obtain a standard DPI fingerprint image.

9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the fingerprint image calibration method according to any one of claims 1 to 7 is executed.

Citation Information

Patent Citations

  • Correction algorithm for image distortion of optical fingerprint collector

    CN101847202A

  • Method for extracting characteristic points of checkerboard calibration plate by using camera and corresponding joint calibration method

    CN114638899A