Fingerprint identification method and device
Technical Field
The invention relates to the technical field of biological identification, in particular to a fingerprint identification method and a fingerprint identification device.
Background
The fingerprint can be used as identity verification information, and the fingerprint verification of identity is widely applied in many fields, for example, the fingerprint can be used for verifying the identity of an employee so as to count the attendance condition of the employee, the fingerprint can be used for verifying the identity of a suspect so as to provide an important clue for case investigation, and the like.
In a specific application, an image acquisition device may be used to acquire a fingerprint image to be identified, a Central Processing Unit (CPU) may be used to extract fingerprint features of the acquired fingerprint image to be identified, and then the CPU may compare the target fingerprint features of the extracted fingerprint image to be identified with the fingerprint features of each fingerprint template in a fingerprint database established in advance, so as to obtain an identification result corresponding to the fingerprint image to be identified.
Although the above scheme can realize fingerprint identification, the above fingerprint identification scheme has the following disadvantages: when the data size of the fingerprint template stored in the fingerprint database is larger and larger, a large amount of image matching processing operations performed in the fingerprint identification process easily cause heavy processing load of a CPU (central processing unit), and influence the identification speed of fingerprint identification, and particularly when a large amount of fingerprint templates exist in the fingerprint database, the identification speed is slower.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a fingerprint identification method and apparatus, so as to reduce the processing load of a CPU caused by fingerprint identification and improve the identification speed of fingerprint identification.
In order to achieve the above object, an embodiment of the present invention discloses a fingerprint identification method, which is applied to a GPU in a fingerprint identification device, where the fingerprint identification device includes: a graphics processor GPU and a central processing unit CPU, the method comprising:
receiving target fingerprint characteristics of the fingerprint image to be identified, which are sent by the CPU;
acquiring template fingerprint characteristics of a fingerprint template in a preset fingerprint database sent by the CPU;
determining an identification result corresponding to the fingerprint image to be identified according to the target fingerprint characteristics and the acquired template fingerprint characteristics;
and sending the identification result corresponding to the fingerprint image to be identified to the CPU.
Optionally, the target fingerprint features include: target global features, target minutiae features and target index features, the template fingerprint features including: the fingerprint identification method comprises the steps of template global characteristics, template detail characteristics and template index characteristics, wherein the target global characteristics and the template global characteristics are information describing fingerprint patterns in corresponding images, the target detail characteristics and the template detail characteristics are information describing types and directions of all minutiae in corresponding images, the target index characteristics are information describing relative position relations between minutiae of a fingerprint image to be identified and all other minutiae, and the template index characteristics are information describing relative position relations between minutiae of all fingerprint templates and other partial minutiae;
the CPU divides the fingerprint template in the fingerprint database into L types of patterns based on the corresponding relation between the preset global features and the patterns;
the receiving of the target fingerprint characteristics of the fingerprint image to be identified sent by the CPU comprises the following steps: receiving target global characteristics, target detail characteristics and target index characteristics of the fingerprint image to be identified, which are sent by the CPU;
determining an identification result corresponding to the fingerprint image to be identified according to the target fingerprint characteristics and the obtained template fingerprint characteristics, wherein the identification result comprises the following steps:
determining a target pattern type category corresponding to the target global feature according to the corresponding relation between the global feature and the pattern type;
calculating the first-class similarity between the target index features and the template index features of the first-class fingerprint templates, wherein the first-class fingerprint templates are as follows: a fingerprint template belonging to the target pattern class;
based on the first-class similarity, screening N second-class fingerprint templates from the first-class fingerprint templates;
calculating second class similarity of the minutiae of the fingerprint image to be identified and the minutiae of each second class fingerprint template;
and obtaining an identification result corresponding to the fingerprint image to be identified based on the second similarity.
Optionally, obtaining an identification result corresponding to the fingerprint image to be identified based on the second type of similarity includes:
determining the second type fingerprint template corresponding to the highest second type similarity as a candidate fingerprint template;
and determining the candidate fingerprint template as the identification result corresponding to the fingerprint image to be identified.
Optionally, obtaining an identification result corresponding to the fingerprint image to be identified based on the second type of similarity includes:
determining the second type fingerprint template corresponding to the highest second type similarity as a candidate fingerprint template;
and judging whether the second type of similarity corresponding to the candidate fingerprint template is greater than a preset similarity threshold, and if so, determining the candidate fingerprint template as the identification result corresponding to the fingerprint image to be identified.
Optionally, any one of the fingerprint templates in the fingerprint database is generated according to the following method:
the CPU obtains a plurality of fingerprint images and respectively extracts the fingerprint characteristics of each fingerprint image;
comparing every two of the plurality of fingerprint images according to the extracted fingerprint characteristics, and judging whether the plurality of fingerprint images are fingerprint images from the same finger or not;
if so, respectively carrying out translational and rotational correction processing on the minutiae of each fingerprint image, superposing the corrected fingerprint images and carrying out registration processing on the minutiae of the superposed fingerprint images;
and eliminating minutiae points which are not successfully registered in a convex hull in the fingerprint image after the registration processing, combining the minutiae points which are not successfully registered outside the convex hull, and generating the fingerprint template, wherein the convex hull is a convex polygon formed by connecting the minutiae points which are successfully registered.
Optionally, the process of extracting the target global feature, the target detail feature, and the target index feature of the fingerprint image to be identified includes:
the CPU carries out mean value filtering processing on the fingerprint image to be identified, and noise points in the fingerprint image to be identified are filtered;
carrying out image segmentation processing on the filtered fingerprint image to be identified based on a variance method, and separating a foreground area containing the fingerprint from a background area not containing the fingerprint;
calculating a fingerprint direction field in the foreground region by using a gradient method, wherein the fingerprint direction field is used for calculating fingerprint lines of a fingerprint image to be identified;
determining singular points corresponding to the fingerprint image to be identified according to the fingerprint direction field, and extracting and obtaining target global characteristics of the fingerprint image to be identified based on the singular points;
performing directional filtering for enhancing the definition of ridges and valleys in the fingerprint lines on the foreground region;
carrying out binarization processing and thinning processing on the foreground area subjected to direction filtering, positioning minutiae points from the processed foreground area, obtaining the type and direction of the positioned minutiae points, and extracting target detail characteristics of the fingerprint image to be identified;
and calculating the relative position relation between each minutia and all other minutiae according to the type and the direction of the positioned minutiae, and extracting the target index characteristic of the fingerprint image to be identified.
Optionally, the L types of patterns include:
left skip, right skip, net bow, spiral and bow 5 categories.
Optionally, the determining, according to the correspondence between the global features and the patterns, the target pattern type category corresponding to the target global features includes:
determining the target pattern type corresponding to the target global feature according to the following mode:
if the target global feature only contains 1 central point and the direction is leftward, the target global feature is a left skip;
if the target global feature only contains 1 central point and the direction is right, the target global feature is a right skip;
if the target global feature only comprises 1 central point, the direction is downward, and a triangular point is arranged at the lower position, the target global feature is in a tent bow shape;
if the target global feature contains 2 central points, the target global feature is a spiral;
and if the target global feature does not contain the central point or the triangular point, the target global feature is in a bow shape.
Optionally, the types of the minutiae include: an endpoint and a bifurcation point;
the direction of the minutiae points includes: an endpoint direction and a bifurcation point direction; the end point direction is the tangential direction of the fingerprint line where the end point is located, and the bifurcation point direction is the angular bisector direction of a small included angle formed by the tangential lines of two branches of the fingerprint line where the bifurcation point is located.
In order to achieve the above object, an embodiment of the present invention discloses a fingerprint identification device, which is applied to a GPU in a fingerprint identification device, where the fingerprint identification device includes: graphics Processing Unit (GPU) and Central Processing Unit (CPU), the device comprises:
the first characteristic receiving module is used for receiving the target fingerprint characteristics of the fingerprint image to be identified, which are sent by the CPU;
the second characteristic obtaining module is used for obtaining template fingerprint characteristics of a fingerprint template in a preset fingerprint database sent by the CPU;
the identification result determining module is used for determining an identification result corresponding to the fingerprint image to be identified according to the target fingerprint characteristics and the acquired template fingerprint characteristics;
and the identification result sending module is used for sending the identification result corresponding to the fingerprint image to be identified to the CPU.
Optionally, the target fingerprint features include: target global features, target minutiae features and target index features, the template fingerprint features including: the fingerprint identification method comprises the steps of template global characteristics, template detail characteristics and template index characteristics, wherein the target global characteristics and the template global characteristics are information describing fingerprint patterns in corresponding images, the target detail characteristics and the template detail characteristics are information describing types and directions of all minutiae in corresponding images, the target index characteristics are information describing relative position relations between minutiae of a fingerprint image to be identified and all other minutiae, and the template index characteristics are information describing relative position relations between minutiae of all fingerprint templates and other partial minutiae;
the CPU divides the fingerprint template in the fingerprint database into L types of patterns based on the corresponding relation between the preset global features and the patterns;
the first characteristic receiving module is used for receiving a target global characteristic, a target detail characteristic and a target index characteristic of the fingerprint image to be identified, which are sent by the CPU;
the recognition result determining module includes: the fingerprint template screening system comprises a pattern type determining submodule, a first similarity operator module, a fingerprint template screening submodule, a second similarity calculating submodule and an identification result obtaining submodule; wherein,
the pattern type determining submodule is used for determining a target pattern type corresponding to the target global feature according to the corresponding relation between the global feature and the pattern type;
the first similarity calculation operator module is configured to calculate a first class similarity between the target index feature and a template index feature of each first class fingerprint template, where the first class fingerprint template is: a fingerprint template belonging to the target pattern class;
the fingerprint template screening submodule is used for screening N second-type fingerprint templates from the first-type fingerprint templates based on the first-type similarity;
the second similarity calculation submodule is used for calculating second similarity of the minutiae of the fingerprint image to be identified and the minutiae of each second fingerprint template;
and the identification result obtaining submodule is used for obtaining an identification result corresponding to the fingerprint image to be identified based on the second type of similarity.
Optionally, the identification result obtaining sub-module is specifically configured to:
determining the second type fingerprint template corresponding to the highest second type similarity as a candidate fingerprint template;
and determining the candidate fingerprint template as the identification result corresponding to the fingerprint image to be identified.
Optionally, the identification result obtaining sub-module is specifically configured to:
determining the second type fingerprint template corresponding to the highest second type similarity as a candidate fingerprint template;
and judging whether the second type of similarity corresponding to the candidate fingerprint template is greater than a preset similarity threshold, and if so, determining the candidate fingerprint template as the identification result corresponding to the fingerprint image to be identified.
Optionally, any one of the fingerprint templates in the fingerprint database is generated according to the following method:
the CPU obtains a plurality of fingerprint images and respectively extracts the fingerprint characteristics of each fingerprint image;
comparing every two of the plurality of fingerprint images according to the extracted fingerprint characteristics, and judging whether the plurality of fingerprint images are fingerprint images from the same finger or not;
if so, respectively carrying out translational and rotational correction processing on the minutiae of each fingerprint image, superposing the corrected fingerprint images and carrying out registration processing on the minutiae of the superposed fingerprint images;
and eliminating minutiae points which are not successfully registered in a convex hull in the fingerprint image after the registration processing, combining the minutiae points which are not successfully registered outside the convex hull, and generating the fingerprint template, wherein the convex hull is a convex polygon formed by connecting the minutiae points which are successfully registered.
Optionally, the process of extracting the target global feature, the target detail feature, and the target index feature of the fingerprint image to be identified includes:
the CPU carries out mean value filtering processing on the fingerprint image to be identified, and noise points in the fingerprint image to be identified are filtered;
carrying out image segmentation processing on the filtered fingerprint image to be identified based on a variance method, and separating a foreground area containing the fingerprint from a background area not containing the fingerprint;
calculating a fingerprint direction field in the foreground region by using a gradient method, wherein the fingerprint direction field is used for calculating fingerprint lines of a fingerprint image to be identified;
determining singular points corresponding to the fingerprint image to be identified according to the fingerprint direction field, and extracting and obtaining target global characteristics of the fingerprint image to be identified based on the singular points;
performing directional filtering for enhancing the definition of ridges and valleys in the fingerprint lines on the foreground region;
carrying out binarization processing and thinning processing on the foreground area subjected to direction filtering, positioning minutiae points from the processed foreground area, obtaining the type and direction of the positioned minutiae points, and extracting target detail characteristics of the fingerprint image to be identified;
and calculating the relative position relation between each minutia and all other minutiae according to the type and the direction of the positioned minutiae, and extracting the target index characteristic of the fingerprint image to be identified.
Optionally, the L types of patterns include:
left skip, right skip, net bow, spiral and bow 5 categories.
Optionally, the pattern type category determining sub-module is specifically configured to:
determining the target pattern type corresponding to the target global feature according to the following mode:
if the target global feature only contains 1 central point and the direction is leftward, the target global feature is a left skip;
if the target global feature only contains 1 central point and the direction is right, the target global feature is a right skip;
if the target global feature only comprises 1 central point, the direction is downward, and a triangular point is arranged at the lower position, the target global feature is in a tent bow shape;
if the target global feature contains 2 central points, the target global feature is a spiral;
and if the target global feature does not contain the central point or the triangular point, the target global feature is in a bow shape.
Optionally, the types of the minutiae include: an endpoint and a bifurcation point;
the direction of the minutiae points includes: an endpoint direction and a bifurcation point direction; the end point direction is the tangential direction of the fingerprint line where the end point is located, and the bifurcation point direction is the angular bisector direction of a small included angle formed by the tangential lines of two branches of the fingerprint line where the bifurcation point is located.
The embodiment of the invention provides a fingerprint identification method and a fingerprint identification device, wherein the method comprises the following steps: the method comprises the steps that a GPU (graphics processing Unit) firstly receives target fingerprint characteristics of a to-be-identified fingerprint image sent by a CPU (central processing unit), then template fingerprint characteristics of a fingerprint template in a preset fingerprint database sent by the CPU are obtained, then an identification result corresponding to the to-be-identified fingerprint image is determined according to the target fingerprint characteristics and the obtained template fingerprint characteristics, and finally the identification result corresponding to the to-be-identified fingerprint image is sent to the CPU. When the scheme of the embodiment of the invention is applied to fingerprint identification, the CPU sends the fingerprint identification task which needs a large amount of image matching processing operation in the fingerprint identification process to the GPU for execution, and the GPU sends the identification result to the CPU, therefore, the processing burden of the CPU is reduced, the identification speed of the fingerprint identification is improved, and the improvement effect of the fingerprint identification speed is more obvious especially under the condition that a fingerprint database stores a large amount of fingerprint templates.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a fingerprint identification method according to an embodiment of the present invention;
FIG. 2(a) is a schematic diagram of a left skip fingerprint pattern according to an embodiment of the present invention;
FIG. 2(b) is a schematic diagram of a right skip fingerprint pattern according to an embodiment of the present invention;
FIG. 2(c) is a schematic diagram of a bow-type fingerprint pattern according to an embodiment of the present invention;
FIG. 2(d) is a schematic diagram of a spiral fingerprint pattern according to an embodiment of the present invention;
FIG. 2(e) is a schematic diagram of an arcuate fingerprint pattern provided by an embodiment of the present invention;
FIG. 3(a) is a schematic diagram of a center point and a triangle point in a right skip fingerprint pattern according to an embodiment of the present invention;
FIG. 3(b) is a schematic diagram of a center point in a spiral fingerprint pattern according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a fingerprint identification device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another fingerprint identification device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
referring to fig. 1, a schematic flowchart of a fingerprint identification method provided in an embodiment of the present invention is applied to a GPU in a fingerprint identification device, where the fingerprint identification device includes: a graphics processor GPU and a central processing unit CPU.
The fingerprint identification device is a device using a GPU (Graphic Processing Unit) and a CPU (Central Processing Unit), where the GPU is composed of thousands of sub-core processors capable of simultaneously Processing multiple tasks in parallel, that is, the GPU can efficiently process parallel tasks through thousands of sub-core processors, and the CPU is composed of several core processors dedicated to serially Processing tasks in sequence, and thus, the hardware structure using the GPU and the Central Processing Unit CPU has the advantages that: the execution speed of the fingerprint identification task can be increased, which is different from the prior art device that only uses the central processing unit CPU to perform fingerprint identification.
As shown in fig. 1, a fingerprint identification method provided in an embodiment of the present invention may include the following steps:
s101: and receiving the target fingerprint characteristics of the fingerprint image to be identified, which are sent by the CPU.
When fingerprint identification is required to be carried out on a fingerprint image to be identified, the CPU can extract a target fingerprint characteristic of the fingerprint image to be identified and send the target fingerprint characteristic to the GPU so as to send a fingerprint matching processing task to the GPU; correspondingly, the GPU can receive the target fingerprint characteristics of the fingerprint image to be identified, which are sent by the CPU, and then execute the subsequent processing process based on the target fingerprint characteristics.
It is emphasized that, since the access speed of the constant memory of the GPU is superior to that of the global memory, in an implementation manner, the target fingerprint feature may be cached in the constant memory of the GPU, which is beneficial to increasing the speed of fingerprint identification and increasing the speed.
S102: and acquiring template fingerprint characteristics of the fingerprint template in the preset fingerprint database sent by the CPU.
After receiving the target fingerprint characteristics of the fingerprint image to be identified sent by the CPU, the template fingerprint characteristics of the fingerprint template in the preset fingerprint database sent by the CPU can be obtained, and then the subsequent processing is executed. It can be understood that, in each process of executing the fingerprint identification method, the CPU requests to obtain the template fingerprint features of the fingerprint template in the preset fingerprint database, or the CPU actively sends the template fingerprint features of the fingerprint template in the preset fingerprint database to the GPU after sending the target fingerprint features; of course, it is also reasonable that the template fingerprint feature of the fingerprint template in the preset fingerprint database is requested to be obtained from the CPU in the first execution of the fingerprint identification method, or the CPU actively sends the template fingerprint feature of the fingerprint template in the preset fingerprint database to the GPU after sending the target fingerprint feature, and the GPU caches the template fingerprint feature, and then directly utilizes the template fingerprint feature locally stored by the GPU in the subsequent execution of the fingerprint identification.
In an embodiment of the present invention, the target fingerprint feature may include: target global characteristics, target detail characteristics and target index characteristics; the template fingerprint features may include: template global features, template detail features, and template index features.
Correspondingly, the step S101 of receiving the target fingerprint feature of the fingerprint image to be recognized sent by the CPU may include: and receiving the target global characteristic, the target detail characteristic and the target index characteristic of the target fingerprint image sent by the CPU.
Correspondingly, the step S102 of obtaining the template fingerprint features of the fingerprint template in the preset fingerprint database sent by the CPU may include: and acquiring template global characteristics, template detail characteristics and template index characteristics of the fingerprint template in a preset fingerprint database sent by the CPU.
The target global feature and the template global feature are information describing fingerprint patterns in the corresponding images; the target detail characteristics and the template detail characteristics are information describing the type and the direction of each detail point in the corresponding image; the target index features are information describing the relative position relationship between the minutiae of the fingerprint image to be identified and all other minutiae; the template index features are information describing the relative position relationship between the minutiae of each fingerprint template and other partial minutiae.
It should be noted that the above-mentioned target global feature, target minutia feature, and target index feature, and the template global feature, template minutia feature, and template index feature are only one specific implementation manner listed in the embodiment of the present invention, and certainly, other specific target fingerprint features and template fingerprint features may also be extracted by those skilled in the art according to actual needs, and the embodiment of the present invention is not limited thereto.
It should be noted that the types of the minutiae include: endpoints and bifurcation points.
Wherein, the end point is the point of fingerprint line termination; the bifurcation point is a point where the fingerprint path is divided into a plurality of branches by one branch.
The directions of the minutiae points include: an endpoint direction and a bifurcation point direction; the end point direction is the tangent direction of the fingerprint line where the end point is located, and the bifurcation point direction is the angular bisector direction of a small included angle formed by the tangents of two branches of the fingerprint line where the bifurcation point is located.
It should be noted that the types of the detail points and the directions of the detail points listed above are only one specific implementation manner of the embodiment of the present invention, and of course, the detail points may have other selection manners, and the directions of the detail points may also be reasonably set according to specific situations in practical applications, which need not be limited by the present invention.
Any implementation mode provided by the prior art can be adopted to extract the target global feature, the target detail feature and the target index feature of the fingerprint image to be identified. Specifically, in a specific implementation manner of the present invention, the CPU may extract the target global feature, the target detail feature, and the target index feature of the fingerprint image to be recognized according to the following steps:
a1: the CPU carries out mean value filtering processing on the fingerprint image to be identified, and noise points in the fingerprint image to be identified are filtered;
a2: carrying out image segmentation processing on the filtered fingerprint image to be identified based on a variance method, and separating a foreground area containing the fingerprint from a background area not containing the fingerprint;
a3: calculating a fingerprint direction field in the foreground region by using a gradient method, wherein the fingerprint direction field is used for calculating fingerprint lines of a fingerprint image to be identified;
a4: determining singular points corresponding to the fingerprint image to be identified according to the fingerprint direction field, and extracting and obtaining target global characteristics of the fingerprint image to be identified based on the singular points;
a5: performing directional filtering for enhancing the definition of ridges and valleys in the fingerprint lines on the foreground region;
a6: carrying out binarization processing and thinning processing on the foreground area subjected to direction filtering, positioning minutiae points from the processed foreground area, obtaining the type and direction of the positioned minutiae points, and extracting target detail characteristics of the fingerprint image to be identified;
a7: and calculating the relative position relation between each minutia and all other minutiae according to the type and the direction of the positioned minutiae, and extracting the target index characteristic of the fingerprint image to be identified.
It should be noted that, the above steps a1 to a7 are specific implementation manners of extracting the target global feature, the target detail feature and the target index feature of the fingerprint image to be identified, which are listed in the embodiments of the present invention, and the present invention does not limit the extraction manners of the target global feature, the target detail feature and the target index feature, and a person skilled in the art may select an appropriate extraction manner according to the specific situations in practical applications. In addition, the extraction mode of the template global characteristic and the template detailed characteristic of the fingerprint template is the same as the extraction mode of the target global characteristic and the target detailed characteristic of the fingerprint image to be identified; the template index features of the fingerprint templates are similar to the target index features of the fingerprint images to be identified, and the difference is only that the target index features extract information of the relative position relationship between the minutiae points of the fingerprint images to be identified and all other minutiae points, and the template index features extract information describing the relative position relationship between the minutiae points of the fingerprint templates and all other minutiae points (not all other minutiae points).
In addition, any one of the fingerprint modules in the fingerprint database may be generated using existing techniques. Specifically, in an implementation manner, the CPU may generate any one of the fingerprint templates in the fingerprint database according to the following manners:
b1: the CPU obtains a plurality of fingerprint images and respectively extracts the fingerprint characteristics of each fingerprint image.
B2: and comparing every two of the plurality of fingerprint images according to the extracted fingerprint characteristics to judge whether the plurality of fingerprint images are fingerprint images from the same finger.
B3: and if so, respectively carrying out translational and rotational correction processing on the minutiae of each fingerprint image, superposing the fingerprint images after correction processing, and carrying out registration processing on the minutiae of the superposed fingerprint images.
B4: and eliminating minutiae points which are not successfully registered in a convex hull in the fingerprint image after the registration processing, combining the minutiae points which are not successfully registered outside the convex hull, and generating the fingerprint template, wherein the convex hull is a convex polygon formed by connecting the minutiae points which are successfully registered.
It should be noted that the steps B1 through B4 are only one specific way of generating the fingerprint template in the fingerprint database provided by the embodiment of the present invention, and certainly, other possible implementations are possible, and the embodiment of the present invention is not limited thereto, and any possible implementations may be applied to the present invention.
S103: and determining an identification result corresponding to the target fingerprint image according to the target fingerprint characteristics and the acquired template fingerprint characteristics.
The above-mentioned GPU is composed of thousands of sub-core processors, and these sub-core processors can simultaneously process a plurality of tasks in parallel; it should be noted that, for each sub-core processor constituting the GPU, the sub-core processor includes a plurality of thread grids and thread blocks, and each thread grid and each thread block can process tasks concurrently.
In one implementation, the CPU divides the fingerprint template in the fingerprint database into L types of patterns based on the correspondence between the preset global features and the patterns.
Referring to fig. 2(a) to 2(e), the L pattern categories may include: left skip, right skip, net bow, spiral and bow 5 categories.
Correspondingly, S103 may determine the identification result corresponding to the target fingerprint image according to the following steps:
c1: and determining the target pattern type corresponding to the target global feature according to the corresponding relation between the global feature and the pattern type.
Specifically, under the condition that the fingerprint template in the fingerprint database is divided into 5 categories, namely a left skip, a right skip, a tent arch, a spiral and an arch, the target pattern type category corresponding to the target global feature can be determined in the following manner:
if the target global feature only contains 1 central point and the direction is leftward, the target global feature is a left skip; if the target global feature only contains 1 central point and the direction is right, the target global feature is a right skip; if the target global feature only comprises 1 central point, the direction is downward, and a triangular point is arranged at the lower position, the target global feature is in a tent bow shape; if the target global feature contains 2 central points, the target global feature is a spiral; and if the target global feature does not contain the central point or the triangular point, the target global feature is in a bow shape.
It should be noted that the central point and the triangular point may be referred to as singular points, and are expressed as points with abrupt gradient changes in a mathematical relationship, specifically, see fig. 3(a) and fig. 3(b), where fig. 3(a) is a schematic diagram of the central point and the triangular point in the right skip fingerprint pattern provided in the embodiment of the present invention, and fig. 3(b) is a schematic diagram of the central point in the spiral fingerprint pattern provided in the embodiment of the present invention.
C2: calculating the first class similarity of the target index features and the template index features of the first class fingerprint templates, wherein the first class fingerprint templates are as follows: a fingerprint template belonging to the object pattern class.
In a specific implementation manner, the first-class similarity S between the target index feature and the template index feature of any one first-class fingerprint template may be calculated as follows:
suppose that: the target index features a set of P minutiae and connecting lines (called "line pairs" for short) between the minutiae, wherein the topology of the ith minutia can be represented as: fi=(d1,α1,β2;…dk,αk,βk…;dP-1,αP-1,βP-1) Wherein i is a positive integer and is not more than P-1; wherein d iskthe connecting line distance alpha of the corresponding line pair of the ith detail point and the kth detail point except the detail point in the target index featurekand betakRespectively forming a first included angle and a second included angle by corresponding the ith detail point of the target index feature and the directions of the detail points at the two ends of the corresponding line pair of the kth detail point except the detail point;
the template index feature of any first type fingerprint template is a set of Q minutiae and line pairs between the minutiae, wherein the topological structure of the jth minutia can be represented as: fj=(d1',α1',β2';…dt',αt',βt'…;dP',αP',βP'), wherein j is a positive integer and is less than or equal to Q-1; wherein d ist' is the connection line distance of the corresponding line pair of the jth detail point and the tth detail point except the detail point in the template index feature, alphat' and βt' A third angle and a fourth angle are respectively formed by the jth minutia point of the template index feature and the directions of the minutiae points at the two ends of the corresponding line pair of the tth minutia point except the minutia point.
Judging the line pair characteristic vector (d) corresponding to any line pair k in the topological structure of the minutia point ik,αk,βk) Line pair feature vector (d) corresponding to any line pair t in the topology of minutiae jt',αt',βt') absolute error Δ d of 3 componentskt,Δαkt,ΔβktWhether the following expression is satisfied, if so, judging that the line pair k in the target index feature is similar to the line pair t in the template index feature, and calculating the line pair similarity of the line pair k and the line pair t to be skt;
Δd=|dk-dt'|<Th1,Δα=|αk-αt'|<Th2,Δβ=|βk-βt'|<Th3;
In a specific implementation manner, s can be expressed according to an expressionkt=60-(Δd+Δα+Δβ) Calculating the line pair similarity of two line pairs as skt;
Accumulating and summing the similarity of each line pair of P-1 line pairs formed by the minutiae i and other minutiae in the target index characteristic and each line pair of Q-1 line pairs formed by the minutiae j and other minutiae in the template index characteristic to obtain the similarity s of the minutiae i and the minutiae jij;
And determining the detail point similarity with the highest value of the detail point similarity between the P detail points in the target index feature and the Q detail points in the template index feature as the first class similarity S between the target index feature and the template index feature.
It should be noted that, a target index feature or a template index feature usually includes a plurality of minutiae, and each minutia corresponds to a minutia topology, and specifically, the topology of the minutiae in the target index feature is a global topology, that is: a topological structure formed by the minutiae and all the minutiae and line pairs except the minutiae in the target index feature; and the topological structure of the minutiae in the template index feature is a local topological structure, namely: and the detail point and the partial detail points except the detail point in the template index feature and the topological structure formed by the line pair.
In addition, the first type of similarity between the target index feature and the template index feature is the detail point similarity with the highest value between P detail points in the target index feature and Q detail points in the template index feature, that is, in short, the P × Q detail point similarities need to be compared pairwise, and the detail point similarity with the highest value is determined as the first type of similarity between the target index feature and the template index feature.
For example, if the target index feature contains 3 minutiae: p1,P2,P3The template index feature contains 2 minutiae: q1,Q2Calculate (P)1,Q1)、(P1,Q2)、(P2,Q1)、(P2,Q2)、(P3,Q1)、(P3,Q3) The similarity of the 6 groups of detail points is respectively as follows: 0.82, 0.89, 0.90, 0.95, 0.77 and 0.80, visible minutiae point P2And a point of detail Q2If the value of the detail similarity is the highest, the detail point P is determined2And a point of detail Q2The detail similarity of (2) is the first class similarity of the target index feature and the template index feature.
It should be noted that the above-mentioned way of calculating the first type similarity between the target index feature and the template index feature is only a specific implementation manner of the embodiment of the present invention, and certainly, the first type similarity may also be calculated in other ways, which is not limited by the present invention, and any possible implementation manner may be applied to the present invention.
C3: and screening N second-type fingerprint templates from the first-type fingerprint template based on the first-type similarity.
In one implementation, the calculated similarity of the first type may be sorted according to a sequence from high to low, and then the N first type fingerprint templates with the top sorting may be determined as the second type fingerprint templates.
In another implementation manner, the first-class fingerprint template with the calculated first-class similarity larger than the preset first-class similarity threshold may also be determined as the second-class fingerprint template.
It should be noted that the above description only illustrates two specific implementation manners of how to obtain N second type fingerprint templates from the first type fingerprint templates, and other feasible manners may also be available in practical applications, and the present invention is not limited thereto.
C4: and calculating the second class similarity of the minutiae of the fingerprint image to be identified and the minutiae of each second class fingerprint template.
In addition, the second-class similarity between the minutiae of the fingerprint image to be identified and the minutiae of each second-class fingerprint template can be calculated by adopting the prior art. For example, in one implementation, the calculation method for the second type of similarity may adopt a calculation method similar to the first type of similarity, except that: 1. the first similarity calculation is the connection distance of the line pair and the similarity between the two included angles, and the second similarity calculation is the similarity between the type and the direction of the minutiae point; 2. the first type of similarity is the similarity between the index features of the computed target fingerprint image (i.e., local topology) and the template index features (i.e., global topology), and the second type of similarity is similar to the similarity computation between two global topologies. It should be noted that the present invention does not need to limit the specific calculation method of the second-class similarity, and any possible implementation manner can be applied to the present invention.
C5: and obtaining an identification result corresponding to the fingerprint image to be identified based on the second similarity.
In a specific implementation manner, the identification result corresponding to the fingerprint image to be identified may be obtained as follows:
c51: determining the second type fingerprint template corresponding to the highest second type similarity as a candidate fingerprint template;
c52: and determining the candidate fingerprint template as the identification result corresponding to the fingerprint image to be identified.
In another specific implementation manner, the identification result corresponding to the fingerprint image to be identified may also be obtained in the following manner:
c51: determining the second type fingerprint template corresponding to the highest second type similarity as a candidate fingerprint template;
c53: and judging whether the second type of similarity corresponding to the candidate fingerprint template is greater than a preset similarity threshold, and if so, determining the candidate fingerprint template as the identification result corresponding to the fingerprint image to be identified.
The two specific methods listed above for obtaining the identification result corresponding to the fingerprint image to be identified can be seen, and by using the implementation method described in the former, an identification result with the highest similarity can be obtained; with the implementation described in the latter, the second type of fingerprint template with satisfactory similarity can be determined as the recognition result, but the recognition result is not unique. It should be noted that, in the embodiment of the present invention, a specific manner for obtaining an identification result corresponding to a fingerprint image to be identified needs to be defined, and a person skilled in the art may select the specific manner according to a specific situation in an actual application. It can be seen from the solutions provided in steps C1 through C5 that, in the process of identifying a target fingerprint, the identification range of a fingerprint template in a preset fingerprint database is first narrowed down to a first-class fingerprint template by using a target global feature that can reflect the fingerprint pattern, then the identification range is further narrowed down to N second-class fingerprint templates in the first-class fingerprint template based on the first-class similarity, and finally, an identification result corresponding to the fingerprint image to be identified is obtained based on the target minutiae feature. In the fingerprint identification process, the scheme provided by the steps C1 to C5 can reduce the number of fingerprint templates to be identified in the fingerprint database as much as possible, which is beneficial to reducing the processing operations such as image matching and the like required in the fingerprint identification process and improving the identification speed. It should be emphasized that the specific implementation manner for obtaining the identification result corresponding to the fingerprint image to be identified based on the second-type similarity is only given as an example, and should not be construed as a limitation to the embodiment of the present invention; likewise, the specific implementation manner of determining the identification result corresponding to the fingerprint image to be identified according to the target fingerprint feature and the obtained template fingerprint feature is only given as an example, and should not be construed as a limitation to the embodiment of the present invention.
It should be noted that, although the GPU is composed of thousands of sub-core processors, and each sub-processor may include a plurality of thread grids and thread blocks, as for a thread grid or a thread block of a single sub-core processor, the processing capability of the sub-core processor is not as strong as that of the CPU, in view of this, the above steps C4 and C5 may also be performed by the CPU, that is, the GPU only needs to send the fingerprint template features of N second type fingerprint templates obtained by filtering from the first type fingerprint template to the CPU as the recognition result, and the CPU performs the steps of calculating the second type similarity between the minutiae of the fingerprint image to be recognized and minutiae of each second type fingerprint template and obtaining the recognition result corresponding to the fingerprint image to be recognized based on the second type similarity.
S104: and sending the identification result corresponding to the fingerprint image to be identified to the CPU.
After determining the identification result, the GPU can send the identification result corresponding to the fingerprint image to be identified to the CPU; accordingly, the CPU may perform a specific processing operation based on the recognition result, such as: it is reasonable to output the recognition result to the user, or input the information content related to the recognition result to the user, or the like.
When the scheme of the embodiment of the invention is applied to fingerprint identification, the CPU sends the fingerprint identification task which needs a large amount of image matching processing operation in the fingerprint identification process to the GPU for execution, and the GPU sends the identification result to the CPU, therefore, the processing burden of the CPU is reduced, the identification speed of the fingerprint identification is improved, and the improvement effect of the fingerprint identification speed is more obvious especially under the condition that a fingerprint database stores a large amount of fingerprint templates.
Example two:
referring to fig. 4, a fingerprint identification apparatus provided in an embodiment of the present invention is applied to a GPU in a fingerprint identification device, where the fingerprint identification device includes: a graphics processor GPU and a central processing unit CPU, the apparatus may comprise the following modules:
the first feature receiving module 410 is configured to receive a target fingerprint feature of a fingerprint image to be identified, where the target fingerprint feature is sent by the CPU.
And a second feature obtaining module 420, configured to obtain a template fingerprint feature of a fingerprint template in a preset fingerprint database sent by the CPU.
And an identification result determining module 430, configured to determine an identification result corresponding to the fingerprint image to be identified according to the target fingerprint feature and the obtained template fingerprint feature.
And the identification result sending module 440 is configured to send the identification result corresponding to the fingerprint image to be identified to the CPU.
Specifically, the target fingerprint feature may include: target global characteristics, target detail characteristics and target index characteristics, wherein the template fingerprint characteristics comprise: template global features, template detail features, and template index features.
The target global feature and the template global feature are information describing fingerprint patterns in the corresponding images, the target detail feature and the template detail feature are information describing the type and the direction of each minutia in the corresponding images, the target index feature is information describing the relative position relationship between the minutiae of the fingerprint image to be identified and all other minutiae, and the template index feature is information describing the relative position relationship between the minutiae of each fingerprint template and other minutiae.
Specifically, the types of the minutiae may include: an endpoint and a bifurcation point;
the directions of the minutiae points may include: an endpoint direction and a bifurcation point direction; the end point direction is the tangent direction of the fingerprint line where the end point is located, and the bifurcation point direction is the angular bisector direction of a small included angle formed by the tangents of two branches of the fingerprint line where the bifurcation point is located.
And the CPU divides the fingerprint template in the fingerprint database into L types of the patterns based on the corresponding relation between the preset global characteristics and the patterns.
The first feature receiving module 410 is configured to receive a target global feature, a target detail feature and a target index feature of a fingerprint image to be identified, which are sent by a CPU;
referring to fig. 5, a schematic structural diagram of another fingerprint identification apparatus provided in an embodiment of the present invention, the identification result determining module 430 may include: the fingerprint type determining submodule 431, the first similarity operator module 432, the fingerprint template screening submodule 433, the second similarity operator module 434 and the recognition result obtaining submodule 435.
The pattern type determining submodule 431 is configured to determine, according to a correspondence between the global feature and a pattern, a target pattern type corresponding to the target global feature;
a first similarity operator module 432, configured to calculate a first class similarity between the target index feature and a template index feature of each first class fingerprint template, where the first class fingerprint template is: a fingerprint template belonging to the target pattern class;
the fingerprint template screening submodule 433 is configured to screen N second-type fingerprint templates from the first-type fingerprint templates based on the first-type similarity;
the second similarity operator module 434 is configured to calculate second class similarities between the minutiae of the fingerprint image to be identified and the minutiae of each second class fingerprint template;
the recognition result obtaining sub-module 435 is configured to obtain, based on the second-class similarity, a recognition result corresponding to the fingerprint image to be recognized.
Optionally, the L types of patterns may include: left skip, right skip, net bow, spiral and bow 5 categories.
Specifically, the pattern type determination submodule 431 is specifically configured to:
determining the target pattern type corresponding to the target global feature according to the following mode:
if the target global feature only contains 1 central point and the direction is leftward, the target global feature is a left skip; if the target global feature only contains 1 central point and the direction is right, the target global feature is a right skip; if the target global feature only comprises 1 central point, the direction is downward, and a triangular point is arranged at the lower position, the target global feature is in a tent bow shape; if the target global feature contains 2 central points, the target global feature is a spiral; and if the target global feature does not contain the central point or the triangular point, the target global feature is in a bow shape.
Specifically, the recognition result obtaining sub-module 435 is configured to:
determining the second type fingerprint template corresponding to the highest second type similarity as a candidate fingerprint template;
and determining the candidate fingerprint template as the identification result corresponding to the fingerprint image to be identified.
Specifically, the recognition result obtaining sub-module 435 is configured to:
determining the second type fingerprint template corresponding to the highest second type similarity as a candidate fingerprint template;
and judging whether the second type of similarity corresponding to the candidate fingerprint template is greater than a preset similarity threshold, and if so, determining the candidate fingerprint template as the identification result corresponding to the fingerprint image to be identified.
Specifically, any one of the fingerprint templates in the fingerprint database is generated according to the following modes:
(11) the CPU obtains a plurality of fingerprint images and respectively extracts the fingerprint characteristics of each fingerprint image;
(12) comparing every two of the plurality of fingerprint images according to the extracted fingerprint characteristics, and judging whether the plurality of fingerprint images are fingerprint images from the same finger or not;
(13) if so, respectively carrying out translational and rotational correction processing on the minutiae of each fingerprint image, superposing the corrected fingerprint images and carrying out registration processing on the minutiae of the superposed fingerprint images;
(14) and eliminating minutiae points which are not successfully registered in a convex hull in the fingerprint image after the registration processing, combining the minutiae points which are not successfully registered outside the convex hull, and generating the fingerprint template, wherein the convex hull is a convex polygon formed by connecting the minutiae points which are successfully registered.
Specifically, the process of extracting the target global feature, the target detail feature and the target index feature of the fingerprint image to be identified may include:
(21) the CPU carries out mean value filtering processing on the fingerprint image to be identified, and noise points in the fingerprint image to be identified are filtered;
(22) carrying out image segmentation processing on the filtered fingerprint image to be identified based on a variance method, and separating a foreground area containing the fingerprint from a background area not containing the fingerprint;
(23) calculating a fingerprint direction field in the foreground region by using a gradient method, wherein the fingerprint direction field is used for calculating fingerprint lines of a fingerprint image to be identified;
(24) determining singular points corresponding to the fingerprint image to be identified according to the fingerprint direction field, and extracting and obtaining target global characteristics of the fingerprint image to be identified based on the singular points;
(25) performing directional filtering for enhancing the definition of ridges and valleys in the fingerprint lines on the foreground region;
(26) carrying out binarization processing and thinning processing on the foreground area subjected to direction filtering, positioning minutiae points from the processed foreground area, obtaining the type and direction of the positioned minutiae points, and extracting target detail characteristics of the fingerprint image to be identified;
(27) and calculating the relative position relation between each minutia and all other minutiae according to the type and the direction of the positioned minutiae, and extracting the target index characteristic of the fingerprint image to be identified.
When the scheme of the embodiment of the invention is applied to fingerprint identification, the CPU sends the fingerprint identification task which needs a large amount of image matching processing operation in the fingerprint identification process to the GPU for execution, and the GPU sends the identification result to the CPU, therefore, the processing burden of the CPU is reduced, the identification speed of the fingerprint identification is improved, and the improvement effect of the fingerprint identification speed is more obvious especially under the condition that a fingerprint database stores a large amount of fingerprint templates.
For the apparatus embodiment, since it is substantially similar to the method embodiment, it is described relatively simply, and reference may be made to some descriptions of the method embodiment for relevant points.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.