Fingerprint anti-counterfeiting processing method and device, electronic equipment and storage medium
By using a black flat test head in the fingerprint recognition device to obtain the anti-counterfeiting feature area and extract the feature point values, and combining the pre-trained model to determine the authenticity of the fingerprint, the cost problem in the existing technology is solved, and low-cost and efficient fingerprint recognition is achieved.
Patent Information
- Application Number
- CN202510454653.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-25
AI Technical Summary
In existing fingerprint recognition devices, the cost of falsification detection by adding color filters to the optical fingerprint sensor is higher.
The black flat test head test is used to obtain the anti-counterfeiting feature area, extract the feature point values on the fingerprint image, and use the pre-trained anti-counterfeiting model to determine whether the fingerprint to be identified is a true fingerprint, avoiding the use of color filters.
It realizes low-cost fingerprint verification and verification detection, improves the security and detection efficiency of the identification equipment, simplifies the calculation process, and reduces the calculation needs.
Smart Images

Figure CN120375429A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of fingerprint recognition technology, and in particular, to a fingerprint anti-counterfeiting processing method, apparatus, electronic device, and storage medium. Background Art
[0002] With the development of under-screen optical fingerprint recognition technology, it is widely used in terminal devices such as smart phones. In the prior art, fingerprint anti-counterfeiting detection is performed by adding a color filter above the optical fingerprint sensor to calibrate and analyze the color of the fingerprint image of the sensor to determine whether the pressed object is a finger. This solution requires adding a color filter, so the cost is high. Summary of the Invention
[0003] This application provides a fingerprint anti-counterfeiting processing method, apparatus, electronic device, and storage medium to solve the problem of high cost of anti-counterfeiting verification in current fingerprint recognition devices.
[0004] In a first aspect, this application provides a fingerprint anti-counterfeiting processing method, and the method includes:
[0005] Obtain a fingerprint image of a fingerprint to be recognized collected by an optical fingerprint recognition device;
[0006] Extract the feature point values in the anti-counterfeiting feature area on the fingerprint image;
[0007] Determine whether the fingerprint to be recognized is a real fingerprint based on the feature point values in the anti-counterfeiting feature area on the fingerprint image;
[0008] Among them, the anti-counterfeiting feature area is obtained through a black plane test head.
[0009] In an implementation manner, after the anti-counterfeiting feature area is obtained through the black plane test head, the anti-counterfeiting feature area is stored; the anti-counterfeiting feature area includes a first area and a second area. The first area is the imaging area of the optical lens center of the optical fingerprint recognition module in the first background image, and the second area is the imaging area of the light source in the first background image. The light source is used to illuminate the optical fingerprint recognition module. The anti-counterfeiting feature area is obtained through the black plane test head, including:
[0010] Press the black plane test head above the optical fingerprint recognition device to test and obtain a first background image;
[0011] Extract the first area and the second area on the first background image.
[0012] In an implementation manner, the pressing the black plane test head above the optical fingerprint recognition device to test and obtain a first background image includes:
[0013] Generate infrared light using the light source to reach the black planar test head in the fingerprint acquisition area attached to the cover plate through the cover plate, converge the reflected light transmitted through the fingerprint acquisition area of the cover plate to the optical lens using the optical lens, and generate a first detection signal based on the reflected light by the optical sensor.
[0014] Generate a first background image based on the first detection signal.
[0015] In one embodiment, extracting a first region on the first background image includes:
[0016] Obtain the center of the black ring based on the edge of the black ring in the first background image. The first region is a window with a size of N centered on the center, where N is not less than the width of one valley-ridge line.
[0017] The edge of the black ring is obtained by obtaining the edge information in the image by taking the gradient of the first background image; and performing binarization on the edge information.
[0018] In one embodiment, extracting a second region on the first background image includes:
[0019] Based on the arrangement orientation of the center and the light source, determine the path from the center to the direction where the light source is located on the first background image.
[0020] Determine the maximum value point in the path, and the brightness of the maximum value point is the largest in the path.
[0021] The second region is a window with a size of M centered on the maximum value point, where M is not less than the width of one valley-ridge line and M is equal to N.
[0022] In one embodiment, extracting a second region on the first background image includes:
[0023] Select a near-light source point at a preset distance and a preset orientation relative to the center on the first background image. The preset distance includes a first preset distance and a second preset distance, and the first preset distance is not equal to the second preset distance.
[0024] The second region is a window with a size of M centered on the near-light source point, where M is not less than the width of one valley-ridge line and M is equal to N.
[0025] Wherein, the near-light source points are symmetrically distributed around the center; the near-light source points are axisymmetric about any straight line passing through the center; the near-light source points are arranged in a circular ring around the center.
[0026] In one embodiment, determining whether the fingerprint to be recognized is a genuine fingerprint based on the feature point values within the anti-counterfeiting feature region on the fingerprint image includes:
[0027] Generating a first feature value based on the feature point values, where the first feature value is obtained by calculating at least one of the average value, median value, variance value, standard deviation value, or valley-ridge signal difference of the feature point values within the anti-counterfeiting feature region on the fingerprint image;
[0028] Determining whether the fingerprint to be recognized is a genuine fingerprint based on the first feature value.
[0029] In one embodiment, determining whether the fingerprint to be recognized is a genuine fingerprint based on the first feature value includes:
[0030] Processing the first feature value using a pre-trained anti-counterfeiting model to identify whether the fingerprint to be recognized is a genuine fingerprint.
[0031] In one embodiment, it further includes:
[0032] Obtaining a genuine fingerprint test image of a real finger collected by an optical fingerprint recognition device;
[0033] Extracting the feature point values within the anti-counterfeiting feature region on the genuine fingerprint test image, and generating a second feature value based on the feature point values, where the second feature value is obtained by calculating at least one of the average value, median value, variance value, standard deviation value, or valley-ridge signal difference of the feature point values within the anti-counterfeiting feature region on the genuine fingerprint test image;
[0034] Training a preset model based on the second feature value to obtain the anti-counterfeiting model.
[0035] In one embodiment, it further includes:
[0036] Performing normalization processing on the first feature value based on a third feature value to obtain a normalized first feature value, where the third feature value is generated and stored based on the feature point values within the anti-counterfeiting feature region on a second background image, and the second background image is obtained by pressing a flesh-colored flat test head above the optical fingerprint recognition device for testing;
[0037] Determining whether the fingerprint to be recognized is a genuine fingerprint based on the first feature value includes:
[0038] Determining whether the fingerprint to be recognized is a genuine fingerprint based on the normalized first feature value.
[0039] In one embodiment, obtaining a second background image by pressing a flesh-colored flat test head above the optical fingerprint recognition device for testing includes:
[0040] Generate infrared light using a light source to pass through a cover plate and reach a flesh-colored planar test head in a fingerprint acquisition area attached to the cover plate, converge reflected light passing through the fingerprint acquisition area of the cover plate using an optical lens, and generate a second detection signal using an optical sensor based on the reflected light.
[0041] Generate the second background image based on the second detection signal.
[0042] In one implementation, the normalizing the first eigenvalue based on the third eigenvalue to obtain a normalized first eigenvalue includes:
[0043] Calculate the ratio of the first eigenvalue to the third eigenvalue to obtain the normalized first eigenvalue.
[0044] In a second aspect, the present application provides a fingerprint anti-counterfeiting processing device, including:
[0045] An image acquisition module, configured to acquire a fingerprint image of a fingerprint to be recognized collected by an optical fingerprint recognition device;
[0046] A feature point value extraction module, configured to extract feature point values within an anti-counterfeiting feature area on the fingerprint image;
[0047] A determination module, configured to determine whether the fingerprint to be recognized is a genuine fingerprint based on the feature point values within the anti-counterfeiting feature area on the fingerprint image;
[0048] Wherein, the anti-counterfeiting feature area is obtained by testing with a black planar test head.
[0049] In a third aspect, the present application provides an electronic device, the electronic device includes an optical fingerprint recognition device and a cover plate, the optical fingerprint recognition device is disposed below the cover plate, the upper surface of the cover plate has a fingerprint acquisition area, the optical fingerprint recognition device includes an optical fingerprint recognition module and a light source, the light source is configured to generate infrared light passing through the fingerprint acquisition area of the cover plate, the optical fingerprint recognition module includes an optical lens and an optical sensor, the optical lens corresponds to the fingerprint acquisition area, the optical sensor is located below the optical lens, the light source is disposed around the optical fingerprint recognition module, and further includes a fingerprint anti-counterfeiting processing device, the optical fingerprint recognition device is electrically connected to the fingerprint anti-counterfeiting processing device, and the fingerprint anti-counterfeiting processing device is configured to execute the fingerprint anti-counterfeiting processing method described in the first aspect of the present application.
[0050] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the fingerprint anti-counterfeiting processing method described in the first aspect of the present application.
[0051] The fingerprint anti-counterfeiting processing method, device, electronic device and storage medium provided by this application avoid adding color filters, can verify authenticity at low cost, and ensure the security of fingerprint recognition devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0053] Figure 1 System block diagram of a possible application scenario provided for the embodiments of the present application;
[0054] Figure 2 Flow chart of a fingerprint anti-counterfeiting processing method provided for the embodiments of the present application;
[0055] Figure 3 Flow chart for obtaining the anti-counterfeiting feature area;
[0056] Figure 4 Schematic diagram of the center point and maximum value points extracted from a first background image;
[0057] Figure 5 Schematic diagram of the center point and maximum value points extracted from another first background image;
[0058] Figure 6 Schematic diagram of the anti-counterfeiting feature area on the fingerprint image;
[0059] Figure 7 Schematic diagram of the center point and near light source points extracted from yet another first background image;
[0060] Figure 8 Schematic diagram of the center point and near light source points extracted from another first background image;
[0061] Figure 9 Flow chart of another fingerprint anti-counterfeiting processing method provided for the embodiments of the present application;
[0062] Figure 10 Schematic diagram of the anti-counterfeiting feature area on the second background image;
[0063] Figure 11 Spatial distribution diagram of the first eigenvalues of real and fake fingers;
[0064] Figure 12 Schematic diagram of the structure of a fingerprint anti-counterfeiting processing device provided for the embodiments of the present application;
[0065] Figure 13 This is an electrical connection block diagram inside an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0066] The following details the implementation manners of the present application. Examples of the implementation manners are shown in the accompanying drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The implementation manners described below with reference to the accompanying drawings are exemplary only for explaining the present application and should not be construed as a limitation to the present application.
[0067] To enable those skilled in the art of the present technology to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts fall within the scope of protection of the present application.
[0068] In the embodiments of the present application, it should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0069] Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0070] In the description of the embodiments of the present application, words such as "example" or "for example" are used to represent examples, explanations or descriptions. Any embodiment or design solution described as "for example" or "example" in the embodiments of the present application is not construed as being more preferred or having more advantages than another embodiment or design solution. The use of words such as "example" or "for example" is intended to present relative concepts in a clear manner.
[0071] In addition, "a plurality of" in the embodiments of the present application means two or more. In view of this, "a plurality of" in the embodiments of the present application can also be understood as "at least two". "At least one" can be understood as one or more, for example, understood as one, two or more. For example, including at least one means including one, two or more, and it does not limit which ones are included. For example, including at least one of A, B, and C, then what can be included are A, B, C, A and B, A and C, B and C, or A, B, and C.
[0072] It should be noted that in the embodiments of the present application, "and / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / ", unless otherwise specified, generally represents an "or" relationship between the front and rear associated objects.
[0073] It should be pointed out that "connection" in the embodiments of the present application can be understood as electrical connection. The connection of two electrical components can be a direct or indirect connection between the two electrical components. For example, when A is connected to B, it can be either a direct connection between A and B or an indirect connection between A and B through one or more other electrical components.
[0074] Before describing the embodiments of the present application, the following terms are first explained: ridge and valley: Both ridges and valleys belong to fingerprint patterns, representing protruding or sunken patterns respectively, and are represented as parts with relatively large and small signal intensities in fingerprint data. A fingerprint cycle includes a ridge pattern and a valley pattern. The width of an adult's ridge pattern ranges from 0.1 to 0.3 millimeters. A fingerprint cycle can be understood as the width of a valley-ridge line, generally 0.5 millimeters.
[0075] The embodiments of the present application will be described below in combination with application scenarios. The fingerprint anti-counterfeiting processing method provided by the embodiments of the present application can be applied to optical fingerprint unlocking application scenarios, such as fingerprint recognition electronic devices such as door locks and car locks, and can also be applied to other electronic device fields such as financial payment, access control systems, and identity verification.
[0076] Figure 1 It is a system block diagram of a typical optical fingerprint recognition application scenario provided by the present application, as Figure 1As shown in the figure, the electronic device 100 includes an optical fingerprint recognition device 10, a processor 20 electrically connected to the optical fingerprint recognition device 10, and a cover plate 30. The optical fingerprint recognition device 10 is disposed under the cover plate 30 of the electronic device 100. The upper surface of the cover plate 30 has a fingerprint acquisition area 301. The optical fingerprint recognition device 10 includes an optical fingerprint recognition module 11, a light guide member 12, and a light source 13. The light source 13 is symmetrically disposed around the optical fingerprint recognition module 11. The light source 13 uses an infrared light source. The optical fingerprint recognition module 11 includes an optical lens 111 and an optical sensor 112. The optical lens 111 is disposed under the cover plate 30 and corresponds to the fingerprint acquisition area 301. The light guide element 12 is configured to make the light emitted by the light source 13 be uniformly irradiated onto a human finger after being scattered, and form reflected light after being reflected by the human finger. The reflected light passes through the cover plate of the fingerprint acquisition area 301 and passes through the through hole 121 of the light guide element 12. The optical lens 111 is configured to converge the reflected light passing through the through hole 121 of the light guide element 12. The optical sensor 112 is disposed on a first printed circuit board and is located under the optical lens 111. The optical sensor 112 is configured to generate a fingerprint detection signal based on the reflected light. The fingerprint detection signal is used to detect the fingerprint information of a human finger. The optical sensor 112 transmits the fingerprint detection signal to the processor 20. The processor 20 may specifically be a processing unit or a control unit with a processing function inside the electronic device 100, such as a microcontroller (MCU). It is connected to the optical sensor 112 and includes a fingerprint processing unit, which is mainly used to control the working state of the optical fingerprint recognition device 10, and process the fingerprint detection signal output by the optical fingerprint recognition device 10 using a fingerprint algorithm and perform fingerprint template registration and fingerprint matching verification, so as to determine whether the currently acquired fingerprint image belongs to a legal fingerprint, and unlock the electronic device 100 or perform other fingerprint recognition-related functions according to the judgment result.
[0077] The electronic device 100 may be a door lock, a vehicle lock, etc., or may also be other electronic devices applied to financial payment, access control systems, identity authentication, etc. The electronic device may also be a fingerprint recognition electronic device without an OLED and a backlight. The embodiments of the present application do not limit the type of the electronic device 100.
[0078] In the embodiments of the present application, it is considered that in practical applications, the fingerprint information carried by the reflected light forms a grayscale image, which can only reflect planar contrast. Therefore, it is very easy to be cracked by 2D or 3D fake fingerprints, greatly reducing the security of the electronic device 100.
[0079] In view of this, the embodiments of the present application provide a fingerprint anti-counterfeiting processing method, device, electronic device, and storage medium to achieve anti-counterfeiting detection.
[0080] Taking the above application scenario as an example, the technical solution of the present application will be described in detail in combination with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0081] Figure 2 It is a flowchart of a fingerprint anti-counterfeiting processing method provided by an embodiment of the present application, including steps S601 - S603.
[0082] Step S601: Obtain the fingerprint image of the fingerprint to be recognized collected by the optical fingerprint recognition device.
[0083] Taking the door lock unlocking as an example, when the user presses a finger on the fingerprint collection area 301 on the cover plate 30 of the door lock, the light emitted by the light source 13 is scattered by the light guide element 12 and evenly irradiates the human finger, and the reflected light is formed after being reflected by the human finger. The reflected light passes through the cover plate 30 of the fingerprint collection area 301 and is converged by the optical lens 111 through the through hole 121. The optical sensor 112 generates a fingerprint detection signal based on the reflected light, detects the fingerprint information of the human finger, and realizes fingerprint image collection and fingerprint recognition. The processor 20 receives the fingerprint information of the fingerprint to be recognized and performs subsequent fingerprint anti-counterfeiting detection.
[0084] Step S602: Extract the feature point values in the anti-counterfeiting feature area on the fingerprint image.
[0085] Step S603: Determine whether the fingerprint to be recognized is a genuine fingerprint based on the feature point values in the anti-counterfeiting feature area on the fingerprint image;
[0086] Among them, the anti-counterfeiting feature area is obtained by testing with a black plane test head.
[0087] Based on the feature point values in the anti-counterfeiting feature area extracted from the fingerprint image, it can be directly determined whether the fingerprint to be recognized is a genuine fingerprint or a fake fingerprint, which optimizes the anti-counterfeiting detection calculation process, reduces the calculation requirements, improves the efficiency of anti-counterfeiting detection, and realizes efficient anti-counterfeiting verification. Moreover, it avoids adding a color filter, can perform anti-counterfeiting verification at low cost, and ensures the security of the fingerprint recognition device.
[0088] This embodiment can realize fingerprint recognition and anti-counterfeiting detection for optical fingerprint recognition devices without OLED and backlight, improving the security of the fingerprint recognition device.
[0089] The black plane test head is a benchmark calibration tool used in the field of optical detection. The anti-counterfeiting feature area is obtained by testing with the black plane test head, which will not be affected by the differences of the test tools, can realize the standardization of the anti-counterfeiting feature area, and thus improve the accuracy of the anti-counterfeiting detection result.
[0090] In one embodiment, the anti-counterfeiting feature area includes a first area and a second area. The first area is the imaging area of the center of the optical lens of the optical fingerprint recognition module on the first background image, and the second area is the imaging area of the light source on the first background image. The light source is used to illuminate the optical fingerprint recognition module. The anti-counterfeiting feature area is obtained by testing with a black flat test head. As Figure 3 shown, the following steps may be included:
[0091] S401. Press the black flat test head above the optical fingerprint recognition device to test and obtain the first background image;
[0092] The processing of the above step S401 may be specifically as follows:
[0093] S4011. Use the light source to generate infrared light that passes through the cover plate and reaches the black flat test head in the fingerprint collection area attached to the cover plate. Use the optical lens to converge the reflected light that passes through the fingerprint collection area of the cover plate and is transmitted to the optical lens. Use the optical sensor to generate a first detection signal based on the reflected light. Optionally, the light emitted by the infrared light source is high-brightness light.
[0094] S4012. Generate the first background image based on the first detection signal.
[0095] S402. Extract the first area and the second area on the first background image.
[0096] When the black flat test head is testing, the black flat test head presses on the fingerprint collection area 301 on the cover plate 30, and the optical fingerprint recognition device 10 collects the image of the black flat test head as the first background image. Figure 4 and Figure 5 shown is the first background image.
[0097] As Figure 4 and Figure 5 shown, the imaging of the optical lens 111 on the first background image is a black ring, which is clearly demarcated from other parts on the first background image. Therefore, the center of the optical lens can be clearly and accurately determined, and then the first area can be determined.
[0098] The intensity of the infrared light weakens as the distance from the light source increases, following the inverse square law. The greater the distance from the light source, the weaker the light intensity received by the black flat test head. Since the infrared light has a low reflection characteristic for black materials, the signal is further attenuated after being reflected by the black flat test head. As Figure 4 and Figure 5 shown, bright spots surrounding the light source appear on the first background image, and the positions of the bright spots are easy to confirm, which is convenient for accurately determining the second area.
[0099] The positions of the optical lens 111 and the light source 13 are fixed and known. Therefore, the first region and the second region can be determined respectively with the center of the optical lens and the light source as the benchmarks to extract feature points.
[0100] In the embodiment of the present application, it is considered that if only one point is used as the benchmark to extract feature points, only one feature point can be obtained, and the data of this feature point is not representative. Therefore, in this embodiment, the imaging region of the center of the optical lens of the optical fingerprint recognition module in the first background image is used as the first region, and the imaging region of the light source in the first background image is used as the second region to extract multiple feature point values in each region, thereby making the anti-counterfeiting detection result more accurate.
[0101] In one implementation manner, extracting the first region on the first background image may include the following steps:
[0102] Based on the edge of the black ring in the first background image, the center of the black ring is obtained. The first region is a window with a size of N centered on the center, where N is not less than the width of a valley-ridge line.
[0103] The edge of the black ring is obtained by obtaining the edge information in the image by taking the gradient of the first background image; and the edge information is binarized.
[0104] The imaging of the optical lens 111 on the first background image is a black ring with clear edge boundaries. Therefore, the above steps can accurately determine the center of the black ring.
[0105] Optionally, the window is a rectangular window, and the rectangular shape is easier to select. Each pixel point in the window is used as a feature point. When extracting feature points on the fingerprint image, the first region on the fingerprint image is Figure 6 the rectangular window shown in the center as shown. Multiple feature points can be extracted within this first region. The first region includes at least one valley line and one ridge line. The extracted feature points include points with relatively large signal intensity, points with relatively small signal intensity, and the middle part between the two, which are comprehensive and representative, thereby improving the accuracy of the anti-counterfeiting detection result.
[0106] In one implementation manner, extracting the second region on the first background image may include the following steps:
[0107] Based on the arrangement orientation of the center and the light source, on the first background image, a path from the center to the direction where the light source is located is determined; the arrangement orientation of the light source is fixed and known, and a bright spot surrounding the light source will appear on the first background image, as Figure 4 and Figure 5 shown. Drawing a line from the center of the optical lens to the bright spot can determine a clear path. Preferably, the edge of the first background image is the end point of this line.
[0108] Determine the maximum value points in the path. The brightness of the maximum value points is the largest in the path, and the maximum value points are the points with the largest brightness in the bright spots, obtaining Figure 4 and Figure 5 the maximum value points shown. By comparing Figure 4 and Figure 5 it can be seen that in this embodiment, the number of maximum value points is the same as the number of light sources.
[0109] The second region is a window with a size of M centered on the maximum value point, where M is not less than the width of a valley-ridge line and M is equal to N. Optionally, the window is a rectangular window, and the rectangular shape is simpler to select. Each pixel point in the window is used as a feature point. When extracting feature points on the fingerprint image, the second region on the fingerprint image is like Figure 6 the rectangular window shown. The second region surrounds the first region, and the number of second regions is the same as the number of light sources. Multiple feature points can be extracted in each second region. Each second region includes at least one valley pattern and one ridge pattern. The extracted feature points include points with relatively large signal strength, points with relatively small signal strength, and the middle part between the two, which is comprehensive and representative, thereby improving the accuracy of the anti-counterfeiting detection result.
[0110] As Figure 6 the anti-counterfeiting feature region distribution map shown, the feature points in the center and the periphery of the fingerprint image are collected. The number of collected feature points is large and representative, thereby improving the accuracy of the anti-counterfeiting detection result.
[0111] To ensure the fingerprint recognition effect, the light source is usually arranged below the fingerprint collection area of the cover plate and relatively close to the optical lens. The maximum value points represent the positions of the light sources. When the user's finger presses on the fingerprint collection area, even if the center of the finger is slightly offset from the center of the fingerprint collection area or the finger partially presses on the fingerprint collection area (at this time, the contact area between the finger and the fingerprint collection area is small), the second region can still collect fingerprint information and ensure the accuracy of the anti-counterfeiting detection result.
[0112] Considering that in actual applications, there is a situation where the light source is assembled too close to the edge of the fingerprint collection area. The maximum value points determined by the above embodiment are too close to the edge of the fingerprint collection area. However, when the user performs fingerprint recognition, the finger may not necessarily touch the edge of the fingerprint collection area. At this time, all or part of the fingerprint information may not be collected in the second region determined by the above embodiment, resulting in the inability to perform anti-counterfeiting detection or inaccurate anti-counterfeiting detection results. In another case, when the number of infrared light sources is too large, the first background image presents a ring structure with a uniform brightness similar to Figure 7 and Figure 8 shown. It is not certain that the first background image can find Figure 4 and Figure 5In the case of a clear and distinct bright spot shown, when extracting the second region from the first background image, the following steps may be included:
[0113] Select a near light source point at a preset distance and a preset azimuth relative to the center of the circle on the first background image;
[0114] The second region is a window with a size of M centered on the near light source point, where M is not less than the width of a valley ridge line and M is equal to N;
[0115] Among them, the near light source points are symmetrically distributed around the center of the circle; the near light source points are axisymmetric about any straight line passing through the center of the circle; the near light source points are arranged in a circular ring around the center of the circle. This makes the feature points in the second region more representative, thereby improving the accuracy of the anti-counterfeiting detection result.
[0116] The number of near light source points is set according to needs. The more near light source points, the more accurate the anti-counterfeiting detection result. Preferably, the number of near light source points is at least 4. The preset distance includes a first preset distance and a second preset distance. The preset distance can be a single value, that is, the first preset distance and the second preset distance are the same. In this case, the near light source points are points at the same distance relative to the center of the circle (as Figure 7 shown); the preset distance can also be multiple, that is, the first preset distance and the second preset distance are different. In this case, the near light source points are points at two different distances relative to the center of the circle (as Figure 8 shown).
[0117] In this embodiment, the near light source points can be flexibly selected. Multiple points at the same distance but different azimuths relative to the center of the circle can be selected; multiple points at different distances and different azimuths relative to the center of the circle can also be selected. For example, some points are close to the edge of the first background image and some points are close to the center of the circle. It can not only collect the fingerprint information in the center of the fingerprint collection area but also collect the fingerprint information at the edge of the fingerprint collection area. Whether the user's finger presses the entire fingerprint collection area or only part of it, feature points can be extracted.
[0118] In practical applications, since the internal components of the optical fingerprint recognition device 10 may not be precisely installed at the designated positions during assembly, there may be deviations in the assembly positions, resulting in differences in the performance of the optical fingerprint recognition device 10 and potentially producing products that do not meet the performance indicators. To ensure the application performance of the optical fingerprint recognition device 10, performance testing is usually carried out before the optical fingerprint recognition device 10 is put into use to control the optical fingerprint recognition devices 10 whose performance fails to meet the standards due to unqualified assembly. In the existing performance testing process of the optical fingerprint recognition device 10, usually three test heads, namely a flesh-colored flat test head, a black flat test head, and a 3D test head (3D Rubber), are used for testing. The three test heads sequentially press the fingerprint acquisition area 301, the light source 13 emits high-intensity light, and the optical fingerprint recognition device 10 acquires the test data of the three test heads. Among them, the test data of the flesh-colored flat test head and the black flat test head are used to obtain background data (Base), and the background data can be applied in the fingerprint algorithm during subsequent fingerprint recognition to remove the background data from the fingerprint data of the user fingerprint collected by the subsequent optical fingerprint recognition device 10 to extract useful data related to the fingerprint information; the test data of the 3D test head are used to test whether the performance of the optical fingerprint recognition device 10 meets the standards to test whether the assembly of the internal components of the optical fingerprint recognition device 10 is qualified. When the performance test of the optical fingerprint recognition device 10 is qualified and used for fingerprint recognition, the background data is applied in the fingerprint algorithm to filter out unnecessary background data in the fingerprint data collected by the optical fingerprint recognition device 10, thereby extracting useful data related to the fingerprint information to complete fingerprint recognition.
[0119] After the anti-counterfeiting feature area is obtained through testing with the black flat test head, the anti-counterfeiting feature area is stored for subsequent direct use without repeated acquisition. In one implementation, the first area and the second area are obtained when the optical fingerprint recognition device is tested with the black flat test head. That is, the background data corresponding to the black flat test head obtained during the performance test of the optical fingerprint recognition device 10 can be directly used in this embodiment to extract the first area and the second area, without using the black flat test head again for testing to obtain the background data during anti-counterfeiting detection, and taking the image of the background data as the first background image, which simplifies the data acquisition process. The first background image, the center of the circle, the maximum value point, the first area, and the second area of this embodiment can be pre-stored in the electronic device 100 to avoid the work of extracting the center of the circle, the maximum value point, the first area, and the second area in real time during the user's use process, and shorten the unlocking time.
[0120] In one implementation, in step S603 above, determining whether the fingerprint to be recognized is a genuine fingerprint based on the feature point values within the anti-counterfeiting feature area on the fingerprint image may specifically include the following steps:
[0121] Generate a first eigenvalue based on the feature point values, where the first eigenvalue is obtained by calculating at least one of the average value, median value, variance value, standard deviation value, or valley-ridge signal difference of the feature point values within the anti-counterfeiting feature region on the fingerprint image;
[0122] Determine whether the fingerprint to be identified is a genuine fingerprint based on the first eigenvalue.
[0123] Preferably, the first eigenvalue includes the average value, median value, variance value, standard deviation value, and valley-ridge signal difference of the feature point values within the anti-counterfeiting feature region. The more eigenvalues there are, the higher the accuracy of the anti-counterfeiting detection result.
[0124] The feature point values are calculated to generate the first eigenvalue, reducing the amount of data calculation when determining whether the fingerprint to be identified is a genuine fingerprint and improving the anti-counterfeiting efficiency.
[0125] In one embodiment, the process of determining whether the fingerprint to be identified is a genuine fingerprint based on the first eigenvalue can be as follows:
[0126] Process the first eigenvalue using a pre-trained anti-counterfeiting model to identify whether the fingerprint to be identified is a genuine fingerprint.
[0127] The anti-counterfeiting model is pre-trained. The first eigenvalue is directly input into the anti-counterfeiting model. According to the output result of the anti-counterfeiting model, it can be determined whether the fingerprint to be identified is a genuine fingerprint or a fake fingerprint. The calculation amount is small, the data processing time is short, and thus the unlocking time is shortened.
[0128] In one implementation manner, pre-training the anti-counterfeiting model may include the following steps:
[0129] Obtain the genuine fingerprint test images of real fingers collected by the optical fingerprint recognition device;
[0130] Extract the feature point values within the anti-counterfeiting feature region on the genuine fingerprint test images, and generate a second eigenvalue based on the feature point values. The second eigenvalue is obtained by calculating at least one of the average value, median value, variance value, standard deviation value, or valley-ridge signal difference of the feature point values within the anti-counterfeiting feature region on the genuine fingerprint test images;
[0131] Train a preset model based on the second eigenvalue to obtain the anti-counterfeiting model.
[0132] Preferably, the second eigenvalue includes the average value, median value, variance value, standard deviation value, and valley-ridge signal difference of the feature point values within the anti-counterfeiting feature region on the genuine fingerprint test images.
[0133] In an alternative embodiment, if the anti-counterfeiting model is a binary classification model, then step S603 may include the following steps:
[0134] Analyze and process the first eigenvalue using a pre-trained binary classification model to obtain a binary classification result, and determine whether the fingerprint to be recognized is a genuine fingerprint based on the binary classification result.
[0135] The binary classification model can adopt a linear regression model, a support vector machine model, a neural network model, or a decision tree model.
[0136] The second eigenvalue and the anti-counterfeiting feature area can be used to train a linear regression model, a support vector machine model, a neural network model, or a decision tree model to pre-train the binary classification model. When performing fingerprint recognition, input the first eigenvalue corresponding to the fingerprint to be recognized into the pre-trained binary classification model, and it is possible to quickly determine whether the fingerprint to be recognized is a genuine fingerprint according to the output result of the binary classification model.
[0137] The embodiment of this application provides another fingerprint anti-counterfeiting processing method to further improve the fingerprint anti-counterfeiting detection effect, such as Figure 9 shown. In addition to the above steps S601 - S603, this method further includes step S121.
[0138] Step S121: Perform normalization processing on the first eigenvalue based on the third eigenvalue to obtain the normalized first eigenvalue, where the third eigenvalue is generated and stored based on the feature point values within the anti-counterfeiting feature area (such as Figure 10 the rectangular window area shown) on the second background image, and the second background image is obtained by pressing a flesh-colored plane test head above the optical fingerprint recognition device for testing;
[0139] Then, determining whether the fingerprint to be recognized is a genuine fingerprint based on the first eigenvalue may include the following steps:
[0140] Determine whether the fingerprint to be recognized is a genuine fingerprint based on the normalized first eigenvalue.
[0141] In one implementation, a pre-trained anti-counterfeiting model can be used to process the normalized first eigenvalue, and the anti-counterfeiting model directly outputs the anti-counterfeiting result. The normalization processing of the first eigenvalue can also improve the robustness of the anti-counterfeiting model.
[0142] In one implementation, obtaining the second background image by pressing a flesh-colored plane test head above the optical fingerprint recognition device may include the following steps:
[0143] Use a light source to generate infrared light that passes through the cover plate and reaches the flesh-colored plane test head in the fingerprint collection area attached to the cover plate, use an optical lens to converge the reflected light that passes through the fingerprint collection area of the cover plate and is transmitted to the optical lens, and use an optical sensor to generate a second detection signal based on the reflected light,
[0144] Generate a second background image based on the second detection signal.
[0145] In this embodiment, the second background image (the image of the background data obtained by the infrared test head) can be obtained when the optical fingerprint recognition device 10 is performance-tested using a flesh-colored test head, and can be pre-stored in the electronic device 100.
[0146] In one implementation manner, generating a third eigenvalue based on the feature point values within the anti-counterfeiting feature region on the second background image may include the following steps:
[0147] Calculate at least one of the average value, median value, variance value, standard deviation value, or valley-ridge signal difference of the feature point values within the anti-counterfeiting feature region (such as the rectangular window region shown in Figure 10 the figure) on the second background image to obtain the third eigenvalue. Preferably, the third eigenvalue includes the average value, median value, variance value, standard deviation value, and valley-ridge signal difference of the feature point values within the anti-counterfeiting feature region on the second background image.
[0148] During the actual use of the same optical fingerprint recognition device 10, there may be differences in the brightness of the light source and the performance of the fingerprint recognition module, resulting in fluctuations in the recognized fingerprint data. In this embodiment, the first eigenvalue is normalized based on the third eigenvalue. The third eigenvalue is generated based on the feature point values within the anti-counterfeiting feature region on the second background image, and the second background image is obtained by testing with a flesh-colored flat test head. As shown in Figure 10 the figure, there is no texture as shown in Figure 8 the figure in the second background image, and the color of the flesh-colored flat test head is close to the human skin color. The third eigenvalue, as the standard eigenvalue, can weaken the influence of data fluctuations caused by differences in the brightness of the infrared light source and the performance of the fingerprint recognition module on the anti-counterfeiting feature value, making the anti-counterfeiting detection result more accurate.
[0149] In one implementation manner, step S121 may specifically include the following steps:
[0150] Calculate the ratio of the first eigenvalue to the third eigenvalue. Divide the first eigenvalue by the third eigenvalue to obtain the ratio, and obtain the normalized first eigenvalue;
[0151] Determining whether the fingerprint to be recognized is a genuine fingerprint based on the first eigenvalue may specifically include the following steps:
[0152] Determine whether the fingerprint to be recognized is a genuine fingerprint based on the ratio of the first eigenvalue to the third eigenvalue.
[0153] In this embodiment, the third eigenvalue is used as the standard eigenvalue, and based on the ratio of the first eigenvalue to the third eigenvalue, it is determined whether the fingerprint to be recognized is a genuine fingerprint, improving the accuracy of the anti-counterfeiting detection result. In some embodiments, an anti-counterfeiting model can also be pre-trained based on the ratio of the second eigenvalue to the third eigenvalue. The anti-counterfeiting model processes the ratio of the first eigenvalue to the third eigenvalue and outputs an anti-counterfeiting result. The training method of the anti-counterfeiting model has been described in the above embodiments and will not be elaborated here.
[0154] Since there are obvious differences in the reflection characteristics and transmittance of infrared light waves for different materials such as human skin tissue, paper, and silicone. For Figure 1 In the application scenario shown, since the optical lens 111 is placed at the center of the light guide member 12 and does not emit light, the signal in the central area of the fingerprint acquisition area 301 is mainly a transmitted signal. Since the skin structure of the human body can effectively absorb and scatter infrared light, Figure 1 In the application scenario shown, the anti-counterfeiting eigenvalue of a genuine finger is significantly different from that of a false fingerprint. As Figure 11 shown, the dark circles represent false fingerprints and the light circles represent genuine fingerprints. The false fingerprints and genuine fingerprints can be clearly distinguished by the first eigenvalue. Thus, it can be seen that the setting of the anti-counterfeiting feature area in this application is reasonable and effective, enabling the selected feature point values to effectively distinguish between genuine fingers and false fingers.
[0155] In summary, in this embodiment, the feature point values are extracted in real time when the fingerprint is pressed. Based on the feature point values, it can be determined whether the fingerprint to be recognized is a genuine fingerprint, achieving the purpose of anti-counterfeiting detection. The amount of data calculation is small, improving the anti-counterfeiting detection efficiency. The anti-counterfeiting feature area is obtained through testing with a black plane test head. The first background image obtained by the black plane test head is obtained during the performance test of the optical fingerprint recognition device 10, simplifying the steps of the fingerprint anti-counterfeiting processing method. Since the calculation form of the anti-counterfeiting eigenvalue is fixed, the anti-counterfeiting feature area and the third eigenvalue can be written in advance in the storage unit of the electronic device 100 during the mass production performance test of the optical fingerprint recognition device 10, reducing the repetitive work of calculating the anti-counterfeiting feature area and the third eigenvalue in real time during the use of the optical fingerprint recognition device and shortening the unlocking time.
[0156] The embodiment of the present application further provides a fingerprint anti-counterfeiting processing device accordingly. As Figure 12 shown, the fingerprint anti-counterfeiting processing device 140 includes an image acquisition module 141, a feature point value extraction module 142, and a determination module 143, where
[0157] The image acquisition module 141 is configured to acquire a fingerprint image of the fingerprint to be recognized collected by the optical fingerprint recognition device;
[0158] The feature point value extraction module 142 is configured to extract the feature point values within the anti-counterfeiting feature area on the fingerprint image;
[0159] A determination module 143, configured to determine whether the fingerprint to be recognized is a genuine fingerprint based on the feature point values within the anti-counterfeiting feature area on the fingerprint image;
[0160] Wherein, the anti-counterfeiting feature area is obtained through testing with a black flat test head.
[0161] In one embodiment, the fingerprint anti-counterfeiting processing device 140 further includes an anti-counterfeiting feature area acquisition module, configured to acquire the anti-counterfeiting feature area. Specifically, the anti-counterfeiting feature area acquisition module includes:
[0162] A first background image acquisition unit, configured to press the black flat test head above the optical fingerprint recognition device to test and obtain a first background image;
[0163] An anti-counterfeiting feature area extraction unit, configured to extract a first area and a second area on the first background image.
[0164] In one embodiment, the first background image acquisition unit includes a first detection signal generation sub-unit and a first background image generation sub-unit.
[0165] The first detection signal generation sub-unit is configured to use the light source to generate infrared light that passes through the cover plate and reaches the black flat test head on the fingerprint acquisition area attached to the cover plate, use the optical lens to converge the reflected light that passes through the fingerprint acquisition area of the cover plate and is transmitted to the optical lens, and use the optical sensor to generate a first detection signal based on the reflected light.
[0166] The first background image generation sub-unit is configured to generate a first background image based on the first detection signal.
[0167] In one embodiment, the anti-counterfeiting feature area extraction unit includes a first area extraction unit and a second area extraction unit. The first area extraction unit is configured to extract a first area on the first background image, and the second area extraction unit is configured to extract a second area on the first background image.
[0168] The first area extraction unit is configured to obtain the center of the black ring based on the edge of the black ring in the first background image. The first area is a window with a size of N centered on the center, where N is not less than the width of one valley-ridge line.
[0169] Wherein, the edge of the black ring is obtained by obtaining the edge information in the image by taking the gradient of the first background image; and performing binaryzation on the edge information.
[0170] In one embodiment, the second area extraction unit includes:
[0171] A path determination subunit, configured to determine, on a first background image, a path from the center of the circle to the direction where the light source is located based on the arrangement orientation of the center of the circle and the light source;
[0172] A maximum value point determination subunit, configured to determine a maximum value point in the path, where the brightness of the maximum value point is the largest in the path;
[0173] A second region determination subunit, configured to take a window with a size of M centered on the maximum value point as a second region, where M is not less than a valley ridge line width and M is equal to N.
[0174] In another implementation manner, the second region extraction unit is specifically configured to select a near light source point at a preset distance and a preset orientation relative to the center of the circle on the first background image;
[0175] Wherein, the near light source points are symmetrically distributed around the center of the circle; the near light source points are axisymmetric about any straight line passing through the center of the circle; the near light source points are arranged in a circular ring around the center of the circle.
[0176] In one implementation manner, the determination module 143 includes a first eigenvalue generation unit and a determination unit,
[0177] The first eigenvalue generation unit is configured to generate a first eigenvalue based on the feature point values, and the first eigenvalue is obtained by calculating at least one of the average value, median value, variance value, standard deviation value or valley ridge signal difference of the feature point values in the anti-counterfeiting feature region on the fingerprint image;
[0178] The determination unit is configured to determine whether the fingerprint to be recognized is a genuine fingerprint based on the first eigenvalue.
[0179] In one implementation manner, the determination unit is specifically configured to:
[0180] Process the first eigenvalue by using a pre-trained anti-counterfeiting model to identify whether the fingerprint to be recognized is a genuine fingerprint.
[0181] In one implementation manner, the fingerprint anti-counterfeiting processing device 140 further includes a model training module for pre-training an anti-counterfeiting model, and the model training module includes:
[0182] An image acquisition unit, configured to acquire a genuine fingerprint test image of a genuine finger collected by an optical fingerprint recognition device;
[0183] A second eigenvalue generation unit, configured to extract the feature point values in the anti-counterfeiting feature region on the genuine fingerprint test image, and generate a second eigenvalue based on the feature point values, where the second eigenvalue is obtained by calculating at least one of the average value, median value, variance value, standard deviation value or valley ridge signal difference of the feature point values in the anti-counterfeiting feature region on the genuine fingerprint test image;
[0184] A training unit for training a preset model based on a second eigenvalue to obtain the anti-counterfeiting model.
[0185] In an implementation, the fingerprint anti-counterfeiting processing device 140 further includes a processing module for normalizing the first eigenvalue based on a third eigenvalue to obtain a normalized first eigenvalue, where the third eigenvalue is generated and stored based on the feature point values in the anti-counterfeiting feature area on the second background image, and the second background image is obtained by pressing a flesh-colored flat test head above the optical fingerprint recognition device for testing;
[0186] The determination unit is specifically configured to determine whether the fingerprint to be recognized is a genuine fingerprint based on the normalized first eigenvalue.
[0187] In an implementation, the fingerprint anti-counterfeiting processing device 140 further includes a second background image acquisition module for obtaining a second background image by pressing a flesh-colored flat test head above the optical fingerprint recognition device for testing. The second background image acquisition module specifically includes a second detection signal generation unit and a second background image generation unit.
[0188] The second detection signal generation unit is configured to generate infrared light that passes through the cover plate and reaches the flesh-colored flat test head in the fingerprint acquisition area attached to the cover plate by using a light source, converge the reflected light that passes through the fingerprint acquisition area of the cover plate and is transmitted to the optical lens by using the optical lens, and generate a second detection signal based on the reflected light by using an optical sensor.
[0189] The second background image generation unit is configured to generate the second background image based on the second detection signal.
[0190] In an implementation, the processing module is specifically configured to:
[0191] Calculate the ratio of the first eigenvalue to the third eigenvalue to obtain a normalized first eigenvalue.
[0192] The above device provided by the embodiments of the present application can be used to execute the technical solutions of the fingerprint anti-counterfeiting processing method in the above embodiments. The implementation principles and technical effects are similar and will not be elaborated here.
[0193] It should be noted here that it should be understood that the division of each module of the above device is only a division of logical functions. In actual implementation, it can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software called by a processing element; they can also all be implemented in the form of hardware; or some modules can be implemented in the form of software called by a processing element, and some modules can be implemented in the form of hardware. For example, the image acquisition module 141 can be a separately established processing element, or can be integrated in a certain chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a certain processing element of the above device to perform the functions of the above image acquisition module 141. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together or can be independently implemented. Here, the processing element can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by the integrated logic circuit in the processor element or the instruction in the form of software.
[0194] The fingerprint anti-counterfeiting processing device 140 can specifically be Figure 1 the shown processor 20 (such as a central processing unit CPU) for executing the main steps of the methods of the above various embodiments. In other alternative embodiments, the fingerprint anti-counterfeiting processing device 140 can also be implemented by other processing units or control units with image processing capabilities (such as a microcontroller MCU).
[0195] Compared with the fingerprint anti-counterfeiting detection in the related art, in this embodiment, the characteristic point values are collected in real time when the fingerprint is pressed, and it is directly determined whether the fingerprint to be recognized is a real fingerprint based on the characteristic point values, optimizing the anti-counterfeiting calculation process and reducing the system's computing requirements. Compared with the method in the related art of adding sensor types or adding color filters for color detection to verify authenticity, this embodiment does not require additional devices and has a lower cost. Compared with the anti-counterfeiting method in the related art where the finger maintains the same pressing posture, multiple fingerprint carrier images are obtained by continuous exposure imaging, and the deformation characteristics during the fingerprint pressing process are statistically analyzed, this embodiment only needs to collect one fingerprint image, has a small amount of calculation, a short fingerprint unlocking time, and is not affected by the finger pressing posture. In some embodiments, the collected fingerprint feature values are also normalized to weaken the data fluctuations caused by the brightness of the infrared light source and the differences in the optical fingerprint recognition modules in the optical fingerprint recognition device, which can further improve the anti-counterfeiting effect of distinguishing true and false fingers. In other embodiments, a pre-trained anti-counterfeiting model is used to process the first feature value or the normalized first feature value, and the model directly outputs the anti-counterfeiting result, with a small amount of calculation and a shortened unlocking time. The normalization processing of the first feature value can also improve the robustness of the anti-counterfeiting model.
[0196] The embodiments of the present application further provide an electronic device 100, such as Figure 13 shown, which includes an optical fingerprint recognition device 150 and a cover plate. The optical fingerprint recognition device is disposed under the cover plate. The upper surface of the cover plate has a fingerprint collection area. The optical fingerprint recognition device includes an optical fingerprint recognition module and a light source. The light source is used to generate infrared light that passes through the fingerprint collection area of the cover plate. The optical fingerprint recognition module includes an optical lens and an optical sensor. The optical lens corresponds to the fingerprint collection area, and the optical sensor is located below the optical lens. The light source is disposed around the optical fingerprint recognition module. The electronic device 100 in the embodiments of the present application further includes a fingerprint anti-counterfeiting processing device 140. The optical fingerprint recognition device 150 is electrically connected to the fingerprint anti-counterfeiting processing device 140. The fingerprint anti-counterfeiting processing device 140 is used to execute the fingerprint anti-counterfeiting processing method in the above embodiments to implement optical fingerprint anti-counterfeiting detection. The optical fingerprint recognition device 150 may specifically be Figure 1 the optical fingerprint recognition device 10 shown, and the fingerprint anti-counterfeiting processing device 140 may specifically be Figure 1 the processor 20 shown, which is used to execute the main steps of the methods in the above various embodiments.
[0197] The embodiments of the present application further provide an electronic device 100, which may further include: a memory for storing a program, where the program includes instructions that, when executed by the fingerprint anti-counterfeiting processing device 140, cause the fingerprint anti-counterfeiting processing device 140 to execute the method in the above embodiments.
[0198] The embodiments of the present application correspondingly further provide a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the fingerprint anti-counterfeiting processing method.
[0199] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of devices or modules can be in electrical, mechanical or other forms.
[0200] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to implement the solution of this embodiment.
[0201] In addition, in each embodiment of the present application, each functional module may be integrated in a processing unit, may exist physically alone for each module, or two or more modules may be integrated in one unit. The above-mentioned unit integrated with modules may be implemented in the form of hardware, or may be implemented in the form of a hardware plus a software functional unit.
[0202] The above-mentioned integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The above-mentioned software functional module stored in a storage medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the methods in the various embodiments of the present application.
[0203] It should be understood that the above-mentioned processor may be a central processing unit (CPU for short), or may also be other general-purpose processors, digital signal processors (DSP for short), application specific integrated circuits (ASIC for short), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly implemented by the execution of the hardware processor, or can be implemented by the combination of the hardware and software modules in the processor.
[0204] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disc, etc.
[0205] The above-mentioned storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disc. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0206] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an Application Specific Integrated Circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a master control device.
[0207] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including the above method embodiments; and the foregoing storage medium includes: various media such as ROM, RAM, magnetic disks, or optical disks that can store program codes.
[0208] It can be understood that the various digital numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. In the embodiments of the present application, the magnitudes of the serial numbers of the above processes do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0209] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A fingerprint anti-counterfeiting processing method, characterized in that, the method includes: acquiring a fingerprint image of a fingerprint to be recognized collected by an optical fingerprint recognition device; extracting the feature point values within the anti-counterfeiting feature area on the fingerprint image; determining whether the fingerprint to be recognized is a genuine fingerprint based on the feature point values within the anti-counterfeiting feature area on the fingerprint image; wherein, the anti-counterfeiting feature area is obtained by testing with a black plane test head.
2. The fingerprint anti-counterfeiting processing method according to claim 1, characterized in that After obtaining the anti-counterfeiting feature area by testing with the black plane test head, the anti-counterfeiting feature area is stored; the anti-counterfeiting feature area includes a first area and a second area, the first area is the imaging area of the center of the optical lens of the optical fingerprint recognition module on the first background image, and the second area is the imaging area of the light source on the first background image, and the light source is used to illuminate the optical fingerprint recognition module; the anti-counterfeiting feature area is obtained by testing with the black plane test head, including: pressing the black plane test head above the optical fingerprint recognition device to test and obtain a first background image; extracting the first area and the second area on the first background image.
3. The fingerprint anti-counterfeiting processing method according to claim 2, wherein, The step of pressing the black plane test head above the optical fingerprint recognition device to test and obtain a first background image includes: using the light source to generate infrared light that passes through the cover plate and reaches the black plane test head in the fingerprint collection area attached to the cover plate, using the optical lens to converge the reflected light that passes through the fingerprint collection area of the cover plate and is transmitted to the optical lens, and using an optical sensor to generate a first detection signal based on the reflected light, generating a first background image based on the first detection signal.
4. The fingerprint anti-counterfeiting processing method according to claim 2, wherein, Extracting the first area on the first background image includes: obtaining the center of the black ring based on the edge of the black ring in the first background image, and the first area is a window with a size of N centered on the center, where N is not less than the width of one valley-ridge line; the edge of the black ring is obtained by obtaining the edge information in the image by taking the gradient of the first background image; and performing binarization on the edge information.
5. The fingerprint anti-counterfeiting processing method according to claim 4, wherein Extracting the second area on the first background image includes: based on the arrangement orientation of the center and the light source, determining a path from the center to the direction where the light source is located on the first background image; determining the maximum value point in the path, and the brightness of the maximum value point is the largest in the path; the second area is a window with a size of M centered on the maximum value point, where M is not less than the width of one valley-ridge line and M is equal to N.
6. The fingerprint anti-counterfeiting processing method according to claim 4, wherein Extracting the second area on the first background image includes: selecting a near light source point at a preset distance and a preset orientation relative to the center on the first background image, the preset distance includes a first preset distance and a second preset distance, and the first preset distance is not equal to the second preset distance; the second area is a window with a size of M centered on the near light source point, where M is not less than the width of one valley-ridge line and M is equal to N; Among them, the near light source points are symmetrically distributed around the center of the circle; the near light source points are axially symmetric about any straight line passing through the center of the circle; the near light source points are arranged in a circular ring around the center of the circle.
7. The fingerprint anti-counterfeiting processing method according to claim 1, characterized in that, Determining whether the fingerprint to be recognized is a genuine fingerprint based on the feature point values in the anti-counterfeiting feature area on the fingerprint image includes: Generating a first feature value based on the feature point values, where the first feature value is obtained by calculating at least one of the average value, median value, variance value, standard deviation value, or valley-ridge signal difference of the feature point values in the anti-counterfeiting feature area on the fingerprint image; Determining whether the fingerprint to be recognized is a genuine fingerprint based on the first feature value.
8. The fingerprint anti-counterfeiting processing method according to claim 7, characterized in that, Determining whether the fingerprint to be recognized is a genuine fingerprint based on the first feature value includes: Processing the first feature value using a pre-trained anti-counterfeiting model to identify whether the fingerprint to be recognized is a genuine fingerprint.
9. The fingerprint anti-counterfeiting processing method according to claim 8, wherein, It also includes: Obtaining a genuine fingerprint test image of a real finger collected by an optical fingerprint recognition device; Extracting the feature point values in the anti-counterfeiting feature area on the genuine fingerprint test image, and generating a second feature value based on the feature point values, where the second feature value is obtained by calculating at least one of the average value, median value, variance value, standard deviation value, or valley-ridge signal difference of the feature point values in the anti-counterfeiting feature area on the genuine fingerprint test image; Training a preset model based on the second feature value to obtain the anti-counterfeiting model.
10. The fingerprint anti-counterfeiting processing method according to claim 7, characterized in that, It also includes: Performing normalization processing on the first feature value based on a third feature value to obtain a normalized first feature value, where the third feature value is generated based on the feature point values in the anti-counterfeiting feature area on a second background image and is stored, and the second background image is obtained by pressing a flesh-colored flat test head above the optical fingerprint recognition device for testing; Determining whether the fingerprint to be recognized is a genuine fingerprint based on the first feature value includes: Determining whether the fingerprint to be recognized is a genuine fingerprint based on the normalized first feature value.
11. The fingerprint anti-counterfeiting processing method according to claim 10, characterized in that, Obtaining a second background image by pressing a flesh-colored flat test head above the optical fingerprint recognition device for testing includes: Using a light source to generate infrared light that passes through the cover plate and reaches the flesh-colored flat test head in the fingerprint collection area attached to the cover plate, using an optical lens to converge the reflected light that passes through the fingerprint collection area of the cover plate and is transmitted to the optical lens, and using an optical sensor to generate a second detection signal based on the reflected light, Generating the second background image based on the second detection signal.
12. The fingerprint anti-counterfeiting processing method according to claim 10, characterized in that, Performing normalization processing on the first feature value based on the third feature value to obtain a normalized first feature value includes: Calculating the ratio of the first feature value to the third feature value to obtain the normalized first feature value.
13. A fingerprint anti-counterfeiting processing device, characterized in that, It includes: An image acquisition module for acquiring a fingerprint image of a fingerprint to be recognized collected by an optical fingerprint recognition device; A feature point value extraction module for extracting the feature point values in the anti-counterfeiting feature area on the fingerprint image; A determination module for determining whether the fingerprint to be recognized is a genuine fingerprint based on the feature point values in the anti-counterfeiting feature area on the fingerprint image; Among them, the anti-counterfeiting feature area is obtained by testing with a black flat test head.
14. An electronic device, characterized in that, The electronic device includes an optical fingerprint recognition device and a cover plate. The optical fingerprint recognition device is disposed below the cover plate. The upper surface of the cover plate has a fingerprint collection area. The optical fingerprint recognition device includes an optical fingerprint recognition module and a light source. The light source is used to generate infrared light that passes through the fingerprint collection area of the cover plate. The optical fingerprint recognition module includes an optical lens and an optical sensor. The optical lens corresponds to the fingerprint collection area, and the optical sensor is located below the optical lens. The light source is disposed around the optical fingerprint recognition module. It further includes a fingerprint anti-counterfeiting processing device. The optical fingerprint recognition device is electrically connected to the fingerprint anti-counterfeiting processing device. The fingerprint anti-counterfeiting processing device is used to execute the fingerprint anti-counterfeiting processing method according to any one of claims 1 to 12.
15. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the fingerprint anti-counterfeiting processing method according to any one of claims 1 to 12.