Biometric feature extraction apparatus and method
By generating and stitching grayscale histograms of orientation and energy images from the reception verification image, the problem of insufficient feature information in existing technologies is solved, thereby improving the accuracy of identity verification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HAINING ESWIN IC DESIGN CO LTD
- Filing Date
- 2022-08-31
- Publication Date
- 2026-08-04
AI Technical Summary
In existing technologies, when identity verification is performed based on the grayscale histogram of the image to be verified, there is limited feature information, resulting in low accuracy of identity verification.
By generating orientation and energy images of the image to be verified, and stitching their corresponding grayscale histograms together to form a total grayscale histogram, more useful feature information can be extracted.
The accuracy of identity verification has been improved, and the reliability of identity verification has been enhanced by extracting more feature information from the image to be verified.
Smart Images

Figure CN115223252B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of identity verification technology, and in particular to a biometric extraction device and method. Background Technology
[0002] Because the shapes of fingerprints, palm prints, irises, finger veins, and palm veins do not change significantly with the age of their owners, only their prominence may change; and because each person's fingerprints, palm prints, irises, finger veins, and palm veins are unique, these are common and highly stable biometric features. Therefore, fingerprints, palm prints, irises, finger veins, and palm veins can be used to verify a user's identity.
[0003] Currently, the usual practice is to acquire an image containing the biometric features of the user to be verified (fingerprint, palm print, iris, finger vein, or palm vein), directly generate a grayscale histogram corresponding to the image, and then perform authentication based on the grayscale histogram. However, the directly generated grayscale histogram contains relatively little feature information, resulting in low accuracy for authentication based on the grayscale histogram. Summary of the Invention
[0004] This application provides a biometric extraction device and method, the main purpose of which is to effectively extract more useful feature information from an image to be verified.
[0005] To address the aforementioned technical problems, this application provides the following technical solutions:
[0006] In a first aspect, this application provides a biometric extraction device, the device comprising:
[0007] The first acquisition unit is used to acquire the image to be verified;
[0008] The first generation unit is used to generate a direction image and an energy image corresponding to the image to be verified based on a preset filter;
[0009] The second generation unit is used to generate the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image;
[0010] The stitching unit is used to stitch together the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image to obtain the total grayscale histogram corresponding to the image to be verified.
[0011] Optionally, the first generation unit includes:
[0012] The first processing module is used to normalize the image to be verified in order to obtain the normalized image corresponding to the image to be verified.
[0013] The acquisition module is used to acquire multiple preset directions corresponding to the preset filter;
[0014] The first generation module is used to generate the energy image and the direction image based on the normalized gray value corresponding to each pixel in the normalized image, the preset filter, and the multiple preset directions.
[0015] Optionally, the first processing module includes:
[0016] The first calculation submodule is used to calculate the average gray value corresponding to multiple pixels based on the gray value corresponding to each pixel in the image to be verified.
[0017] The second calculation submodule is used to calculate the normalized gray value corresponding to each pixel based on the gray value corresponding to each pixel in the image to be verified and the average gray value corresponding to multiple pixels.
[0018] The first generation submodule is used to generate the normalized image based on the normalized grayscale value corresponding to each pixel in the image to be verified.
[0019] Optionally, the first generation module includes:
[0020] The determination submodule is used to determine multiple filtered gray values corresponding to each pixel based on the normalized gray value corresponding to each pixel in the normalized image, the preset filter, and multiple preset directions.
[0021] The sorting submodule is used to sort the multiple filtered gray values corresponding to each pixel in the normalized image.
[0022] The second generation submodule is used to generate the energy image based on the minimum filtered gray value corresponding to each pixel in the normalized image.
[0023] The third generation submodule is used to generate the orientation image based on the maximum filtered gray value and the target filtered gray value corresponding to each pixel in the normalized image, wherein the target filtered gray value corresponding to the pixel is the minimum filtered gray value or the second largest filtered gray value corresponding to the pixel.
[0024] Optionally, the third generation submodule is specifically used for:
[0025] Based on the first preset formula, the total number of multiple preset directions, the index of the preset direction to which the maximum filtered gray value of each pixel belongs, and the index of the preset direction to which the target filtered gray value of each pixel belongs, the directional gray value corresponding to each pixel is determined.
[0026] The directional image is generated based on the directional grayscale value corresponding to each pixel.
[0027] Optionally, the second generation unit includes:
[0028] The first segmentation module is used to segment the directional image according to multiple preset segmentation methods to obtain multiple segmented directional images corresponding to the directional image, wherein each segmented directional image contains one or more first segments;
[0029] The second generation module is used to generate grayscale histograms corresponding to each first block contained in each of the block-oriented images;
[0030] The first stitching module is used to stitch together the grayscale histograms corresponding to each first block contained in each of the segmented directional images to obtain the grayscale histograms corresponding to the directional images.
[0031] The second segmentation module is used to segment the energy image according to multiple preset segmentation methods to obtain multiple segmented energy images corresponding to the energy image, wherein each segmented energy image contains one or more second segments;
[0032] The third generation module is used to generate grayscale histograms corresponding to each second block contained in each of the block energy images;
[0033] The second stitching module is used to stitch together the grayscale histograms corresponding to each second block contained in each of the energy blocks to obtain the grayscale histograms corresponding to the energy images.
[0034] Optionally, the splicing unit includes:
[0035] The second processing module is used to normalize the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image according to the second preset formula, so as to obtain the normalized grayscale histogram corresponding to the orientation image and the normalized grayscale histogram corresponding to the energy image.
[0036] The third stitching module is used to stitch the normalized grayscale histogram corresponding to the orientation image and the normalized grayscale histogram corresponding to the energy image to obtain the total grayscale histogram corresponding to the image to be verified.
[0037] Optionally, the device further includes:
[0038] The second acquisition unit is used to acquire the total grayscale histogram corresponding to each template image;
[0039] The calculation unit is used to calculate the similarity value between the total gray-level histogram corresponding to the image to be verified and the total gray-level histogram corresponding to each template image according to a preset algorithm;
[0040] The judgment unit is used to determine whether the maximum similarity value among the multiple similarity values is greater than a preset similarity threshold;
[0041] The first determining unit is configured to determine that the identity verification result is successful when the judging unit determines that the maximum similarity value is greater than the preset similarity threshold, and to determine the identity information associated with the template image corresponding to the maximum similarity value as the identity information corresponding to the image to be verified.
[0042] The second determining unit is used to determine that the authentication result is authentication failure when the judging unit determines that the maximum similarity value is less than or equal to the preset similarity threshold.
[0043] Secondly, this application also provides a biometric feature extraction method, the method comprising:
[0044] Obtain the image to be verified;
[0045] Generate the orientation image and energy image corresponding to the image to be verified based on the preset filter;
[0046] Generate a grayscale histogram corresponding to the orientation image and a grayscale histogram corresponding to the energy image;
[0047] The grayscale histograms corresponding to the orientation image and the energy image are concatenated to obtain the total grayscale histogram corresponding to the image to be verified.
[0048] Optionally, generating the orientation image and energy image corresponding to the image to be verified based on the preset filter includes:
[0049] The image to be verified is normalized to obtain the normalized image corresponding to the image to be verified.
[0050] Obtain multiple preset directions corresponding to the preset filter;
[0051] The energy image and the direction image are generated based on the normalized grayscale value corresponding to each pixel in the normalized image, the preset filter, and the multiple preset directions.
[0052] Optionally, the normalization process performed on the image to be verified to obtain a normalized image corresponding to the image to be verified includes:
[0053] Based on the grayscale value corresponding to each pixel in the image to be verified, calculate the average grayscale value corresponding to multiple pixels.
[0054] Based on the gray value corresponding to each pixel in the image to be verified and the average gray value corresponding to multiple pixels, calculate the normalized gray value corresponding to each pixel;
[0055] The normalized image is generated based on the normalized grayscale value corresponding to each pixel in the image to be verified.
[0056] Optionally, generating the energy image and the direction image based on the normalized grayscale value corresponding to each pixel in the normalized image, the preset filter, and the multiple preset directions includes:
[0057] Based on the normalized gray value corresponding to each pixel in the normalized image, the preset filter, and the multiple preset directions, multiple filtered gray values corresponding to each pixel are determined.
[0058] The multiple filtered grayscale values corresponding to each pixel in the normalized image are sorted respectively.
[0059] The energy image is generated based on the minimum filtered gray value corresponding to each pixel in the normalized image.
[0060] The orientation image is generated based on the maximum filtered gray value and the target filtered gray value corresponding to each pixel in the normalized image, wherein the target filtered gray value corresponding to the pixel is the minimum filtered gray value or the second largest filtered gray value corresponding to the pixel.
[0061] Optionally, generating the orientation image based on the maximum filtered gray value and the target filtered gray value corresponding to each pixel in the normalized image includes:
[0062] Based on the first preset formula, the total number of multiple preset directions, the index of the preset direction to which the maximum filtered gray value of each pixel belongs, and the index of the preset direction to which the target filtered gray value of each pixel belongs, the directional gray value corresponding to each pixel is determined.
[0063] The directional image is generated based on the directional grayscale value corresponding to each pixel.
[0064] Optionally, generating the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image includes:
[0065] The directional image is divided into blocks according to multiple preset block division methods to obtain multiple block directional images corresponding to the directional image, wherein each block directional image contains one or more first blocks;
[0066] Generate a grayscale histogram corresponding to each first block contained in each of the block-oriented images;
[0067] The grayscale histograms corresponding to each first block contained in each of the segmented directional images are stitched together to obtain the grayscale histogram corresponding to the directional image.
[0068] The energy image is divided into blocks according to multiple preset block division methods to obtain multiple block energy images corresponding to the energy image, wherein each block energy image contains one or more second blocks;
[0069] Generate a grayscale histogram corresponding to each second block contained in each of the said block energy images;
[0070] The grayscale histograms corresponding to each second block contained in each of the energy blocks are stitched together to obtain the grayscale histogram corresponding to the energy image.
[0071] Optionally, the step of concatenating the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image to obtain the total grayscale histogram corresponding to the image to be verified includes:
[0072] According to the second preset formula, the gray-level histograms corresponding to the orientation image and the energy image are normalized respectively to obtain the normalized gray-level histograms corresponding to the orientation image and the energy image.
[0073] The normalized grayscale histogram corresponding to the orientation image and the normalized grayscale histogram corresponding to the energy image are concatenated to obtain the total grayscale histogram corresponding to the image to be verified.
[0074] Optionally, the method further includes:
[0075] Obtain the total grayscale histogram corresponding to each template image;
[0076] The similarity value between the total gray-level histogram of the image to be verified and the total gray-level histogram of each template image is calculated according to the preset algorithm.
[0077] Determine whether the maximum similarity value among the multiple similarity values is greater than a preset similarity threshold;
[0078] If so, the identity verification result is determined to be successful, and the identity information associated with the template image corresponding to the maximum similarity value is determined as the identity information corresponding to the image to be verified.
[0079] If not, the authentication result is determined to be authentication failure.
[0080] Thirdly, embodiments of this application provide a storage medium including a stored program, wherein the program, when running, controls the device where the storage medium is located to execute the biometric extraction method described in the second aspect.
[0081] Fourthly, embodiments of this application provide a biometric extraction apparatus, the apparatus including a storage medium; and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; the program instructions, when executed, perform the biometric extraction method described in the second aspect.
[0082] By employing the above-described technical solution, the technical solution provided in this application has at least the following advantages:
[0083] This application provides a biometric extraction device and method. The biometric extraction device includes a first acquisition unit, a first generation unit, a second generation unit, and a stitching unit. After a target terminal device acquires a verification image containing the biometric features of the user to be verified through a preset sensor, firstly, the first acquisition unit acquires the verification image; secondly, the first generation unit generates an orientation image and an energy image corresponding to the verification image based on a preset filter; thirdly, the second generation unit generates a grayscale histogram corresponding to the orientation image and a grayscale histogram corresponding to the energy image; finally, the stitching unit stitches the grayscale histograms corresponding to the orientation image and the energy image to obtain a total grayscale histogram corresponding to the verification image. In this application, the total grayscale histogram of the verification image extracted by the biometric extraction device includes the grayscale histograms corresponding to the orientation image and the energy image, meaning that the biometric extraction device can effectively extract more useful feature information from the verification image.
[0084] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0085] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, with the same or corresponding reference numerals denoteing the same or corresponding parts, wherein:
[0086] Figure 1 This illustration shows a block diagram of a biometric extraction device provided in an embodiment of this application;
[0087] Figure 2 This invention provides a block diagram illustrating the composition of another biometric extraction device according to an embodiment of the present application.
[0088] Figure 3 A flowchart of a biometric feature extraction method provided in an embodiment of this application is shown. Detailed Implementation
[0089] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.
[0090] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.
[0091] This application provides a biometric extraction device, which is applied to a target terminal device that requires identity verification. The target terminal device may be, but is not limited to, a smartphone, tablet, smart lock, etc. Figure 1 As shown, the device specifically includes: a first acquisition unit 11, used to acquire an image to be verified; a first generation unit 12, used to generate a direction image and an energy image corresponding to the image to be verified based on a preset filter; a second generation unit 13, used to generate a grayscale histogram corresponding to the direction image and a grayscale histogram corresponding to the energy image; and a stitching unit 14, used to stitch the grayscale histogram corresponding to the direction image and the grayscale histogram corresponding to the energy image to obtain a total grayscale histogram corresponding to the image to be verified.
[0092] The following combination Figure 1 The illustrated biometric extraction device details the process of extracting the total grayscale histogram corresponding to the image to be verified:
[0093] The user to be verified is the user who wishes to unlock the target terminal device. The image to be verified is an image containing the biometric features of the user to be verified, collected by the target terminal device during the user's identity verification process. The biometric features contained in the image to be verified can be any one of the following: fingerprint, palm print, iris, finger vein, or palm vein. The image to be verified is a grayscale image. The target terminal device has a built-in preset sensor that can acquire the image to be verified of the user. The preset sensor can be, but is not limited to, an optical sensor, an ultrasonic sensor, a camera sensor, an infrared sensor, etc. The preset filter can be, but is not limited to, any one of the following: a Gussian filter, a Gabor filter, a Log-Gabor filter, etc.
[0094] In this embodiment, when a user to be verified wishes to unlock a target terminal device, and the target terminal device has a built-in optical sensor (or ultrasonic sensor), the user to be verified can place their finger (or palm) on the collection area so that the target terminal device can collect a verification image containing the user's fingerprint (or palm print) through the optical sensor (or ultrasonic sensor); when a user to be verified wishes to unlock a target terminal device, and the target terminal device has a built-in camera sensor, the user to be verified can look at the camera sensor so that the target terminal device can collect a verification image containing the user's iris through the camera sensor; when a user to be verified wishes to unlock a target terminal device, and the target terminal device has a built-in infrared sensor, the user to be verified can place their finger (or palm) on the collection area so that the target terminal device can collect a verification image containing the user's finger veins (or palm veins) through the infrared sensor; the target terminal device collects the image through a preset sensor... After obtaining the image to be verified, which contains the biometric features of the user to be verified, the first acquisition unit 11 in the biometric extraction device can acquire the image to be verified. After the first acquisition unit 11 acquires the image to be verified, the first generation unit 12 can generate the orientation image and energy image corresponding to the image to be verified based on a preset filter. After the first generation unit 12 generates the orientation image and energy image corresponding to the image to be verified based on the preset filter, the second generation unit 13 can generate the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image, respectively. After the second generation unit 13 generates the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image, the stitching unit 14 can stitch the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image to obtain the total grayscale histogram corresponding to the image to be verified, wherein the total grayscale histogram corresponding to the image to be verified includes the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image.
[0095] It should be noted that in practical applications, when the target terminal device acquires a color image through a preset sensor, the biometric extraction device needs to convert the image to be verified into a grayscale image first.
[0096] This application provides a biometric extraction device, comprising: a first acquisition unit, a first generation unit, a second generation unit, and a stitching unit. After a target terminal device acquires a verification image containing the biometric features of the user to be verified through a preset sensor, firstly, the first acquisition unit acquires the verification image; secondly, the first generation unit generates a direction image and an energy image corresponding to the verification image based on a preset filter; thirdly, the second generation unit generates a grayscale histogram corresponding to the direction image and a grayscale histogram corresponding to the energy image; finally, the stitching unit stitches the grayscale histograms corresponding to the direction image and the energy image to obtain a total grayscale histogram corresponding to the verification image. In this application embodiment, the total grayscale histogram corresponding to the verification image extracted by the biometric extraction device includes the grayscale histograms corresponding to the direction image and the energy image, meaning that the biometric extraction device can effectively extract more useful feature information from the verification image.
[0097] This application also provides another biometric extraction device, which is applied to a target terminal device that requires authentication; such as Figure 2 As shown, the following is combined Figure 2 Explanation:
[0098] Furthermore, such as Figure 2 As shown, the first generation unit 12 includes: a first processing module 121, used to perform normalization processing on the image to be verified to obtain a normalized image corresponding to the image to be verified; an acquisition module 122, used to acquire multiple preset directions corresponding to a preset filter; and a first generation module 123, used to generate an energy image and a direction image based on the normalized gray value corresponding to each pixel in the normalized image, the preset filter, and the multiple preset directions.
[0099] Among them, the preset directions corresponding to the preset filters are preset by the staff of the production target terminal equipment and stored in the target terminal equipment; among them, the value range of the multiple preset directions is [0°, 180°], and the values of any two preset directions are different. For example, (1) 12 preset directions are preset, and the values of the 12 preset directions are arranged in ascending order as 0°, 15°, 30°, 45°, 60°, 75°, 90°, 105°, 120°, 135°, 1 50°, 165° (2) Nine preset directions are preset, and the values of the nine preset directions are arranged in ascending order as 0°, 20°, 40°, 60°, 80°, 100°, 120°, 140°, 160° (3) Six preset directions are preset, and the values of the six preset directions are arranged in ascending order as 0°, 30°, 60°, 90°, 120°, 150°. In this embodiment, the specific number of multiple preset directions and the specific value of each preset direction are not specifically limited.
[0100] In this embodiment, the specific process by which the first generation unit 12 generates the orientation image and energy image corresponding to the image to be verified based on the preset filter is as follows: First, the first processing module 121 performs normalization processing on the image to be verified to obtain the normalized image corresponding to the image to be verified; second, the acquisition module 122 acquires multiple preset directions corresponding to the preset filter; finally, the first generation module 123 generates the energy image and orientation image corresponding to the image to be verified based on the normalized grayscale value corresponding to each pixel point contained in the normalized image, the preset filter, and the multiple preset directions.
[0101] Furthermore, such as Figure 2 As shown, the first processing module 121 includes: a first calculation submodule 1211, used to calculate the average gray value corresponding to multiple pixels based on the gray value corresponding to each pixel in the image to be verified; a second calculation submodule 1212, used to calculate the normalized gray value corresponding to each pixel based on the gray value corresponding to each pixel in the image to be verified and the average gray value corresponding to multiple pixels; and a first generation submodule 1213, used to generate a normalized image based on the normalized gray value corresponding to each pixel in the image to be verified.
[0102] In this embodiment of the application, the first processing module 121 performs normalization processing on the image to be verified to obtain the normalized image corresponding to the image to be verified. The specific process is as follows:
[0103] First, the first calculation submodule 1211 calculates the average gray value corresponding to multiple pixels based on the gray value corresponding to each pixel in the image to be verified. That is, the gray values corresponding to each pixel in the image to be verified are summed to obtain the summation result. Then, the ratio of the summation result to the number of multiple pixels is calculated to obtain the average gray value corresponding to multiple pixels.
[0104] Secondly, the second calculation submodule 1212 calculates the normalized gray value corresponding to each pixel based on the gray value corresponding to each pixel in the image to be verified and the average gray value corresponding to multiple pixels. That is, for any pixel in the image to be verified, the difference between the gray value corresponding to the pixel and the average gray value corresponding to multiple pixels is first calculated, and then the difference is determined as the normalized gray value corresponding to the pixel.
[0105] Finally, the first generation submodule 1213 generates a normalized image based on the normalized grayscale value corresponding to each pixel in the image to be verified. Specifically, the normalized grayscale value corresponding to the first pixel in the first row of the image to be verified is determined as the grayscale value of the first pixel in the first row of the normalized image, the normalized grayscale value corresponding to the second pixel in the first row of the image to be verified is determined as the grayscale value of the second pixel in the first row of the normalized image, the normalized grayscale value corresponding to the third pixel in the first row of the image to be verified is determined as the grayscale value of the third pixel in the first row of the normalized image, and so on, until the normalized grayscale value corresponding to the last pixel in the last row of the image to be verified is determined as the grayscale value of the last pixel in the last row of the normalized image. Then, the normalized image is generated based on the grayscale value (i.e., the normalized grayscale value) corresponding to each pixel in the normalized image.
[0106] It should be noted that when the normalized gray value corresponding to a certain pixel is a decimal, the normalized gray value corresponding to that pixel needs to be rounded down.
[0107] Furthermore, such as Figure 2As shown, the first generation module 123 includes: a determining submodule 1231, used to determine multiple filtered gray values corresponding to each pixel based on the normalized gray value corresponding to each pixel in the normalized image, a preset filter, and multiple preset directions; a sorting submodule 1232, used to sort the multiple filtered gray values corresponding to each pixel in the normalized image respectively; a second generation submodule 1233, used to generate an energy image based on the minimum filtered gray value corresponding to each pixel in the normalized image; and a third generation submodule 1234, used to generate a direction image based on the maximum filtered gray value and the target filtered gray value corresponding to each pixel in the normalized image, wherein, for any pixel in the normalized image, the target filtered gray value corresponding to that pixel is the minimum filtered gray value or the second largest filtered gray value among the multiple filtered gray values corresponding to that pixel.
[0108] In this embodiment of the application, the specific process by which the first generation module 123 generates the energy image and orientation image corresponding to the image to be verified based on the normalized gray value corresponding to each pixel in the normalized image, a preset filter, and multiple preset directions is as follows:
[0109] First, the determining submodule 1231 determines multiple filtered gray values corresponding to each pixel based on the normalized gray value corresponding to each pixel in the normalized image, a preset filter, and multiple preset directions. That is, for any pixel in the normalized image, the normalized gray value corresponding to the pixel and the first preset direction (i.e., the preset direction with the smallest value among multiple preset directions) are input into the preset filter so that the preset filter outputs the first filtered gray value corresponding to the pixel. The normalized gray value corresponding to the pixel and the second preset direction (i.e., the preset direction with the second smallest value among multiple preset directions) are input into the preset filter so that the preset filter outputs the second filtered gray value corresponding to the pixel. The normalized gray value corresponding to the pixel and the last preset direction (i.e., the preset direction with the largest value among multiple preset directions) are input into the preset filter so that the preset filter outputs the last filtered gray value corresponding to the pixel.
[0110] Next, the sorting submodule 1232 sorts the multiple filtered gray values corresponding to each pixel in the normalized image, that is, sorts the multiple filtered gray values corresponding to the first pixel in the first row of the normalized image, sorts the multiple filtered gray values corresponding to the second pixel in the first row of the normalized image, ... and sorts the multiple filtered gray values corresponding to the last pixel in the last row of the normalized image.
[0111] Next, the second generation submodule 1233 generates an energy image based on the minimum filtered gray value corresponding to each pixel in the normalized image. Specifically, the minimum filtered gray value among the multiple filtered gray values corresponding to the first pixel in the first row of the normalized image is determined as the gray value of the first pixel in the first row of the energy image, the minimum filtered gray value among the multiple filtered gray values corresponding to the second pixel in the first row of the normalized image is determined as the gray value of the second pixel in the first row of the energy image, and so on, until the minimum filtered gray value among the multiple filtered gray values corresponding to the last pixel in the last row of the normalized image is determined as the gray value of the last pixel in the last row of the energy image. Then, the energy image is generated based on the gray value (i.e., the minimum filtered gray value) corresponding to each pixel in the energy image.
[0112] Finally, the third generation submodule 1234 generates a directional image based on the maximum filtered gray value and the target filtered gray value corresponding to each pixel in the normalized image.
[0113] Furthermore, such as Figure 2 As shown, the third generation submodule 1234 is specifically used to: determine the direction gray value corresponding to each pixel according to the first preset formula, the total number of multiple preset directions, the index of the preset direction to which the maximum filtered gray value corresponding to each pixel belongs, and the index of the preset direction to which the target filtered gray value corresponding to each pixel belongs; and generate a direction image according to the direction gray value corresponding to each pixel.
[0114] In this embodiment, the specific process by which the third generation submodule 1234 generates a directional image based on the maximum filtered gray value and the target filtered gray value corresponding to each pixel in the normalized image is as follows:
[0115] First, based on the first preset formula, the total number of multiple preset directions, the index of the preset direction to which the maximum filtered gray value of each pixel in the normalized image belongs, and the index of the preset direction to which the target filtered gray value of each pixel belongs, the directional gray value corresponding to each pixel is determined. Specifically, for any pixel in the normalized image, the total number of multiple preset directions, the index of the preset direction to which the maximum filtered gray value of that pixel belongs, and the index of the preset direction to which the target filtered gray value of that pixel belongs are substituted into the first preset formula to calculate the directional gray value corresponding to that pixel. Here, the index of the preset direction to which the maximum filtered gray value of that pixel belongs is the index of the preset direction to which the maximum filtered gray value of that pixel belongs. The sequence number of the preset direction to which the large filtered gray value belongs among multiple preset directions is used. The sequence number of the preset direction to which the target filtered gray value of the pixel belongs is the sequence number of the preset direction to which the target filtered gray value of the pixel belongs among multiple preset directions. For example, if the maximum filtered gray value of the pixel is determined by the sixth preset direction among multiple preset directions arranged in ascending order, then the sequence number of the preset direction to which the maximum filtered gray value of the pixel belongs is 6. If the target filtered gray value of the pixel is determined by the eighth preset direction among multiple preset directions arranged in ascending order, then the sequence number of the preset direction to which the target filtered gray value of the pixel belongs is 8. The specific first preset formula is as follows:
[0116] X = N*A + B
[0117] Where X is the directional gray value corresponding to a certain pixel in the normalized image, N is the total number of multiple preset directions, A is the index of the preset direction to which the maximum filtered gray value corresponding to the pixel belongs, and B is the index of the preset direction to which the target filtered gray value corresponding to the pixel belongs.
[0118] Secondly, an orientation image is generated based on the orientation grayscale value corresponding to each pixel in the normalized image. Specifically, the orientation grayscale value corresponding to the first pixel in the first row of the normalized image is determined as the grayscale value of the first pixel in the first row of the orientation image, the orientation grayscale value corresponding to the second pixel in the first row of the normalized image is determined as the grayscale value of the second pixel in the first row of the orientation image, and so on, until the orientation grayscale value corresponding to the last pixel in the last row of the normalized image is determined as the grayscale value of the last pixel in the last row of the orientation image. Then, an orientation image is generated based on the grayscale value (i.e., orientation grayscale value) corresponding to each pixel in the orientation image.
[0119] Furthermore, such as Figure 2As shown, the second generation unit 13 includes: a first segmentation module 131, used to segment the orientation image according to multiple preset segmentation methods to obtain multiple segmented orientation images corresponding to the orientation image, wherein each segmented orientation image contains one or more first segments; a second generation module 132, used to generate grayscale histograms corresponding to each first segment contained in each segmented orientation image; a first stitching module 133, used to stitch together the grayscale histograms corresponding to each first segment contained in each segmented orientation image to obtain a grayscale histogram corresponding to the orientation image; a second segmentation module 134, used to segment the energy image according to multiple preset segmentation methods to obtain multiple segmented energy images corresponding to the energy image, wherein each segmented energy image contains one or more second segments; a third generation module 135, used to generate grayscale histograms corresponding to each second segment contained in each segmented energy image; and a second stitching module 136, used to stitch together the grayscale histograms corresponding to each second segment contained in each segmented energy image to obtain a grayscale histogram corresponding to the energy image.
[0120] In this embodiment of the application, the specific process by which the second generation unit 13 generates the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image is as follows:
[0121] First, the first segmentation module 131 performs segmentation processing on the directional image according to multiple preset segmentation methods to obtain multiple segmented directional images corresponding to the directional image. That is, the first preset segmentation method is used to perform segmentation processing on the directional image to obtain the first segmented directional image corresponding to the directional image, the second preset segmentation method is used to perform segmentation processing on the directional image to obtain the second segmented directional image corresponding to the directional image, and so on, the last preset segmentation method is used to perform segmentation processing on the directional image to obtain the last segmented directional image corresponding to the directional image. Each segmented directional image contains one or more first segments. The multiple preset segmentation methods may include, but are not limited to: (1) no segmentation, (2) dividing the directional image into 4 segments of the same size, (3) dividing the directional image into 16 segments of the same size, (4) dividing the directional image into 64 segments of the same size, etc. It should be noted that when the preset segmentation method is no segmentation, the segmented directional image corresponding to the directional image is the directional image itself.
[0122] Next, the second generation module 132 generates grayscale histograms corresponding to each first block contained in each block direction image. That is, firstly, grayscale histograms corresponding to each first block contained in the first block direction image are generated, then grayscale histograms corresponding to each first block contained in the second block direction image are generated, and so on. Finally, grayscale histograms corresponding to each first block contained in the last block direction image are generated.
[0123] Next, the first stitching module 133 stitches the grayscale histograms corresponding to each first block contained in each block of the directional image to obtain the grayscale histogram corresponding to the directional image.
[0124] Next, the second segmentation module 134 performs segmentation processing on the energy image according to multiple preset segmentation methods to obtain multiple segmented energy images corresponding to the energy image. That is, the first preset segmentation method is used to perform segmentation processing on the energy image to obtain the first segmented energy image corresponding to the energy image, the second preset segmentation method is used to perform segmentation processing on the energy image to obtain the second segmented energy image corresponding to the energy image, and so on, the last preset segmentation method is used to perform segmentation processing on the energy image to obtain the last segmented energy image corresponding to the energy image. Each segmented energy image contains one or more second segments. The multiple preset segmentation methods may include, but are not limited to: (1) no segmentation, (2) dividing the energy image into 4 segments of the same size, (3) dividing the energy image into 16 segments of the same size, (4) dividing the energy image into 64 segments of the same size, etc. It should be noted that when the preset segmentation method is no segmentation, the segmented energy image corresponding to the energy image is the energy image itself.
[0125] Next, the third generation module 135 generates grayscale histograms corresponding to each first block contained in each block energy image. That is, firstly, grayscale histograms corresponding to each first block contained in the first block energy image are generated, then grayscale histograms corresponding to each first block contained in the second block energy image are generated, and so on. Finally, grayscale histograms corresponding to each first block contained in the last block energy image are generated.
[0126] Finally, the second stitching module 136 stitches the grayscale histograms corresponding to each second block contained in each block energy image to obtain the grayscale histogram corresponding to the energy image.
[0127] It should be noted that, since the second generation unit 13 first divides the orientation image into blocks according to multiple preset block division methods to obtain multiple block orientation images corresponding to the orientation image, then generates a grayscale histogram corresponding to each first block contained in each block orientation image, and finally splices the grayscale histograms corresponding to each first block contained in each block orientation image to obtain a grayscale histogram corresponding to the orientation image, the obtained grayscale histogram corresponding to the orientation image contains global feature information and local feature information of the orientation image. Similarly, the obtained grayscale histogram corresponding to the energy image contains global feature information and local feature information of the energy image.
[0128] Furthermore, such as Figure 2 As shown, the stitching unit 14 includes: a second processing module 141, used to normalize the gray-level histogram corresponding to the orientation image and the gray-level histogram corresponding to the energy image according to a second preset formula, so as to obtain a normalized gray-level histogram corresponding to the orientation image and a normalized gray-level histogram corresponding to the energy image; and a third stitching module 142, used to stitch the normalized gray-level histogram corresponding to the orientation image and the normalized gray-level histogram corresponding to the energy image, so as to obtain a total gray-level histogram corresponding to the image to be verified.
[0129] In this embodiment, the stitching unit 14 stitches the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image to obtain the total grayscale histogram corresponding to the image to be verified. The specific process is as follows:
[0130] First, the second processing module 141 normalizes the grayscale histograms corresponding to the orientation image and the energy image according to the second preset formula, respectively, to obtain normalized grayscale histograms corresponding to the orientation image and the energy image. Specifically, it first calculates the normalized value for each bin in the grayscale histogram corresponding to the orientation image based on the second preset formula and the values of each bin. Then, it determines the normalized value of the first bin in the grayscale histogram corresponding to the orientation image as the value of the first bin, the second bin as the value of the second bin, and so on, until the last bin in the grayscale histogram corresponding to the orientation image is determined as the value of the last bin. Finally, a normalized grayscale histogram is generated based on the values (i.e., normalized values) of each bin in the normalized grayscale histogram. First, based on the second preset formula and the values of each bin in the grayscale histogram corresponding to the energy image, the normalized value for each bin in the grayscale histogram corresponding to the energy image is calculated. Then, the normalized value for the first bin in the grayscale histogram corresponding to the energy image is determined as the value of the first bin in the normalized grayscale histogram corresponding to the energy image; the normalized value for the second bin in the grayscale histogram corresponding to the energy image is determined as the value of the second bin in the normalized grayscale histogram corresponding to the energy image; and so on, until the normalized value for the last bin in the grayscale histogram corresponding to the energy image is determined as the value of the last bin in the normalized grayscale histogram corresponding to the energy image. Finally, a normalized grayscale histogram is generated based on the values (i.e., normalized values) of each bin in the normalized grayscale histogram. The second preset formula is as follows:
[0131]
[0132] Among them, HB i hb is the normalized value of the i-th bin in the gray-level histogram corresponding to the orientation image (or the normalized value of the i-th bin in the gray-level histogram corresponding to the energy image). i Let be the value of the i-th bin in the grayscale histogram corresponding to the orientation image (or the value of the i-th bin in the grayscale histogram corresponding to the energy image), e is a preset constant, and n is the total number of bins in the grayscale histogram corresponding to the orientation image (or the total number of bins in the grayscale histogram corresponding to the energy image).
[0133] Secondly, the third stitching module 142 stitches the normalized grayscale histogram corresponding to the orientation image and the normalized grayscale histogram corresponding to the energy image to obtain the total grayscale histogram corresponding to the image to be verified.
[0134] Furthermore, such as Figure 2 As shown, the biometric extraction device further includes: a second acquisition unit 15, used to acquire the total grayscale histogram corresponding to each template image; a calculation unit 16, used to calculate the similarity value between the total grayscale histogram corresponding to the image to be verified and the total grayscale histogram corresponding to each template image according to a preset algorithm; a judgment unit 17, used to determine whether the maximum similarity value among multiple similarity values is greater than a preset similarity threshold; a first determination unit 18, used to determine that the identity verification result is successful when the judgment unit 17 determines that the maximum similarity value is greater than the preset similarity threshold, and to determine the identity information associated with the template image corresponding to the maximum similarity value as the identity information corresponding to the image to be verified; and a second determination unit 19, used to determine that the identity verification result is unsuccessful when the judgment unit 17 determines that the maximum similarity value is less than or equal to the preset similarity threshold.
[0135] In this embodiment, for any template image, the template image is an image containing the biometric features of a target user (i.e., the user to be verified or other users) that has been pre-recorded. The types of biometric features contained in the template image are the same as those contained in the image to be verified. The template image is specifically a grayscale image. After the target terminal device acquires the template image of a target user through a preset sensor, the biometric feature extraction device extracts the total grayscale histogram corresponding to the template image and associates the total grayscale histogram corresponding to each template image with the identity information and stores it in the local storage space of the target terminal device. The specific process of the biometric feature extraction device extracting the total grayscale histogram corresponding to each template image is the same as the specific process of extracting the total grayscale histogram corresponding to the image to be verified, and will not be described in detail in this embodiment. The preset algorithm can be, but is not limited to, any one of the following: L1 distance algorithm, L2 distance algorithm, chi-square distance algorithm, Manhattan distance algorithm, etc. The preset similarity threshold can be, but is not limited to, 80%, 85%, 90%, etc.
[0136] In this embodiment, after the stitching unit 14 stitches together the total grayscale histogram corresponding to the image to be verified, the second acquisition unit 15 can acquire the total grayscale histogram corresponding to each template image from the local storage space of the target terminal device; after the second acquisition unit 15 acquires the total grayscale histogram corresponding to each template image, the calculation unit 16 can calculate the similarity value between the total grayscale histogram corresponding to the image to be verified and the total grayscale histogram corresponding to each template image according to a preset algorithm; the calculation unit 16 calculates the similarity value between the total grayscale histogram corresponding to the image to be verified and the total grayscale histogram corresponding to each template image. After determining the value, the judgment unit 17 needs to determine whether the maximum similarity value among the multiple similarity values is greater than the preset similarity threshold. When the judgment unit 17 determines that the maximum similarity value among the multiple similarity values is greater than the preset similarity threshold, the first determination unit 18 can determine that the identity verification result of the user to be verified is successful, and determine the identity information associated with the template image corresponding to the maximum similarity value as the identity information corresponding to the image to be verified. When the judgment unit 17 determines that the maximum similarity value is less than or equal to the preset similarity threshold, the second determination unit 19 can determine that the identity verification result of the user to be verified is unsuccessful.
[0137] Furthermore, as a response to the above Figure 1 and Figure 2 In addition to the implementation of the illustrated device, another embodiment of this application also provides a biometric feature extraction method. This method is applied to a target terminal device requiring authentication, wherein the target terminal device may be, but is not limited to, a smartphone, tablet computer, smart lock, etc. This method embodiment corresponds to the foregoing device embodiment. For ease of reading, this method embodiment will not repeat the details of the foregoing device embodiment, but it should be understood that the method in this embodiment can implement all the content of the foregoing device embodiment. This method is applied to effectively extract more useful feature information from the image to be verified, specifically as follows... Figure 3 As shown, the method includes:
[0138] 201. Obtain the image to be verified.
[0139] 202. Generate the orientation image and energy image corresponding to the image to be verified based on the preset filter.
[0140] 203. Generate the grayscale histograms corresponding to the orientation image and the energy image.
[0141] 204. The gray-level histograms corresponding to the orientation image and the energy image are concatenated to obtain the total gray-level histogram corresponding to the image to be verified.
[0142] Further, step 202, generating the orientation image and energy image corresponding to the image to be verified based on the preset filter, includes:
[0143] The image to be verified is normalized to obtain the normalized image corresponding to the image to be verified.
[0144] Obtain multiple preset directions corresponding to the preset filter;
[0145] Based on the normalized grayscale value corresponding to each pixel in the normalized image, a preset filter, and multiple preset directions, an energy image and a direction image are generated.
[0146] Furthermore, the image to be verified is normalized to obtain a normalized image corresponding to the image to be verified, including:
[0147] Calculate the average gray value of multiple pixels based on the gray value of each pixel in the image to be verified.
[0148] Based on the gray value of each pixel in the image to be verified and the average gray value of multiple pixels, calculate the normalized gray value of each pixel.
[0149] A normalized image is generated based on the normalized grayscale value corresponding to each pixel in the image to be verified.
[0150] Furthermore, based on the normalized grayscale value corresponding to each pixel in the normalized image, a preset filter, and multiple preset directions, an energy image and a direction image are generated, including:
[0151] Based on the normalized gray value corresponding to each pixel in the normalized image, the preset filter and multiple preset directions, determine multiple filtered gray values corresponding to each pixel.
[0152] Sort the multiple filtered gray values corresponding to each pixel in the normalized image respectively;
[0153] An energy image is generated based on the minimum filtered gray value corresponding to each pixel in the normalized image.
[0154] An orientation image is generated based on the maximum and target filtered gray values corresponding to each pixel in the normalized image, wherein the target filtered gray value corresponding to the pixel is the minimum or second largest filtered gray value corresponding to the pixel.
[0155] Furthermore, a directional image is generated based on the maximum filtered gray value and the target filtered gray value corresponding to each pixel in the normalized image, including:
[0156] Based on the first preset formula, the total number of multiple preset directions, the index of the preset direction to which the maximum filtered gray value of each pixel belongs, and the index of the preset direction to which the target filtered gray value of each pixel belongs, the directional gray value corresponding to each pixel is determined.
[0157] Generate an orientation image based on the orientation grayscale value corresponding to each pixel.
[0158] Further, step 203, generating the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image, includes:
[0159] The orientation image is divided into blocks according to multiple preset block division methods to obtain multiple block orientation images corresponding to the orientation image, wherein each block orientation image contains one or more first blocks;
[0160] Generate grayscale histograms for each first block contained in each block-oriented image;
[0161] The gray-level histograms corresponding to each first block contained in each block of the directional image are stitched together to obtain the gray-level histogram corresponding to the directional image.
[0162] The energy image is divided into blocks according to multiple preset block division methods to obtain multiple block energy images corresponding to the energy image, wherein each block energy image contains one or more second blocks;
[0163] Generate the grayscale histogram corresponding to each second block contained in each block energy image;
[0164] The gray-level histograms corresponding to each second block contained in each energy block are stitched together to obtain the gray-level histogram corresponding to the energy image.
[0165] Further, step 204 involves concatenating the gray-level histograms corresponding to the orientation image and the energy image to obtain the total gray-level histogram corresponding to the image to be verified, including:
[0166] According to the second preset formula, the gray-level histograms corresponding to the orientation image and the energy image are normalized respectively to obtain the normalized gray-level histograms corresponding to the orientation image and the energy image.
[0167] The normalized gray-level histograms corresponding to the orientation image and the energy image are concatenated to obtain the total gray-level histogram corresponding to the image to be verified.
[0168] Furthermore, the method also includes:
[0169] Obtain the total grayscale histogram corresponding to each template image;
[0170] The similarity value between the total gray-level histogram of the image to be verified and the total gray-level histogram of each template image is calculated based on the preset algorithm.
[0171] Determine whether the maximum similarity value among multiple similarity values is greater than a preset similarity threshold;
[0172] If so, the identity verification result is determined to be successful, and the identity information associated with the template image corresponding to the maximum similarity value is determined as the identity information corresponding to the image to be verified;
[0173] If not, the authentication result is determined to be authentication failure.
[0174] This application provides a biometric extraction device and method. The biometric extraction device includes a first acquisition unit, a first generation unit, a second generation unit, and a stitching unit. After a target terminal device acquires a verification image containing the biometric features of the user to be verified through a preset sensor, firstly, the first acquisition unit acquires the verification image; secondly, the first generation unit generates a direction image and an energy image corresponding to the verification image based on a preset filter; thirdly, the second generation unit generates a grayscale histogram corresponding to the direction image and a grayscale histogram corresponding to the energy image; finally, the stitching unit stitches the grayscale histograms corresponding to the direction image and the energy image to obtain a total grayscale histogram corresponding to the verification image. In this application embodiment, the total grayscale histogram corresponding to the verification image extracted by the biometric extraction device includes the grayscale histograms corresponding to the direction image and the energy image, meaning that the biometric extraction device can effectively extract more useful feature information from the verification image.
[0175] This application provides a storage medium that includes a stored program, wherein the program controls the device where the storage medium is located to execute the biometric extraction method described above when it is running.
[0176] Storage media may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0177] This application also provides a biometric extraction device, the device including a storage medium and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; the program instructions, when executed, perform the biometric extraction method described above.
[0178] This application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps:
[0179] Obtain the image to be verified;
[0180] Generate the orientation image and energy image corresponding to the image to be verified based on the preset filter;
[0181] Generate a grayscale histogram corresponding to the orientation image and a grayscale histogram corresponding to the energy image;
[0182] The grayscale histograms corresponding to the orientation image and the energy image are concatenated to obtain the total grayscale histogram corresponding to the image to be verified.
[0183] Furthermore, the step of generating the orientation image and energy image corresponding to the image to be verified based on the preset filter includes:
[0184] The image to be verified is normalized to obtain the normalized image corresponding to the image to be verified.
[0185] Obtain multiple preset directions corresponding to the preset filter;
[0186] The energy image and the direction image are generated based on the normalized grayscale value corresponding to each pixel in the normalized image, the preset filter, and the multiple preset directions.
[0187] Furthermore, the normalization process performed on the image to be verified to obtain a normalized image corresponding to the image to be verified includes:
[0188] Based on the grayscale value corresponding to each pixel in the image to be verified, calculate the average grayscale value corresponding to multiple pixels.
[0189] Based on the gray value corresponding to each pixel in the image to be verified and the average gray value corresponding to multiple pixels, calculate the normalized gray value corresponding to each pixel;
[0190] The normalized image is generated based on the normalized grayscale value corresponding to each pixel in the image to be verified.
[0191] Furthermore, generating the energy image and the direction image based on the normalized grayscale value corresponding to each pixel in the normalized image, the preset filter, and the multiple preset directions includes:
[0192] Based on the normalized gray value corresponding to each pixel in the normalized image, the preset filter, and the multiple preset directions, multiple filtered gray values corresponding to each pixel are determined.
[0193] The multiple filtered grayscale values corresponding to each pixel in the normalized image are sorted respectively.
[0194] The energy image is generated based on the minimum filtered gray value corresponding to each pixel in the normalized image.
[0195] The orientation image is generated based on the maximum filtered gray value and the target filtered gray value corresponding to each pixel in the normalized image, wherein the target filtered gray value corresponding to the pixel is the minimum filtered gray value or the second largest filtered gray value corresponding to the pixel.
[0196] Further, generating the directional image based on the maximum filtered gray value and the target filtered gray value corresponding to each pixel in the normalized image includes:
[0197] Based on the first preset formula, the total number of multiple preset directions, the index of the preset direction to which the maximum filtered gray value of each pixel belongs, and the index of the preset direction to which the target filtered gray value of each pixel belongs, the directional gray value corresponding to each pixel is determined.
[0198] The directional image is generated based on the directional grayscale value corresponding to each pixel.
[0199] Furthermore, generating the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image includes:
[0200] The directional image is divided into blocks according to multiple preset block division methods to obtain multiple block directional images corresponding to the directional image, wherein each block directional image contains one or more first blocks;
[0201] Generate a grayscale histogram corresponding to each first block contained in each of the block-oriented images;
[0202] The grayscale histograms corresponding to each first block contained in each of the segmented directional images are stitched together to obtain the grayscale histogram corresponding to the directional image.
[0203] The energy image is divided into blocks according to multiple preset block division methods to obtain multiple block energy images corresponding to the energy image, wherein each block energy image contains one or more second blocks;
[0204] Generate a grayscale histogram corresponding to each second block contained in each of the said block energy images;
[0205] The grayscale histograms corresponding to each second block contained in each of the energy blocks are stitched together to obtain the grayscale histogram corresponding to the energy image.
[0206] Further, the step of concatenating the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image to obtain the total grayscale histogram corresponding to the image to be verified includes:
[0207] According to the second preset formula, the gray-level histograms corresponding to the orientation image and the energy image are normalized respectively to obtain the normalized gray-level histograms corresponding to the orientation image and the energy image.
[0208] The normalized grayscale histogram corresponding to the orientation image and the normalized grayscale histogram corresponding to the energy image are concatenated to obtain the total grayscale histogram corresponding to the image to be verified.
[0209] Furthermore, the method also includes:
[0210] Obtain the total grayscale histogram corresponding to each template image;
[0211] The similarity value between the total gray-level histogram of the image to be verified and the total gray-level histogram of each template image is calculated according to the preset algorithm.
[0212] Determine whether the maximum similarity value among the multiple similarity values is greater than a preset similarity threshold;
[0213] If so, the identity verification result is determined to be successful, and the identity information associated with the template image corresponding to the maximum similarity value is determined as the identity information corresponding to the image to be verified.
[0214] If not, the authentication result is determined to be authentication failure.
[0215] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing program code that initializes the following method steps: acquiring an image to be verified; generating a direction image and an energy image corresponding to the image to be verified based on a preset filter; generating a grayscale histogram corresponding to the direction image and a grayscale histogram corresponding to the energy image; and performing a stitching process on the grayscale histogram corresponding to the direction image and the grayscale histogram corresponding to the energy image to obtain a total grayscale histogram corresponding to the image to be verified.
[0216] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0217] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0218] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0219] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0220] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0221] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0222] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0223] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0224] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0225] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A biometric feature extraction apparatus, characterized by, The device includes: The first acquisition unit is used to acquire the image to be verified; The first generation unit is used to generate a direction image and an energy image corresponding to the image to be verified based on a preset filter; The second generation unit is used to generate the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image; The stitching unit is used to stitch together the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image to obtain the total grayscale histogram corresponding to the image to be verified. The first generation unit includes: The first processing module is used to normalize the image to be verified in order to obtain the normalized image corresponding to the image to be verified. The acquisition module is used to acquire multiple preset directions corresponding to the preset filter; The first generation module is used to generate the energy image and the direction image based on the normalized gray value corresponding to each pixel in the normalized image, the preset filter, and multiple preset directions; The first generation module includes: The determination submodule is used to determine multiple filtered gray values corresponding to each pixel based on the normalized gray value corresponding to each pixel in the normalized image, the preset filter, and multiple preset directions; The sorting submodule is used to sort the multiple filtered gray values corresponding to each pixel in the normalized image. The second generation submodule is used to generate the energy image based on the minimum filtered gray value corresponding to each pixel in the normalized image. The third generation submodule is used to generate the orientation image based on the maximum filtered gray value and the target filtered gray value corresponding to each pixel in the normalized image, wherein the target filtered gray value corresponding to the pixel is the minimum filtered gray value or the second largest filtered gray value corresponding to the pixel.
2. The apparatus of claim 1, wherein, The first processing module includes: The first calculation submodule is used to calculate the average gray value corresponding to multiple pixels based on the gray value corresponding to each pixel in the image to be verified. The second calculation submodule is used to calculate the normalized gray value corresponding to each pixel based on the gray value corresponding to each pixel in the image to be verified and the average gray value corresponding to multiple pixels. The first generation submodule is used to generate the normalized image based on the normalized grayscale value corresponding to each pixel in the image to be verified.
3. The apparatus according to claim 1, characterized in that, The third generation submodule is specifically used for: Based on the first preset formula, the total number of multiple preset directions, the index of the preset direction to which the maximum filtered gray value of each pixel belongs, and the index of the preset direction to which the target filtered gray value of each pixel belongs, the directional gray value corresponding to each pixel is determined. The directional image is generated based on the directional grayscale value corresponding to each pixel.
4. The apparatus of claim 1, wherein, The second generation unit includes: The first segmentation module is used to segment the directional image according to multiple preset segmentation methods to obtain multiple segmented directional images corresponding to the directional image, wherein each segmented directional image contains one or more first segments; The second generation module is used to generate grayscale histograms corresponding to each first block contained in each of the block-oriented images; The first stitching module is used to stitch together the grayscale histograms corresponding to each first block contained in each of the segmented directional images to obtain the grayscale histograms corresponding to the directional images. The second segmentation module is used to segment the energy image according to multiple preset segmentation methods to obtain multiple segmented energy images corresponding to the energy image, wherein each segmented energy image contains one or more second segments; The third generation module is used to generate grayscale histograms corresponding to each second block contained in each of the block energy images; The second stitching module is used to stitch together the grayscale histograms corresponding to each second block contained in each of the energy blocks to obtain the grayscale histograms corresponding to the energy images.
5. The apparatus of claim 1, wherein, The splicing unit includes: The second processing module is used to normalize the grayscale histogram corresponding to the orientation image and the grayscale histogram corresponding to the energy image according to the second preset formula, so as to obtain the normalized grayscale histogram corresponding to the orientation image and the normalized grayscale histogram corresponding to the energy image. The third stitching module is used to stitch the normalized grayscale histogram corresponding to the orientation image and the normalized grayscale histogram corresponding to the energy image to obtain the total grayscale histogram corresponding to the image to be verified.
6. A method of biometric feature extraction, characterized by, The method includes: Obtain the image to be verified; Generate the orientation image and energy image corresponding to the image to be verified based on the preset filter; Generate a grayscale histogram corresponding to the orientation image and a grayscale histogram corresponding to the energy image; The grayscale histograms corresponding to the orientation image and the energy image are concatenated to obtain the total grayscale histogram corresponding to the image to be verified. The process of generating the orientation image and energy image corresponding to the image to be verified based on the preset filter includes: The image to be verified is normalized to obtain the normalized image corresponding to the image to be verified. Obtain multiple preset directions corresponding to the preset filter; The energy image and the direction image are generated based on the normalized gray value corresponding to each pixel in the normalized image, the preset filter, and the multiple preset directions; The step of generating the energy image and the direction image based on the normalized grayscale value corresponding to each pixel in the normalized image, the preset filter, and multiple preset directions includes: Based on the normalized gray value corresponding to each pixel in the normalized image, the preset filter, and the multiple preset directions, multiple filtered gray values corresponding to each pixel are determined. The multiple filtered grayscale values corresponding to each pixel in the normalized image are sorted respectively. The energy image is generated based on the minimum filtered gray value corresponding to each pixel in the normalized image. The orientation image is generated based on the maximum filtered gray value and the target filtered gray value corresponding to each pixel in the normalized image, wherein the target filtered gray value corresponding to the pixel is the minimum filtered gray value or the second largest filtered gray value corresponding to the pixel.
7. A storage medium, characterized in that, The storage medium includes a stored program, wherein the program, when running, controls the device containing the storage medium to execute the biometric extraction method of claim 6.
8. A biometric extraction device, characterized in that, The device includes a storage medium; and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; the program instructions, when executed, perform the biometric extraction method of claim 6.