Fingerprint image processing method and fingerprint image processing device
By using the direction information of adjacent blocks and discrete Fourier transform energy, the direction of the fingerprint image block is determined, which solves the problem of high computing overhead in the prior art, and improves the efficiency and accuracy of fingerprint image processing.
Patent Information
- Application Number
- CN202411251939.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-01-03
AI Technical Summary
Existing fingerprint image processing methods require repeated calculations when calculating the direction of each block, resulting in large calculation overhead and increased delay, especially in some scenarios, which will significantly increase the time for fingerprint recognition.
By obtaining the initial direction of the current block, using the direction information of the adjacent blocks, combined with discrete Fourier transform energy, the direction of the current block is determined from multiple candidate directions, reducing unnecessary calculations and improving calculation efficiency.
The accuracy of fingerprint image processing is improved, especially in areas with large direction changes, and the calculation time of fingerprint image full image is reduced.
Smart Images

Figure CN119251878A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to image processing technology, and more specifically, to a fingerprint image processing method and a fingerprint image processing device. Background Art
[0002] Biometrics are physical measurements and calculations related to human characteristics. For example, fingerprint biometrics can be used to verify or identify a person. Fingerprints are highly secure biometrics that can be used for identity verification. Fingerprint recognition can rely on the extraction of fingerprint features. Minutiae points are a commonly used fingerprint feature. The extraction of minutiae points is crucial for fingerprint recognition.
[0003] Figure 1 It is the fingerprint feature extraction process of NBIS (NIST Biometric Image Software). For the fingerprint feature extraction process, the fingerprint image can be divided into blocks according to a specific size, and each block can calculate the direction independently. Commonly used methods for calculating the direction may include the gradient method and the discrete Fourier transform (Discrete Fourier Transform, DFT) method. Among them, the gradient method is sensitive to noise, and the DFT method generally expands the size of the calculated block for smoothing, so the DFT method has high accuracy.
[0004] Regardless of the method used, existing solutions usually require repeated calculations for each block to calculate the direction of each block separately, which is very computationally expensive and can greatly increase latency in some scenarios. Summary of the invention
[0005] The present disclosure provides a fingerprint image processing method and a fingerprint image processing device for improving fingerprint image processing.
[0006] According to a first aspect of an exemplary embodiment of the present disclosure, a fingerprint image processing method is provided, comprising: receiving a plurality of blocks of a block matrix representing a fingerprint image; processing a first set of blocks among the plurality of blocks, comprising: obtaining a plurality of candidate directions of a current block, wherein the plurality of candidate directions include an initial direction of the current block, directions of at least a predetermined number of blocks to the left and to the right of the current block, respectively, the initial direction being determined using directions of left adjacent blocks and upper adjacent blocks of the current block; and determining the direction of the current block from the plurality of candidate directions using discrete Fourier transform energies of the plurality of candidate directions.
[0007] In an embodiment, the fingerprint image processing method may further include: determining an initial direction of a current block, wherein determining the initial direction of the current block may include: determining a first direction number corresponding to a direction of a left adjacent block and a second direction number corresponding to a direction of an upper adjacent block; and using the first direction number and the second direction number to determine the initial direction of the current block.
[0008] In an embodiment, using the first direction number and the second direction number to determine the initial direction of the current block may include: when the absolute value of the difference between the first direction number and the second direction number is less than or equal to a predetermined threshold, obtaining a first average value of the first direction number and the second direction number, and using the direction corresponding to the first average value as the initial direction of the current block; when the absolute value of the difference between the first direction number and the second direction number is greater than the predetermined threshold, adding the small direction number to the total direction number to obtain an adjusted direction number, obtaining a second average value of the adjusted direction number and the large direction number, and using the direction corresponding to the second average value as the initial direction of the current block, wherein the small direction number is the smaller direction number of the first direction number and the second direction number, and the large direction number is the larger direction number of the first direction number and the second direction number.
[0009] In an embodiment, the fingerprint image processing method may further include: before using the discrete Fourier transform energy of multiple candidate directions to determine the direction of the current block from multiple candidate directions, processing each candidate direction in the multiple candidate directions, including: performing pixel row addition processing on the block of the current candidate direction to obtain the pixel sum corresponding to the current candidate direction; multiplying the pixel sum corresponding to the multiple candidate directions with the trigonometric functions of multiple frequencies to obtain the energy combination corresponding to each of the multiple frequencies; and using the energy combination corresponding to each of the multiple frequencies as the discrete Fourier transform energy.
[0010] In an embodiment, using discrete Fourier transform energies of multiple candidate directions to determine the direction of the current block from multiple candidate directions may include: obtaining the maximum value in each energy combination and the ratio of the maximum value to the mean of the corresponding energy combination; determining a unique predetermined energy combination among all energy combinations, wherein the predetermined energy combination satisfies a predetermined condition, wherein the predetermined condition is that the maximum value of the energy combination evaluation is greater than a first threshold and the ratio corresponding to the energy combination is greater than a second threshold; and taking the candidate direction corresponding to the maximum value in the predetermined energy combination as the direction of the current block.
[0011] In an embodiment, when the energy combination does not satisfy a predetermined condition, the original method may be used to calculate the direction of the current block.
[0012] In an embodiment, using discrete Fourier transform energies of multiple candidate directions to determine the direction of the current block from multiple candidate directions may include: obtaining the maximum value in each energy combination; sorting the energy combinations in order of the maximum values from large to small; and processing the sorted energy combinations in sequence as follows, including: obtaining the ratio of the maximum value of the current energy combination to the mean of the current energy combination; when the current energy combination meets a predetermined condition, stopping processing the subsequent energy combinations, and taking the candidate direction corresponding to the maximum value in the current energy combination as the direction of the current block, wherein the predetermined condition is that the maximum value of the energy combination is greater than a first threshold and the ratio corresponding to the energy combination is greater than a second threshold; when the maximum value of the current energy combination is less than or equal to the first threshold, stopping processing the sorted energy combination; when the maximum value of the current energy combination is greater than the first threshold and the ratio corresponding to the current energy combination is less than or equal to the second threshold, continuing to process the next energy combination in the sorted energy combination.
[0013] In an embodiment, when the energy combination does not satisfy a predetermined condition, the original method may be used to calculate the direction of the current block.
[0014] In an embodiment, the fingerprint image processing method may further include: processing a second set of blocks among the plurality of blocks using an original method to calculate directions of the second set of blocks, wherein the second set of blocks are arranged in at least one of edge rows or edge columns of the block matrix.
[0015] According to a second aspect of an exemplary embodiment of the present disclosure, a fingerprint image processing method is provided, comprising: dividing a fingerprint image to obtain a block matrix including a plurality of blocks; for each block except the first row and the first column in the block matrix, performing the following processing: obtaining a plurality of candidate directions of a current block, wherein the plurality of candidate directions include an initial direction of the current block, directions of a predetermined number of blocks to the left of the current block and to the right of the current block, respectively, and the initial direction is determined based on a direction of a left adjacent block and a direction of an upper adjacent block of the current block; and determining a direction of the current block from the plurality of candidate directions using discrete Fourier transform energies of the plurality of candidate directions.
[0016] In an embodiment, the fingerprint image processing method may further include determining an initial direction of a current block, wherein determining the initial direction of the current block may include: determining a first direction number corresponding to a direction of a left adjacent block and a second direction number corresponding to a direction of an upper adjacent block; and using the first direction number and the second direction number to determine the initial direction of the current block.
[0017] In an embodiment, the first direction number and the second direction number are used to determine the initial direction of the current block, including: when the absolute value of the difference between the first direction number and the second direction number is less than or equal to a predetermined threshold, obtaining a first average value of the first direction number and the second direction number, and using the direction corresponding to the first average value as the initial direction of the current block; when the absolute value of the difference between the first direction number and the second direction number is greater than the predetermined threshold, adding the small direction number to the total direction number to obtain an adjusted direction number, and obtaining a second average value of the adjusted direction number and the large direction number, and using the direction corresponding to the second average value as the initial direction of the current block, wherein the small direction number is the smaller direction number of the first direction number and the second direction number, and the large direction number is the larger direction number of the first direction number and the second direction number.
[0018] In an embodiment, the fingerprint image processing method further includes: before using the discrete Fourier transform energy of multiple candidate directions to determine the direction of the current block from multiple candidate directions, processing each candidate direction in the multiple candidate directions, including: performing pixel row addition processing on the block of the current candidate direction to obtain the pixel sum corresponding to the current candidate direction; multiplying the pixel sum corresponding to the multiple candidate directions with the trigonometric functions of multiple frequencies to obtain the energy combination corresponding to each of the multiple frequencies; and using the energy combination corresponding to each of the multiple frequencies as the discrete Fourier transform energy.
[0019] In an embodiment, based on the discrete Fourier transform energy of multiple candidate directions, the direction of the current block is determined from multiple candidate directions, including: obtaining the maximum value in each energy combination and the ratio of the maximum value to the mean of the corresponding energy combination; determining a unique predetermined energy combination among all energy combinations, wherein the predetermined energy combination satisfies a predetermined condition, the predetermined condition being that the maximum value of the energy combination is greater than a first threshold and the ratio corresponding to the energy combination is greater than a second threshold; and taking the candidate direction corresponding to the maximum value in the predetermined energy combination as the direction of the current block.
[0020] In an embodiment, in a case where the energy combination does not satisfy a predetermined condition, calculating the direction of the current block may be performed by using an original method.
[0021] In an embodiment, the discrete Fourier transform energy of multiple candidate directions is used to determine the direction of the current block from multiple candidate directions, and also includes: obtaining the maximum value in each energy combination; sorting all energy combinations in order of the maximum value from large to small; and processing the sorted energy combinations in sequence as follows, including: obtaining the ratio of the maximum value of the current energy combination to the mean of the current energy combination; when the current energy combination meets a predetermined condition, stopping processing the subsequent energy combinations, and taking the candidate direction corresponding to the maximum value in the current energy combination as the direction of the current block, wherein the predetermined condition is that the maximum value of the energy combination is greater than a first threshold and the ratio corresponding to the energy combination is greater than a second threshold; when the maximum value of the current energy combination is less than or equal to the first threshold, stopping processing the sorted energy combination; when the maximum value of the current energy combination is greater than the first threshold and the ratio corresponding to the current energy combination is less than or equal to the second threshold, continuing to process the next energy combination in the sorted energy combination.
[0022] In an embodiment, in a case where the energy combination does not satisfy a predetermined condition, the direction of the current block is calculated by using an original method.
[0023] In an embodiment, after dividing the fingerprint image to obtain a block matrix including at least one block, the fingerprint image processing method may include: using an original method to calculate the directions of the blocks on the first row and the first column of the block matrix.
[0024] According to an exemplary embodiment of the present disclosure, a fingerprint image processing device is provided, comprising: a division unit, configured to divide a fingerprint image to obtain a block matrix including a plurality of blocks; a direction determination unit, configured to perform the following processing on each block except the first row and the first column in the block matrix: obtaining a plurality of candidate directions of a current block, wherein the plurality of candidate directions include an initial direction of the current block and directions of a predetermined number of blocks to the left and right of the current block, the initial direction being determined based on directions of a left adjacent block and an upper adjacent block of the current block; and determining the direction of the current block from the plurality of candidate directions based on discrete Fourier transform energies of the plurality of candidate directions.
[0025] According to an exemplary embodiment of the present disclosure, a fingerprint image processing device may include: a processor; and a computer-readable storage medium storing a computer program, wherein when the computer program is executed by the processor, a method of a direction determination unit is implemented.
[0026] In an embodiment, the direction determination unit is further configured to: determine the initial direction of the current block, wherein determining the initial direction of the current block includes: determining a first direction number corresponding to the direction of the left adjacent block and a second direction number corresponding to the direction of the upper adjacent block; and using the first direction number and the second direction number to determine the initial direction of the current block.
[0027] In an embodiment, the direction determination unit is further configured to: when the absolute value of the difference between the first direction number and the second direction number is less than or equal to a predetermined threshold, obtain a first average value of the first direction number and the second direction number, and use the direction corresponding to the first average value as the initial direction of the current block; when the absolute value of the difference between the first direction number and the second direction number is greater than the predetermined threshold, add the small direction number to the total direction number to obtain an adjusted direction number, and obtain a second average value of the adjusted direction number and the large direction number, and use the direction corresponding to the second average value as the initial direction of the current block, wherein the small direction number is the smaller direction number between the first direction number and the second direction number, and the large direction number is the larger direction number between the first direction number and the second direction number.
[0028] In an embodiment, the direction determination unit is further configured to: before using the discrete Fourier transform energy of the multiple candidate directions to determine the direction of the current block from the multiple candidate directions, process each of the multiple candidate directions, wherein the processing of each of the multiple candidate directions includes: performing pixel row addition processing on the block of the current candidate direction to obtain the pixel sum corresponding to the current candidate direction; multiplying the pixel sum corresponding to the multiple candidate directions with the trigonometric functions of multiple frequencies to obtain the energy combination corresponding to each of the multiple frequencies; and using the energy combination corresponding to each of the multiple frequencies as the discrete Fourier transform energy.
[0029] In an embodiment, the direction determination unit is further configured to: obtain the maximum value in each energy combination and the ratio of the maximum value to the mean of the corresponding energy combination; determine a unique predetermined energy combination among all energy combinations, wherein the predetermined energy combination satisfies a predetermined condition, and the predetermined condition is that the maximum value of the energy combination is greater than a first threshold and the ratio corresponding to the energy combination is greater than a second threshold; and use the candidate direction corresponding to the maximum value in the predetermined energy combination as the direction of the current block.
[0030] In an embodiment, the direction determination unit is further configured to: when the energy combination does not satisfy a predetermined condition, calculate the direction of the current block using an original method.
[0031] In an embodiment, the direction determination unit is further configured to: obtain the maximum value in each energy combination; sort the energy combinations in descending order of the maximum values; process the sorted energy combinations in sequence, wherein processing the sorted energy combinations includes: obtaining the ratio of the maximum value of the current energy combination to the mean of the current energy combination; when the current energy combination satisfies a predetermined condition, stop processing the subsequent energy combinations, and use the candidate direction corresponding to the maximum value in the current energy combination as the direction of the current block, wherein the predetermined condition is that the maximum value of the energy combination is greater than a first threshold and the ratio corresponding to the energy combination is greater than a second threshold; when the maximum value of the current energy combination is less than or equal to the first threshold, stop processing the sorted energy combination; when the maximum value of the current energy combination is greater than the first threshold and the ratio corresponding to the current energy combination is less than or equal to the second threshold, continue processing the next energy combination in the sorted energy combination.
[0032] In an embodiment, the direction determination unit is further configured to: when the energy combination does not satisfy the predetermined condition, calculate the direction of the current block using an original method.
[0033] In an embodiment, the direction determination unit is further configured to: after dividing the fingerprint image to obtain a block matrix containing at least one block, calculate the direction of the blocks on the first row and the first column of the block matrix using an original method.
[0034] By using the technical solution of the present disclosure, a fingerprint image processing method and a fingerprint image processing device can be provided. The present disclosure takes into account the directions of adjacent blocks (for example, the left adjacent block and the upper adjacent block) when calculating the initial direction of the current block, thereby increasing the accuracy of the direction of the current block. In areas where the direction changes greatly, the improvement in accuracy is more obvious. Moreover, the present disclosure can verify within a small range around the current block (for example, a predetermined number of blocks to the left and right of the current block) to determine the final direction of the current block, so that there is no need to traverse the directions of all blocks, thereby reducing the calculation time of the blocks, and reducing the calculation time of the entire fingerprint image.
[0035] Additional aspects and / or advantages of the present general inventive concept will be set forth in part in the following description and in part will be apparent from the description or may be learned through practice of the present general inventive concept. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The above and other objects and features of the exemplary embodiments of the present disclosure will become more apparent through the following description in conjunction with the accompanying drawings which exemplarily illustrate the embodiments, in which:
[0037] Figure 1It is a schematic diagram of the fingerprint feature extraction process of NBIS in the related art;
[0038] Figure 2 is a fingerprint image and its corresponding direction map according to an exemplary embodiment of the present disclosure;
[0039] Figure 3 is a flow chart of a fingerprint image processing method according to an exemplary embodiment of the present disclosure;
[0040] Figure 4 is a schematic diagram of image rotation in a DFT method according to an exemplary embodiment of the present disclosure;
[0041] Figure 5 is a flowchart of obtaining the direction of the current block by the DTF method according to an exemplary embodiment of the present disclosure;
[0042] Figure 6 is an energy graph of 4 frequencies of the current block according to an exemplary embodiment of the present disclosure;
[0043] Figure 7 is a schematic diagram of four frequency waves used by the DTF method according to an exemplary embodiment of the present disclosure;
[0044] Figure 8 is a system flow diagram of a fingerprint image processing method according to an exemplary embodiment of the present disclosure;
[0045] Fig. 9 is a block diagram of a fingerprint image processing apparatus according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0046] The following specific embodiments are provided to help the reader obtain a comprehensive understanding of the methods, devices and / or systems described herein. However, after understanding the disclosure of the present application, various changes, modifications and equivalents of the methods, devices and / or systems described herein will be clear. For example, the order of operations described herein is only an example and is not limited to those orders set forth herein, but can be changed as will be clear after understanding the disclosure of the present application, except for operations that must occur in a specific order. In addition, for greater clarity and simplicity, the description of features known in the art may be omitted.
[0047] The features described herein can be implemented in different forms and should not be construed as being limited to the examples described herein. Rather, the examples described herein have been provided to illustrate only some of the many possible ways to implement the methods, devices, and / or systems described herein, which will be clear after understanding the disclosure of the present application.
[0048] The terms used herein are only used to describe various examples and are not intended to limit the disclosure. Unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. The terms "comprise", "include" and "have" indicate the presence of the described features, quantities, operations, components, elements and / or combinations thereof, but do not exclude the presence or addition of one or more other features, quantities, operations, components, elements and / or combinations thereof.
[0049] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by a person of ordinary skill in the art to which the present disclosure belongs after understanding the present disclosure. Unless explicitly defined as such herein, terms (such as those defined in a general dictionary) should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and should not be interpreted in an idealized or overly formal manner.
[0050] Furthermore, in the description of examples, when it is considered that a detailed description of a well-known related structure or function would cause vague interpretation of the present disclosure, such a detailed description will be omitted.
[0051] Figure 2 A fingerprint image 205 and its corresponding direction map 210 are shown, wherein the direction of the ridges in the block can be represented by lines. The direction map 210 can be a direction field or ridge flow map including multiple lines, each line corresponding to a corresponding point. Due to the continuity of the fingerprint, in most areas, the fingerprint direction of a block and the fingerprint direction of the surrounding blocks can be similar, so the direction of the block that has not been calculated can be inferred based on the direction of the calculated block. According to the above principle, the direction of the current block can be inferred using the direction of the blocks around the current block, and verification can be performed in a small range around the inferred direction of the current block to determine the final direction of the current block. If the final direction of the current block cannot be determined, the original method (including but not limited to the NBIS method) can be used to recalculate the direction of the current block. When the original method is used for some blocks, although the total calculation time for the current block will increase, the total calculation time for multiple blocks can be reduced, because only the calculation time for a small number of blocks will increase. In an embodiment, the calculation time of the entire image can be reduced, and the delay can be reduced.
[0052] According to one aspect of an exemplary embodiment of the present disclosure, a fingerprint image processing method may be provided. Figure 3 is a flow chart of a fingerprint image processing method according to an exemplary embodiment of the present disclosure. Figure 3 , the fingerprint image processing method may include the following steps:
[0053] In step S301, the fingerprint image may be divided to obtain a block matrix including at least one block.
[0054] As an example, the fingerprint image can be divided according to a predetermined size to obtain multiple blocks. The set of divided blocks can be regarded as a block matrix and can be arranged according to the original position. The above predetermined size can be set as needed, and this disclosure does not limit this.
[0055] In step S302, each block in the block matrix except for the blocks in at least one of the first row and the first column may be processed. Blocks not arranged in the first row or the first column may be blocks of the first set. It should be understood that the first row and the first column may be edges of the block matrix (e.g., the first edge row and the first edge column). Blocks arranged in the first row or the first column may be blocks of the second set. Blocks of the first set and blocks of the second set may be processed differently. In addition, blocks of the second edge row (e.g., the last row) and the second edge column (e.g., the last column) may be blocks of the first set of blocks.
[0056] In step S303, multiple candidate directions of the current block may be obtained, wherein the multiple candidate directions include an initial direction of the current block, directions of a predetermined number of blocks to the left and right of the current block, and the initial direction is determined based on directions of a left adjacent block and an upper adjacent block of the current block. In step S304, the direction of the current block may be determined from the multiple candidate directions based on discrete Fourier transform energies of the multiple candidate directions.
[0057] The predetermined number can be set as needed, and the predetermined number can be 2, however, the present disclosure does not limit this. For example, the predetermined number of blocks can be set to 1 block or 3 blocks.
[0058] As an example, using a predetermined number of 2, the initial direction of the current block can be determined based on the directions of the left adjacent block and the upper adjacent block of the current block. After determining the initial direction of the current block, the directions of the 2 blocks to the left of the current block and the 2 blocks to the right of the current block can also be obtained, so that a total of 5 candidate directions can be obtained, and then the direction of the current block can be determined from the 5 candidate directions based on the discrete Fourier transform energy (DFT energy) of each of the 5 candidate directions.
[0059] In an embodiment, the predetermined number of blocks may be the maximum number of blocks used to determine the direction of the current block. For example, for the current block in the second column of the block matrix, there may be only one block available to the left of the current block. In this case, the directions of one block to the left of the current block and two blocks to the right of the current block may also be obtained, so that a total of four candidate directions may be obtained, and the direction of the current block may be determined from the four candidate directions based on the DFT energies of the corresponding four candidate directions.
[0060] Certain aspects of the present disclosure will be described in the context of numbered directions. For example, when determining the orientation of a block, a DFT method may rotate the block, sum the pixels of each row of the rotated block, obtain DFT energy using different frequencies, and determine the direction corresponding to the maximum DFT energy as the final orientation of the block. Figure 4 A schematic diagram illustrating image rotation in the DFT method is shown. Figure 4 As shown, the 180° angular space 401 can be equally divided into 16 directions (e.g., 0, 1, 2, ..., 15), and the block 402 can be rotated 15 times (see 403) to correspond to each direction (e.g., assuming that the initial state is direction 0). The sequence number (e.g., 1 to 15) can correspond to each direction (e.g., sequence number 15 corresponds to direction 168.75 degrees), and the sequence number can be a natural number starting from 1, so that the final direction of each block can correspond to the sequence number. It should be understood that 16 directions are examples, and other numbers of directions can also be used. For example, the 180° angular space can be equally divided into 32 directions, which can be set according to actual conditions. The present disclosure does not impose any restrictions on this.
[0061] In an embodiment of the present disclosure, the initial direction of the current block can be determined in the following manner: determine a first direction sequence number corresponding to the direction of the left adjacent block and a second direction sequence number corresponding to the direction of the upper adjacent block; and determine the initial direction of the current block based on the first direction sequence number and the second direction sequence number. Through this embodiment, the direction of the current block can be conveniently and quickly determined according to the direction sequence numbers corresponding to the directions of the left adjacent block and the upper adjacent block.
[0062] As an example, the first direction number corresponding to the direction of the left adjacent block and the second direction number corresponding to the direction of the upper adjacent block may be determined, and the initial direction of the current block may be determined based on the first direction number and the second direction number. For example, the average value of the first direction number and the second direction number may be obtained, and the direction corresponding to the average value may be used as the initial direction of the current block. Other methods may also be used, and the present disclosure is not limited to this.
[0063] In an embodiment of the present disclosure, the operation of determining the initial direction of the current block may be based on the first direction sequence number and the second direction sequence number. For example, when the absolute value of the difference between the first direction sequence number and the second direction sequence number is less than or equal to a predetermined threshold, the average value of the first direction sequence number and the second direction sequence number may be obtained, and the direction corresponding to the average value may be used as the initial direction of the current block. In another example, when the absolute value of the difference between the first direction sequence number and the second direction sequence number is greater than a predetermined threshold, the small direction sequence number may be added to the total direction sequence number to obtain an adjusted direction sequence number, and the average value of the adjusted direction sequence number and the large direction sequence number may be obtained, and the direction corresponding to the average value may be used as the initial direction of the current block, wherein the small direction sequence number is the smaller direction sequence number of the first direction sequence number and the second direction sequence number, and the large direction sequence number is the larger direction sequence number of the first direction sequence number and the second direction sequence number. Through the embodiment, according to the direction sequence number difference relationship corresponding to the respective directions of the left adjacent block and the upper adjacent block, it can be evaluated whether to use the mean value or special processing to determine the initial direction, so that the determined initial direction can be relatively accurate.
[0064] The predetermined threshold can be set as needed. For example, when the total number of directions is 32, that is, the angle space can be equally divided into 32 directions, the predetermined threshold can be set to 10. As described herein, the predetermined threshold can be set as needed, for example, it can be set to 9 or 11, and the present disclosure does not limit this.
[0065] As an example, taking the total direction number as 32 and the predetermined threshold as 10, if the absolute value of the difference between the first direction number and the second direction number is less than or equal to 10, the average value of the first direction number and the second direction number can be obtained, and the direction corresponding to the average value is used as the initial direction of the current block. For example, assuming that the first direction number is 6 and the second direction number is 12, the absolute value of the difference between the two is 6, and the initial direction of the current block can be determined as (6+12)÷2=9. If the absolute value of the difference between the first direction number and the second direction number is greater than 10, the small direction number can be added to the total direction number to obtain the adjusted direction number, and the average value of the adjusted direction number and the large direction number can be obtained, and the direction corresponding to the average value can be used as the initial direction of the current block. In the example where the first direction number is 6, the second direction number is 18, and the absolute value of the difference between the two is 12, the initial direction of the current block can be determined as (6+32+12)÷2=25.
[0066] It should be understood that if the obtained average value is not an integer, the obtained average value can be rounded to obtain an integer, however, the present disclosure does not impose any limitation on this. For example, the integer value can be obtained by rounding to an even number, rounding to a lower integer, or rounding to an upper integer.
[0067] In an embodiment of the present disclosure, before determining the direction of the current block from multiple candidate directions based on the discrete Fourier transform energy of multiple candidate directions, each candidate direction in the multiple candidate directions may be processed as follows. For example, pixel row addition processing may be performed on the block of the current candidate direction to obtain the pixel sum corresponding to the current candidate direction, the pixel sum corresponding to the multiple candidate directions may be multiplied by the trigonometric functions of multiple frequencies to obtain the energy combination corresponding to each of the multiple frequencies, and the energy combination corresponding to each of the multiple frequencies may be used as the discrete Fourier transform energy. Through the embodiment, the discrete Fourier transform energy may be quickly calculated.
[0068] Multiple frequencies can be set as needed, such as 4 frequencies, 5 frequencies or 3 frequencies can be selected, which is not limited in the present disclosure. According to the embodiment, on the basis of complete information covered by the acquired energy combination, selecting 4 frequencies can ensure small computational overhead.
[0069] As an example, the multiple frequencies are 4 frequencies (fn) and the number of candidate directions is 5. For each of the 5 candidate directions, the block of the current candidate direction can be processed by pixel row addition to obtain the pixel sum Ci corresponding to the current candidate direction, and the pixel sum Ci of each of the 5 candidate directions can be obtained. Then, the pixel sum Ci corresponding to the 5 candidate directions can be multiplied by the trigonometric function of the 4 frequencies to obtain the energy combination corresponding to each of the 4 frequencies. For example, for each of the 4 frequencies, the example formula for obtaining the energy Pn corresponding to the 5 candidate directions can be written as:
[0070] Pn=(Ci×sinfn) 2 +(Ci×cosfn) 2 Formula (1)
[0071] Among them, the above fn represents frequency, n takes values of 1, 2, 3 and 4, Ci represents pixel sum, and i takes values of 1, 2, 3, 4 and 5. After obtaining the energy Pn corresponding to the five candidate directions at each frequency, the five energies belonging to the same frequency can be combined into an energy combination. In other words, the energy combination corresponds to each of the four frequencies. Furthermore, based on the energy combination corresponding to each of the four frequencies, the discrete Fourier transform energy of the five candidate directions can be obtained. For example, the above four energy combinations can be used as the discrete Fourier transform energy of the five candidate directions.
[0072] In an embodiment of the present disclosure, based on the discrete Fourier transform energies of multiple candidate directions, the operation of determining the direction of the current block from multiple candidate directions may include: obtaining the maximum value in each energy combination and the ratio of the maximum value to the mean of the corresponding energy combination; determining a unique predetermined energy combination among all energy combinations, wherein the predetermined energy combination satisfies a predetermined condition, the predetermined condition being that the maximum value of the energy combination is greater than a first threshold value and the ratio corresponding to the energy combination is greater than a second threshold value; and taking the candidate direction corresponding to the maximum value in the predetermined energy combination as the direction of the current block. Through this embodiment, when determining the direction of the current block, not only the maximum energy value of the energy combination is considered, but also the ratio of the maximum energy value to the mean of the energy combination is considered, so that the determined direction is more accurate.
[0073] The first threshold and the second threshold can be set as needed, and the present disclosure does not limit this. It should be understood that the above-mentioned maximum value can be a fixed value, and the above-mentioned ratio represents the concentration and is a relative value. The energy maximum value in some energy combinations can be small, but the energy can be relatively concentrated. The predetermined energy combination can be determined by the energy maximum value and the corresponding ratio. In this way, the energy maximum value in the determined predetermined energy combination, even if it is not the largest energy value among the four energy combinations, is the energy closest to the direction of the current block. In this case, the direction of the current block determined based on the maximum value in the predetermined energy combination can be more accurate.
[0074] As an example, the maximum value in each energy combination and the ratio of the maximum value to the mean of the corresponding energy combination can be obtained. The maximum value of each energy combination can be evaluated to determine whether it is greater than a first threshold, and the ratio corresponding to each energy combination can be evaluated to determine whether it is greater than a second threshold. If the maximum value of one of the energy combinations is greater than the first threshold, and the ratio corresponding to the energy combination is also greater than the second threshold, it means that this energy combination is a predetermined energy combination, and the corresponding candidate direction can be found through the maximum value in the predetermined energy combination, and the corresponding candidate direction found can be used as the direction of the current block.
[0075] In another embodiment of the present disclosure, based on the discrete Fourier transform energy of multiple candidate directions, the operation of determining the direction of the current block from multiple candidate directions may include: obtaining the maximum value in each energy combination; sorting all energy combinations in order from large to small maximum values; and processing the sorted energy combinations in sequence. The processing of the sorted energy combinations may include: obtaining the ratio of the maximum value of the current energy combination to the mean value of the current energy combination. When the current energy combination satisfies a predetermined condition, the processing of the subsequent energy combinations may be stopped, and the candidate direction corresponding to the maximum value in the current energy combination may be used as the direction of the current block, wherein the predetermined condition is that the maximum value of the energy combination is greater than a first threshold value and the ratio corresponding to the energy combination is greater than a second threshold value. When the maximum value of the current energy combination is less than or equal to the first threshold value, the processing of the subsequent energy combinations is stopped, and when the maximum value of the current energy combination is greater than the first threshold value and the ratio corresponding to the current energy combination is less than or equal to the second threshold value, the next energy combination in the sorted energy combination may be processed. Through the embodiments, when determining the direction of the current block, the energy combinations can be sorted by the maximum value, so that in subsequent judgments, the energy combinations ranked in front can be given priority. If the first energy combination does not meet the predetermined conditions, the subsequent ones are even less likely to meet the conditions. The determination and judgment operations can be adaptively performed to reduce processing time.
[0076] The first threshold and the second threshold can be set as needed, and the present disclosure does not limit this. It should be understood that the above-mentioned maximum value can be a fixed value, and the above-mentioned ratio represents the concentration and can be a relative value. The maximum energy value in some energy combinations may be small, but the energy may be relatively concentrated. The energy maximum value and the corresponding ratio can be used to jointly determine the predetermined energy combination, so that the maximum energy value in the determined predetermined energy combination, even if it is not the largest energy value among the four energy combinations, is the energy closest to the direction of the current block. In other words, the direction of the current block determined based on the maximum value in the predetermined energy combination can be more accurate.
[0077] As an example, the maximum value in each energy combination can be obtained, and all energy combinations can be sorted in order from the maximum value to the smallest. For the energy combinations sorted from the largest to the smallest, the first energy combination can be processed first, that is, the maximum value and the corresponding ratio of the first energy combination can be obtained. In the case where the maximum value of the first energy combination is greater than the first threshold value and the corresponding ratio is greater than the second threshold value, the candidate direction corresponding to the maximum value in the first energy combination can be used as the direction of the current block. At this time, the processing of the subsequent energy combinations can be stopped, and the processing time can be reduced. In other words, unnecessary processing of energy combinations can be avoided. In the case where the maximum value of the first energy combination is less than or equal to the first threshold value, the processing of the subsequent energy combinations can be stopped. For example, if the first energy combination does not meet the predetermined conditions, the subsequent energy combinations are even less likely to meet the conditions. In the case where the maximum value of the first energy combination is greater than the first threshold value and the corresponding ratio is less than or equal to the second threshold value, the first energy combination cannot be used to determine the direction of the current block, and the processing can be continued at this time, and the next energy combination can be processed. The example processing process is as above, and its repeated description can be omitted.
[0078] In an embodiment of the present disclosure, when all energy combinations do not meet a predetermined condition, the NBIS method may be used to calculate the direction of the current block. By way of example, when the direction of the current block is not obtained by using the DFT method according to the embodiment, the original method (e.g., the NBIS method) may be used to calculate the direction of the current block, thereby ensuring the accuracy of the calculation. The original method may infer the direction of the current block. The original method may not usually be used because if there is an error in the inference of the direction of the previous block or the direction is not inferred, the error may accumulate, and over time, the inferred direction of the subsequent block will be affected by the accumulated error, which may inhibit or prevent the correct inference.
[0079] As an example, take the total direction number as 32 and the DTF method under the NBIS method as an example. Figure 5 The following shows the example process of obtaining the direction of the current block using the DTF method. Figure 5 As shown, the current block 501 may be rotated (502), the pixel rows of the rotated block may be added (503), and the result of the addition may be multiplied by four triangular function waves of different frequencies (504) (for example, using the above formula (1)) to obtain an energy distribution curve (505). The direction corresponding to the direction number with the largest energy is found in the four energy distribution curves as the final direction of the current block (506).
[0080] Figure 6 An energy graph 600 of the four frequencies of the current block is shown. Figure 7 Four frequency waves 701 to 704 are shown that can be used. Figure 6It can be seen that the maximum value is finally obtained in the energy of f2, and the corresponding direction number is 19 (on the x-axis), and the direction corresponding to this direction number is the final direction of the current block.
[0081] In an embodiment of the present disclosure, after the fingerprint image is divided to obtain a block matrix containing at least one block, the NBIS method can also be used to calculate the direction of the blocks on at least one of the first row and the first column of the block matrix. Through the embodiment, the original method (e.g., the NBIS method) is used to calculate the direction of the blocks on the first row and the first column of the block matrix to support or ensure the smooth progress of the method according to the embodiment of the present disclosure, wherein the image processing can be performed from the left to the right of the image and from the top to the bottom of the image. It should be understood that according to the embodiment of the present disclosure, the directions of the blocks to the left and the blocks above the current block have been calculated.
[0082] In order to facilitate the understanding of the above embodiments, Figure 8 Provide a description of the system.
[0083] When processing a fingerprint image, the fingerprint image may be divided into a plurality of blocks, and each block may be processed separately. Figure 8 The system flow of the fingerprint image processing method is shown. Figure 8 As shown, in step S100, the current block may be obtained. In step S100, a plurality of blocks representing a block matrix of a fingerprint image may be received. An original method (such as the NBIS method) may be used to calculate the direction of the blocks in the first row and the first column. Here, the first row and the first column may be the edges of the block matrix. According to some embodiments of the present disclosure, the original method may implement further processing, which may use the directions of the left adjacent blocks and the upper adjacent blocks of the current block to calculate the direction of the current block. That is, in Figure 8 In step S101 of , it can be determined whether the current block is in the first column or the first row. If the current block is in the first column or the first row (yes), the process can proceed to step S109. If the current block is not in the first column or the first row, the process can proceed to step S102.
[0084] In step 102, the initial direction of the current block is calculated using the directions of the blocks to the left and above the current block. It should be noted that the above aspects describe an example process of calculating the initial direction, and its repeated description may be omitted.
[0085] In step S103, sine waves and cosine waves of four frequencies may be used to calculate DFT energies in multiple directions. The multiple directions may include an initial direction, two directions to the left of the current block, and two directions to the right of the current block. That is, the multiple directions may include five directions. At this time, four energy combinations at four frequencies are obtained, each of which may be an array, and each array contains five elements.
[0086] In step S104, the maximum value among the energy combinations may be determined (for example, see Figure 6 ), and the ratio of the maximum value to the average energy of the corresponding energy combination can be determined, and the energy combinations can be sorted in descending order according to the 4 maximum values.
[0087] In step S105, the first energy combination after sorting may be selected for inspection.
[0088] In step S106, it may be determined whether the maximum value in the first energy combination is greater than the first threshold and whether the above ratio is greater than the second threshold. In the case where the maximum value in the first energy combination is greater than the first threshold and the above ratio is greater than the second threshold, the direction corresponding to the maximum value in this energy combination may have high confidence, the direction may be used as the final direction of the current block, and the process may proceed to step S110; in the case where one of the determination results in step S106 is negative (i.e., no), the process may proceed to step S107.
[0089] In step S107, it may be determined whether all the energy combinations after sorting have been checked. If all the energy combinations after sorting have been checked, the process may proceed to step S109, and if not all the energy combinations after sorting have been checked, the process may proceed to step S108.
[0090] In step S108, the next energy combination after sorting may be selected for inspection, and the inspection process may be cyclically performed using steps S106 to S108. It should be understood that if all energy combinations do not meet the conditions that the maximum value is greater than the first threshold and the above ratio is greater than the second threshold, then there may be no direction associated with high confidence in the current five directions. In this case, the direction of the current block may be calculated using an existing algorithm according to step S109, and the method may proceed to steps S110 and S111 to continue the calculation of the remaining blocks.
[0091] In step S109, the direction of the current block may be calculated using the original method.
[0092] In step S110, it may be determined whether all blocks of the fingerprint image have been processed. If all blocks of the fingerprint image have been processed, the process may be terminated, and if not all blocks of the fingerprint image have been processed, the process may proceed to step S111.
[0093] In step S111, the processing calculation of the remaining blocks may continue, that is, the next block may be selected and the direction of the block may be determined.
[0094] According to an embodiment of the present disclosure, multiple adjacent blocks may be selected for calculating the initial direction of the current block, which may increase the accuracy of determining the initial direction. In areas where the direction changes greatly, the improvement in accuracy is more obvious. In addition, a small range test may be performed around the direction of the current block. For example, in an embodiment, five directions (the initial direction and two directions on the left and right of the current block) may be tested, and two conditions, the maximum value and the ratio of the maximum value to the mean value, may be considered during the test, so that the test result may be determined more accurately. Furthermore, in the event of a test failure, the original method (e.g., the NBIS method) may be used, which may ensure the accuracy of the direction determined for the current block. Because each block in the fingerprint image needs to be calculated, if there are errors in the calculation of the direction of one or more previous blocks, the errors will accumulate and may lead to increased errors in the processing of subsequent blocks. According to an embodiment, in some cases, consistency may be maintained by using the results of the NBIS algorithm.
[0095] According to another aspect of an exemplary embodiment of the present disclosure, a fingerprint image processing apparatus is provided. Fig. 9 is a block diagram of a fingerprint image processing apparatus according to an exemplary embodiment of the present disclosure.
[0096] Reference Fig. 9 , the fingerprint image processing device may include a division unit 90 and a direction determination unit 92. The division unit 90 may be configured to divide the fingerprint image to obtain a block matrix containing at least one block. The direction determination unit 92 may be configured to process each block except the first row or the first column in the block matrix. The direction determination unit 92 may obtain multiple candidate directions of the current block, wherein the multiple candidate directions include the initial direction of the current block and the directions of a predetermined number of blocks to the left and right of the current block. The direction determination unit 92 may determine the initial direction based on the directions of the left adjacent block and the upper adjacent block of the current block. The direction determination unit 92 may determine the direction of the current block from the multiple candidate directions based on the discrete Fourier transform energy of the multiple candidate directions.
[0097] In an embodiment, the direction determination unit 92 may be configured to determine the initial direction of the current block in the following manner: determine a first direction number corresponding to the direction of the left adjacent block and a second direction number corresponding to the direction of the upper adjacent block; and determine the initial direction of the current block based on the first direction number and the second direction number.
[0098] In an embodiment, the direction determination unit 92 may also be configured to: when the absolute value of the difference between the first direction sequence number and the second direction sequence number is less than or equal to a predetermined threshold, obtain the average value of the first direction sequence number and the second direction sequence number, and use the direction corresponding to the average value as the initial direction of the current block. The direction determination unit 92 may also be configured to: when the absolute value of the difference between the first direction sequence number and the second direction sequence number is greater than a predetermined threshold, add the small direction sequence number to the total direction sequence number to obtain an adjusted direction sequence number, and obtain the average value of the adjusted direction sequence number and the large direction sequence number, and use the direction corresponding to the average value as the initial direction of the current block, wherein the small direction sequence number is the smaller direction sequence number of the first direction sequence number and the second direction sequence number, and the large direction sequence number is the larger direction sequence number of the first direction sequence number and the second direction sequence number.
[0099] In an embodiment, the direction determination unit 92 may also be configured to: before determining the direction of the current block from the multiple candidate directions based on the discrete Fourier transform energy of the multiple candidate directions, process each candidate direction in the multiple candidate directions. The processing of the candidate directions may include: performing pixel row addition processing on the block of the current candidate direction to obtain the pixel sum corresponding to the current candidate direction; multiplying the pixel sum corresponding to the multiple candidate directions with the trigonometric function of multiple frequencies to obtain the energy combination corresponding to each of the multiple frequencies; and combining the energy corresponding to each of the multiple frequencies as the discrete Fourier transform energy.
[0100] In an embodiment, the direction determination unit 92 can also be configured to: obtain the maximum value in each energy combination and the ratio of the maximum value to the mean of the corresponding energy combination; determine a unique predetermined energy combination among all energy combinations, wherein the predetermined energy combination satisfies a predetermined condition, and the predetermined condition is that the maximum value of the energy combination is greater than a first threshold and the ratio corresponding to the energy combination is greater than a second threshold; and use the candidate direction corresponding to the maximum value in the predetermined energy combination as the direction of the current block.
[0101] In an embodiment, the direction determination unit 92 may also be configured to: obtain the maximum value in each energy combination; sort all energy combinations in order from the largest to the smallest maximum value; and process the sorted energy combinations in sequence. The processing of the sorted energy combinations may include: obtaining the ratio of the maximum value of the current energy combination to the mean value of the current energy combination; when the current energy combination satisfies a predetermined condition, stop processing the subsequent energy combinations, and use the candidate direction corresponding to the maximum value in the current energy combination as the direction of the current block. The predetermined condition may evaluate whether the maximum value of the energy combination is greater than a first threshold and whether the ratio corresponding to the energy combination is greater than a second threshold. When the maximum value of the current energy combination is less than or equal to the first threshold, stop processing the subsequent energy combinations; when the maximum value of the current energy combination is greater than the first threshold and the ratio corresponding to the current energy combination is less than or equal to the second threshold, continue processing the next energy combination.
[0102] In an embodiment, when all energy combinations do not satisfy a predetermined condition, the NBIS method may be used to calculate the direction of the current block.
[0103] In an embodiment, the direction determination unit 92 may be configured to, after dividing the fingerprint image to obtain a block matrix including at least one block, use the NBIS method to calculate the direction of the blocks on at least one of the first row and the first column of the block matrix.
[0104] It should be understood that the various units / modules in the fingerprint image processing method and the fingerprint image processing device according to the exemplary embodiments of the present disclosure can be implemented as hardware components and / or software components. Those skilled in the art can implement various units / modules, for example, using a field programmable gate array (FPGA) or an application specific integrated circuit (ASIC) according to the processing performed by the various units / modules defined.
[0105] According to another aspect of the exemplary embodiments of the present disclosure, a computer-readable storage medium storing a computer program is provided, wherein when the computer program is executed by a processor, the fingerprint image processing method of the present disclosure is implemented.
[0106] Specifically, the fingerprint image processing method according to the exemplary embodiment of the present disclosure can be written as a computer program, a code segment, an instruction or any combination thereof, and recorded, stored or fixed in or on one or more non-transitory computer-readable storage media. The computer-readable storage medium is any data storage device that can store data read by a computer system. Examples of computer-readable storage media include: read-only memory, random access memory, read-only optical disk, magnetic tape, floppy disk, optical data storage device and carrier wave (such as data transmission through the Internet via a wired or wireless transmission path).
[0107] According to another aspect of the exemplary embodiments of the present disclosure, an electronic device may be provided, wherein the electronic device includes: at least one processor; and at least one memory storing computer executable instructions, wherein the computer executable instructions, when executed by the at least one processor, may cause the at least one processor to execute the fingerprint image processing method according to the embodiments of the present disclosure.
[0108] Specifically, the electronic device can be broadly a tablet computer, a smart phone, a smart watch, or any other electronic device with necessary computing and / or processing capabilities. In one embodiment, the electronic device may include a processor, a memory, a network interface, a communication interface, etc. connected via a system bus. The processor of the electronic device can be used to provide necessary computing, processing and / or control capabilities. The memory of the electronic device may include a non-volatile storage medium and an internal memory. An operating system, a computer program, etc. may be stored in or on the non-volatile storage medium. The internal memory may provide an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface and the communication interface of the electronic device can be used to connect and communicate with external devices via a network.
Claims
1. A fingerprint image processing method, characterized in that: The fingerprint image processing method comprises: receiving a plurality of blocks of a block matrix representing a fingerprint image; Processing a first set of blocks from the plurality of blocks, the processing comprising: Acquire multiple candidate directions of the current block, wherein the multiple candidate directions include an initial direction of the current block, directions of at least a predetermined number of blocks to the left and to the right of the current block, and the initial direction is determined by using directions of left adjacent blocks and upper adjacent blocks of the current block; The direction of the current block is determined from the plurality of candidate directions using discrete Fourier transform energies of the plurality of candidate directions.
2. The fingerprint image processing method according to claim 1, characterized in that: The fingerprint image processing method further includes: determining an initial direction of the current block, wherein determining the initial direction of the current block includes: Determine a first direction number corresponding to the direction of the left adjacent block and a second direction number corresponding to the direction of the upper adjacent block; The initial direction of the current block is determined using the first direction sequence number and the second direction sequence number.
3. The fingerprint image processing method according to claim 2, characterized in that: The method of using the first direction sequence number and the second direction sequence number to determine the initial direction of the current block includes: When the absolute value of the difference between the first direction number and the second direction number is less than or equal to a predetermined threshold, obtaining a first average value of the first direction number and the second direction number, and taking the direction corresponding to the first average value as the initial direction of the current block; When the absolute value of the difference between the first direction number and the second direction number is greater than a predetermined threshold, the small direction number is added to the total direction number to obtain an adjusted direction number, a second average value of the adjusted direction number and the large direction number is obtained, and the direction corresponding to the second average value is used as the initial direction of the current block, wherein the small direction number is the smaller direction number of the first direction number and the second direction number, and the large direction number is the larger direction number of the first direction number and the second direction number.
4. The fingerprint image processing method according to claim 1, characterized in that: The fingerprint image processing method further includes: before determining the direction of the current block from the multiple candidate directions using discrete Fourier transform energies of the multiple candidate directions, processing each of the multiple candidate directions, wherein processing each of the multiple candidate directions includes: Perform pixel row addition processing on the block of the current candidate direction to obtain the pixel sum corresponding to the current candidate direction; Multiplying the pixels corresponding to the multiple candidate directions with the trigonometric functions of the multiple frequencies to obtain energy combinations corresponding to the multiple frequencies; The energies corresponding to the multiple frequencies are combined as discrete Fourier transform energy.
5. The fingerprint image processing method according to claim 4, characterized in that: The method of using discrete Fourier transform energies of multiple candidate directions to determine the direction of the current block from the multiple candidate directions includes: Obtain the maximum value in each energy combination and the ratio of the maximum value to the mean value of the corresponding energy combination; Determine a unique predetermined energy combination among all energy combinations, wherein the predetermined energy combination satisfies a predetermined condition, wherein the predetermined condition is that the maximum value of the energy combination evaluation is greater than a first threshold value and the ratio corresponding to the energy combination is greater than a second threshold value; The candidate direction corresponding to the maximum value in the predetermined energy combination is used as the direction of the current block.
6. The fingerprint image processing method according to claim 5, characterized in that: The fingerprint image processing method further comprises: In the case that the energy combination does not satisfy the predetermined condition, the original method is used to calculate the direction of the current block.
7. The fingerprint image processing method according to claim 4, characterized in that: The method of using discrete Fourier transform energies of multiple candidate directions to determine the direction of the current block from the multiple candidate directions includes: Get the maximum value of each energy combination; Sort the energy combinations in descending order of maximum value; The sorted energy combinations are processed in sequence, wherein the processing of the sorted energy combinations includes: Obtain the ratio of the maximum value of the current energy combination to the average value of the current energy combination; When the current energy combination satisfies a predetermined condition, stop processing the subsequent energy combinations, and use the candidate direction corresponding to the maximum value in the current energy combination as the direction of the current block, wherein the predetermined condition is that the maximum value of the energy combination is greater than a first threshold and the ratio corresponding to the energy combination is greater than a second threshold; When the maximum value of the current energy combination is less than or equal to the first threshold, stop processing the sorted energy combination; When the maximum value of the current energy combination is greater than the first threshold and the ratio corresponding to the current energy combination is less than or equal to the second threshold, the next energy combination in the sorted energy combinations is processed.
8. The fingerprint image processing method according to claim 7, characterized in that: The fingerprint image processing method further comprises: In the case that the energy combination does not satisfy the predetermined condition, the original method is used to calculate the direction of the current block.
9. The fingerprint image processing method according to claim 1, characterized in that: The fingerprint image processing method further includes: processing a second set of blocks among the plurality of blocks using an original method to calculate directions of the second set of blocks, wherein the second set of blocks are arranged in at least one of an edge row and an edge column of the block matrix.
10. A fingerprint image processing method, characterized in that: The fingerprint image processing method comprises: Dividing the fingerprint image to obtain a block matrix containing a plurality of blocks; For each block except the first row and the first column in the block matrix, the following processing is performed: Acquire multiple candidate directions of the current block, wherein the multiple candidate directions include an initial direction of the current block, directions of a predetermined number of blocks to the left of the current block and to the right of the current block, respectively, and the initial direction is determined based on a direction of a left adjacent block of the current block and a direction of an upper adjacent block of the current block; The direction of the current block is determined from the plurality of candidate directions using discrete Fourier transform energies of the plurality of candidate directions.
11. The fingerprint image processing method according to claim 10, characterized in that: The fingerprint image processing method further includes: determining an initial direction of the current block, wherein determining the initial direction of the current block includes: Determine a first direction sequence number corresponding to the direction of the left adjacent block and a second direction sequence number corresponding to the direction of the upper adjacent block; An initial direction of the current block is determined using the first direction sequence number and the second direction sequence number.
12. The fingerprint image processing method according to claim 11, characterized in that: The using the first direction sequence number and the second direction sequence number to determine the initial direction of the current block includes: When the absolute value of the difference between the first direction number and the second direction number is less than or equal to a predetermined threshold, obtaining a first average value of the first direction number and the second direction number, and taking the direction corresponding to the first average value as the initial direction of the current block; When the absolute value of the difference between the first direction number and the second direction number is greater than the predetermined threshold, the small direction number is added to the total direction number to obtain an adjusted direction number, and a second average value of the adjusted direction number and the large direction number is obtained, and the direction corresponding to the second average value is used as the initial direction of the current block, wherein the small direction number is the smaller direction number between the first direction number and the second direction number, and the large direction number is the larger direction number between the first direction number and the second direction number.
13. The fingerprint image processing method according to claim 11, characterized in that: The fingerprint image processing method further comprises: Before determining the direction of the current block from the multiple candidate directions using discrete Fourier transform energies of the multiple candidate directions, processing each of the multiple candidate directions, wherein processing each of the multiple candidate directions includes: Perform pixel row addition processing on the block of the current candidate direction to obtain the pixel sum corresponding to the current candidate direction; Multiplying the pixels corresponding to the multiple candidate directions by trigonometric functions of multiple frequencies to obtain energy combinations corresponding to the multiple frequencies; The energies corresponding to the multiple frequencies are combined as the discrete Fourier transform energy.
14. The fingerprint image processing method according to claim 13, characterized in that: The step of using discrete Fourier transform energies of the multiple candidate directions to determine the direction of the current block from the multiple candidate directions comprises: Obtain the maximum value in each energy combination and the ratio of the maximum value to the mean value of the corresponding energy combination; Determine a unique predetermined energy combination among all energy combinations, wherein the predetermined energy combination satisfies a predetermined condition, wherein the predetermined condition is that a maximum value of the energy combination is greater than a first threshold value and the ratio corresponding to the energy combination is greater than a second threshold value; The candidate direction corresponding to the maximum value in the predetermined energy combination is used as the direction of the current block.
15. The fingerprint image processing method according to claim 14, characterized in that: The fingerprint image processing method further comprises: In the case that the energy combination does not satisfy the predetermined condition, the original method is used to calculate the direction of the current block.
16. The fingerprint image processing method according to claim 13, characterized in that: The step of using discrete Fourier transform energies of the multiple candidate directions to determine the direction of the current block from the multiple candidate directions comprises: Get the maximum value of each energy combination; sorting the energy combinations in descending order of the maximum values; The sorted energy combinations are processed in sequence, wherein the processing of the sorted energy combinations includes: Obtaining a ratio of a maximum value of a current energy combination to a mean value of the current energy combination; When the current energy combination satisfies a predetermined condition, stop processing the subsequent energy combinations, and use the candidate direction corresponding to the maximum value in the current energy combination as the direction of the current block, wherein the predetermined condition is that the maximum value of the energy combination is greater than a first threshold and the ratio corresponding to the energy combination is greater than a second threshold; When the maximum value of the current energy combination is less than or equal to the first threshold, stop processing the sorted energy combination; When the maximum value of the current energy combination is greater than the first threshold and the ratio corresponding to the current energy combination is less than or equal to the second threshold, continue to process the next energy combination in the sorted energy combinations.
17. The fingerprint image processing method according to claim 16, characterized in that: The fingerprint image processing method further comprises: When the energy combination does not satisfy the predetermined condition, the direction of the current block is calculated using the original method.
18. The fingerprint image processing method according to claim 11, characterized in that: After the fingerprint image is divided to obtain a block matrix including at least one block, the fingerprint image processing method further includes: The orientation of the block on the first row and first column of the block matrix is calculated using the original method.
19. A fingerprint image processing device, characterized in that: The fingerprint image processing device comprises: A division unit is configured to divide the fingerprint image to obtain a block matrix including a plurality of blocks; The direction determination unit is configured to perform the following processing for each block except the first row and the first column in the block matrix: obtain multiple candidate directions of the current block, wherein the multiple candidate directions include an initial direction of the current block and directions of a predetermined number of blocks on the left and right of the current block, and the initial direction is determined based on the directions of the left adjacent block and the top adjacent block of the current block; and determine the direction of the current block from the multiple candidate directions based on discrete Fourier transform energies of the multiple candidate directions.
20. The fingerprint image processing device according to claim 19, characterized in that: The fingerprint image processing device also includes: processor; A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the method of the direction determination unit is implemented.
