Identity authentication method, electronic equipment and computer readable medium
By capturing multiple images and performing identity authentication by emitting polarized light with different polarization angles at different times in electronic devices, the problem of distinguishing between living objects and attack materials caused by screen protectors is solved, thus improving the accuracy of identity authentication.
Patent Information
- Application Number
- CN202511044702.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2026-04-17
AI Technical Summary
When electronic devices are covered with screen protectors, existing technologies struggle to distinguish between living beings and attacking materials, leading to reduced accuracy in identity authentication. In particular, because some screen protectors have waveplate properties, the polarization angles of different polarized light shift to the same or similar values, making it impossible to effectively distinguish between living beings and attacking materials.
By setting up a light source in an electronic device to emit polarized light with different polarization angles at different times, multiple images are acquired, and identity authentication is performed based on these images, including initial identity authentication and secondary identity authentication. The differences between images under different polarization angles are used to distinguish between living beings and attack materials.
It improves the accuracy of identity authentication, especially when the screen protector has wave-like properties, and can effectively distinguish between living objects and attack materials, thus improving the accuracy of identity authentication.
Smart Images

Figure CN121884465A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to identity authentication methods, electronic devices, and computer-readable media. Background Technology
[0002] With the development of computer technology, user authentication is required in an increasing number of scenarios. Authentication not only requires identifying the characteristics of the target to confirm their identity, but also detecting whether the target is a live agent or a malicious object.
[0003] In existing technologies, two polarized light sources with different polarization angles can be added to conventional imaging devices. Analyzing images acquired when different polarized light sources are activated allows for the differentiation between living entities and attack materials, thus enabling identity authentication. However, when electronic devices have screen protectors, some screen protectors possess waveplate properties, which can cause the polarization angles of the two types of polarized light to shift to the same or similar values after penetrating the screen protector. This makes it impossible to distinguish between living entities and attack materials, thereby reducing the accuracy of identity authentication. Summary of the Invention
[0004] This application provides an authentication method, electronic device, and computer-readable medium that improve the accuracy of authentication.
[0005] In a first aspect, embodiments of this application provide an identity authentication method applied to an electronic device. The electronic device is equipped with a light source and a camera module facing a test object. The light source is used to emit polarized light with different polarization angles in a time-division manner. The method includes: controlling the light source to emit polarized light with a first polarization angle and polarized light with a second polarization angle in a time-division manner; acquiring a first image and a second image of the test object through the camera module; performing identity authentication on the test object based on the first image and the second image to obtain a first identity authentication result; if the first identity authentication result indicates that the identity of the test object is the target identity and the test object is not a living person, then controlling the light source to emit polarized light with a third polarization angle, acquiring a third image of the test object through the camera module; and performing identity authentication on the test object based on at least one of the first image, the second image, and the third image to obtain a second identity authentication result.
[0006] Secondly, embodiments of this application provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the methods described in the aspects.
[0007] Thirdly, embodiments of this application provide a computer-readable medium having a computer program stored thereon that, when executed by a processor, implements the method described in the first aspect.
[0008] Fourthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0009] The authentication method, electronic device, and computer-readable medium provided in this application first control a light source to emit polarized light with a first polarization angle and a second polarization angle in a time-division manner, and acquire a first image and a second image of the object under test through a camera module; then, based on the first image and the second image, the object under test is authenticated to obtain a first authentication result; if the first authentication result indicates that the object under test is the target identity and the object under test is not a living person, the light source is controlled to emit polarized light with a third polarization angle, and a third image of the object under test is acquired through a camera module; finally, based on at least one of the first image, the second image, and the third image, the object under test is authenticated to obtain a second authentication result. Through the above process, if the initial authentication based on the image acquired under polarized light with two polarization angles fails, authentication can be performed again by combining the image acquired under polarized light with a third polarization angle. This solves the problem of being unable to distinguish between living people and attack materials due to screen protectors with waveplate properties, thus improving the accuracy of authentication. Attached Figure Description
[0010] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0011] Figure 1 This is a flowchart illustrating an embodiment of the identity authentication method of this application;
[0012] Figure 2A This is a graph showing the relationship between the intensity of polarized light passing through the polarization element and the polarization angle.
[0013] Figure 2B This is a graph showing the relationship between the intensity of polarized light passing through the polarization element and the polarization angle.
[0014] Figure 3 This is a schematic diagram of the structure of one embodiment of the identity authentication device of this application;
[0015] Figure 4 This is a schematic diagram of the structure of an electronic device used to implement the embodiments of this application. Detailed Implementation
[0016] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0017] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0018] It should be noted that all actions involving the acquisition of signals, information, or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where the application is located, and with the authorization granted by the owner of the relevant device.
[0019] Currently, binocular vision, Time-of-Flight (TOF) cameras, and structured light are commonly used to image the object under test. Identity authentication is then achieved by analyzing the imaging results. However, these methods have high requirements for the imaging environment or electronic equipment. When these requirements are not met, the imaging accuracy will decrease significantly, leading to a reduction in the accuracy of identity authentication.
[0020] To address the aforementioned issues, two polarized light sources with different polarization angles can be added to conventional imaging devices. Utilizing the varying depolarization capabilities of different shapes and materials, the differences in images acquired under polarized light at different angles can be analyzed to distinguish between living beings and attack materials, thus enabling identity authentication. However, when electronic devices have screen protectors, some screen protectors possess waveplate properties, which can cause the polarization angles of the two types of polarized light to shift to the same or similar values after penetrating the screen protector. This makes it impossible to distinguish between living beings and attack materials, leading to reduced accuracy in identity authentication. For example, polarized light with a 0-degree polarization angle will change from 0 degrees to approximately 45 degrees after penetrating a screen protector with half-waveplate properties; similarly, polarized light with a 90-degree polarization angle will also change from 90 degrees to approximately 45 degrees after penetrating the same screen protector. The difference in polarization angles approaches zero, significantly reducing the difference in images acquired under different polarization angles. This can cause living beings to be mistakenly identified as attack materials, resulting in incorrect identity authentication.
[0021] This application provides an identity authentication method that can effectively distinguish between living beings and attack materials while reducing the requirements for imaging environment and electronic equipment, thereby improving the accuracy of identity authentication.
[0022] Please refer to Figure 1This document illustrates a flow 100 of an embodiment of the authentication method according to this application. This authentication method can be applied to electronic devices. The electronic device is a device capable of imaging and has image acquisition capabilities. The electronic device may include, but is not limited to, smartphones, tablets, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptops, in-vehicle computers, PDAs, desktop computers, set-top boxes, smart TVs, wearable devices, smart locks, etc.
[0023] In this embodiment, the electronic device may be equipped with a light source and a camera module facing the object under test. The light source is used to emit polarized light with different polarization angles in a time-division manner, and this polarized light is typically linearly polarized light. Specifically, the light source may emit polarized light with a first polarization angle, a second polarization angle, and a third polarization angle in a time-division manner. The timing of the emission of polarized light with different polarization angles can be preset as needed. The camera module is used to receive the polarized light reflected back after the polarized light with a certain polarization angle emitted by the light source illuminates the object under test. That is, the camera module receives polarized light with a single polarization angle, which is a specified polarization angle among the aforementioned different polarization angles. This specified polarization angle can be preset as needed.
[0024] Optionally, the camera module may include a polarizing element and a photosensitive unit array. Polarized light emitted from the light source passes through the polarizing element and then enters the photosensitive unit array. The polarization angle of the polarizing element is the same as either a first polarization angle or a second polarization angle. For example, the first polarization angle and the second polarization angle are 0 degrees and 90 degrees, respectively. The polarization angle of the polarizing element of the camera module can be 0 degrees or 90 degrees.
[0025] Alternatively, the electronic device may include a display screen, such as an OLED display. At least one of the light source and camera may be located below the display screen. This avoids screen openings and reduces the requirements for the electronic device.
[0026] Step 101: Control the light source to emit polarized light with a first polarization angle and a second polarization angle in a time-division manner, and acquire the first image and the second image of the object under test through the camera module.
[0027] In this embodiment, the entity executing the authentication method can first control the light source to emit only polarized light with a first polarization angle, and then use the camera module to acquire an image of the object under test to obtain a first image; subsequently, the entity can control the light source to emit only polarized light with a second polarization angle, and use the camera module to acquire an image of the object under test to obtain a second image.
[0028] In some optional implementations of this embodiment, the light source may include a first light source for emitting polarized light with a first polarization angle, a second light source for emitting polarized light with a second polarization angle, and a third light source for emitting polarized light with a third polarization angle, i.e., it has three independent light sources. In this case, the first light source is first turned on, and the second and third light sources are turned off. The camera module then captures an image of the object under test to obtain a first image. Then, the first and third light sources are turned off, the second light source is turned on, and the camera module again captures an image of the object under test to obtain a second image.
[0029] In some optional implementations of this embodiment, the light source itself can emit polarized light with a first polarization angle, a second polarization angle, and a third polarization angle, i.e., it has only one light source. For example, the light source can be a polarized light source such as a VCSEL (Vertical Cavity Surface Emitting Laser). In this case, firstly, the light source is controlled to emit only polarized light with the first polarization angle, and an image of the object under test is acquired by the camera module to obtain a first image. Then, the light source is controlled to emit only polarized light with the second polarization angle, and an image of the object under test is acquired again by the camera module to obtain a second image.
[0030] In some optional implementations of this embodiment, the angle difference between the second polarization angle and the first polarization angle is n degrees, where n is a positive integer. For example, n can be 80, 85, 90, 95, etc., which can be arbitrarily set as needed, and is not specifically limited here.
[0031] In some optional implementations of this embodiment, the polarized light at the first polarization angle and the polarized light at the second polarization angle can be perpendicular, i.e., n is 90 degrees. For example, the vertical or horizontal direction can be taken as 0 degrees, the polarized light at the first polarization angle can be polarized light at 0 degrees, and the polarized light at the second polarization angle can be polarized light at 90 degrees. Alternatively, the polarized light at the first polarization angle can be polarized light at 90 degrees, and the polarized light at the second polarization angle can be polarized light at 0 degrees. The camera module can receive polarized light at 0 degrees or 90 degrees. In this way, the difference between two images acquired under polarized light at different polarization angles can be maximized. When the object under test is a real three-dimensional object such as a human face, the greater the difference between the two images, the more significant the three-dimensional biological features in the difference image, thereby enabling more accurate differentiation between living organisms and attack materials.
[0032] Step 102: Based on the first image and the second image, perform identity authentication on the object to be tested to obtain the first identity authentication result.
[0033] In this embodiment, the first and second images may include biometric features to be identified. Specifically, if the object to be identified is a face, both the first and second images may contain facial features. If the object to be identified is a finger, both the first and second images may contain fingerprint features. If the object to be identified is a palm, both the first and second images may contain palmprint features. If the object to be identified is an eye, both the first and second images may contain iris features. Based on the biometric features in the first or second image, the similarity is calculated with the biometric features of template images in the database to perform biometric identification and determine whether the identity of the object to be identified matches the target identity.
[0034] Furthermore, in the absence of a screen protector, or with a screen protector that does not possess waveplate properties, the polarization angle of the polarized light emitted by the light source differs. Since the different shapes and materials of the test object have varying depolarization capabilities, there should be significant differences between the first and second images when the test object is a real three-dimensional object such as a human face. Therefore, based on the differences between the first and second images, it is possible to distinguish between living beings and attacking materials.
[0035] When the identity of the subject under test is determined to be the target identity, and the subject under test is determined to be a living person, a first identity authentication result indicating successful identity authentication can be obtained. Conversely, when the identity of the subject under test is determined not to be the target identity based on the first image or the second image, or when the subject under test is determined to be a non-living person based on the difference between the first image and the second image, a first identity authentication result indicating unsuccessful identity authentication can be obtained.
[0036] Understandably, if it is determined that the identity of the object under test is not the target identity, it is no longer necessary to distinguish whether the object under test is a living entity or an attack object, and the first identity authentication result indicating that the identity authentication failed can be directly obtained, thereby reducing the time consumed by identity authentication. Furthermore, the first identity authentication result can be directly used as the final identity authentication result, eliminating the need to perform a second identity authentication operation, thereby further reducing the time consumed by identity authentication.
[0037] Step 103: If the first identity authentication result indicates that the identity of the object under test is the target identity and the object under test is not a living body, then control the light source to emit polarized light with a third polarization angle, and acquire the third image of the object under test through the camera module.
[0038] In this embodiment, when the first authentication result indicates that the identity of the object under test is the target identity and the object under test is not a living being, there is a possibility that the identity of the object under test is the target identity and the object under test is a living being, but due to the presence of a screen protector with waveplate properties, it may be falsely detected as an attack material. In this case, the light source can be controlled to emit polarized light with a third polarization angle, and a third image of the object under test can be acquired by the camera module to facilitate a second authentication.
[0039] For example, the first polarization angle and the second polarization angle are 0 degrees and 90 degrees, respectively. The polarization element in the camera module receives light polarized at 0 degrees. The relationship between the intensity of the polarized light passing through the polarization element and the polarization angle when no screen protector is applied can be found in [reference needed]. Figure 2A As shown. When the light source emits light polarized at 0 degrees, the intensity of the polarized light passing through the polarization element is at its maximum. When the light source emits light polarized at 90 degrees, the intensity of the polarized light received by the polarization element is at its minimum. For the relationship between the intensity of the polarized light received by the polarization element and the polarization angle when a screen protector with a half-wave plate property is applied, please refer to [reference needed]. Figure 2B As shown, polarized light with a polarization angle of 0 degrees changes its polarization angle to approximately 45 degrees after penetrating the screen protector; similarly, polarized light with a polarization angle of 90 degrees also changes its polarization angle to approximately 45 degrees after penetrating the screen protector. The difference in polarization angles between the two approaches zero, significantly reducing the difference between the first and second images. This can lead to false positives identifying a live object as an attack, resulting in incorrect identity authentication.
[0040] Because the third polarization angle differs from the first and second polarization angles, the polarized light at the third polarization angle, after penetrating the screen protector, exhibits a different polarization angle than the first two polarized lights. This results in significant differences between the first and third images, and also between the second and third images, when the object under test is a real three-dimensional object such as a human face. Based on these differences, it is possible to effectively distinguish between live objects and attack materials, thereby improving the accuracy of identity authentication.
[0041] In some optional implementations of this embodiment, when there are three independent light sources, the third light source can be turned on while the first and second light sources are turned off, and the camera module can acquire images of the object under test to obtain a third image.
[0042] In some optional implementations of this embodiment, when there is only one light source, the light source can be controlled to emit only polarized light with a third polarization angle, and the camera module can acquire images of the object under test to obtain a second image.
[0043] In some optional implementations of this embodiment, when the angle difference between the second polarization angle and the first polarization angle is n degrees, the angle difference between the third polarization angle and the first polarization angle is within a preset range. The minimum value of the preset range is greater than or equal to n / 4 degrees and the maximum value of the preset range is less than or equal to 3n / 4 degrees. For example, if n is 80, the preset range can be [20, 60]; if n is 90, the preset range can be [22.5, 67.5]; if n is 100, the preset range can be [25, 75], etc., without specific limitations here.
[0044] In some optional implementations of this embodiment, the angle difference between the third polarization angle and the first polarization angle can be n / 2 degrees. For example, the angle difference between the second polarization angle and the first polarization angle is 90 degrees, and the angle difference between the third polarization angle and the first polarization angle is 45 degrees. In this example, if the first polarization angle is considered to be 0 degrees, then the second polarization angle is 90 degrees, and the third polarization angle is 45 degrees. For screen protectors with half-wave plate properties, this setting maximizes the difference between the first and third images, and also maximizes the difference between the second and third images, thereby improving the accuracy of liveness detection and thus improving the accuracy of identity authentication.
[0045] Step 104: Based on at least one of the first image, the second image, and the third image, perform identity authentication on the object to be tested to obtain the second identity authentication result.
[0046] In this embodiment, the first image, the second image, and the third image may all include biometric features to be identified. Biometric identification can be performed by calculating the similarity between the biometric features in at least one of the first, second, and third images and the biometric features of template images in the database, thereby determining whether the identity of the subject matches the target identity.
[0047] Furthermore, when a screen protector with waveplate properties is applied, the polarization angles of light polarized at the first and third polarization angles differ after penetrating the screen protector, as do those at the second and third polarization angles. Since different shapes and materials of the test object have varying depolarization capabilities, significant differences exist between the first and third images, and also between the second and third images, when the test object is a real three-dimensional object such as a human face. These differences can be used to distinguish between living organisms and attack materials.
[0048] When the identity of the subject being tested is determined to be the target identity, and the subject is determined to be a living person, a second identity authentication result indicating successful authentication can be obtained. Conversely, when the identity of the subject being tested is determined not to be the target identity, or when the subject is determined not to be a living person, a second identity authentication result indicating unsuccessful authentication can be obtained.
[0049] The method provided in the above embodiments of this application first controls a light source to emit polarized light with a first polarization angle and polarized light with a second polarization angle in a time-division manner, and acquires a first image and a second image of the object under test through a camera module; then, based on the first image and the second image, the object under test is authenticated to obtain a first authentication result; if the first authentication result indicates that the object under test is the target identity and the object under test is not a living being, the light source is controlled to emit polarized light with a third polarization angle, and a third image of the object under test is acquired through a camera module; finally, based on at least one of the first image, the second image, and the third image, the object under test is authenticated to obtain a second authentication result. Through the above process, if the initial authentication based on the image acquired under polarized light with two polarization angles fails, authentication can be performed again by combining the image acquired under polarized light with a third polarization angle. In this way, the problem of being unable to distinguish between living beings and attack materials due to the presence of a screen protector with waveplate properties can be solved, thus improving the accuracy of authentication.
[0050] In some alternative embodiments, step 102 may be further performed via the following sub-steps:
[0051] Sub-step 1021: Based on at least one of the first image and the second image, perform biometric identification on the object to be tested to obtain the first biometric identification result.
[0052] Specifically, either the first image or the second image can be input into the biometric recognition model to obtain the first biometric recognition result. Alternatively, the first image and the second image can be input into the biometric recognition model sequentially, and the first biometric recognition result can be determined based on the output of the biometric recognition model. For example, if all outputs of the biometric recognition model indicate that the biometric verification is successful, a first biometric recognition result indicating that the identity of the subject is the target identity can be generated; if any output of the biometric recognition model indicates that the biometric verification is unsuccessful, a first biometric recognition result indicating that the identity of the subject is not the target identity can be generated.
[0053] Here, a suitable biometric recognition model can be selected based on the type of the object to be tested. Biometric recognition models may include, but are not limited to, face recognition models, fingerprint recognition models, palm print recognition models, iris recognition models, etc. Biometric recognition models can be pre-trained on convolutional neural networks using machine learning algorithms and deployed in the aforementioned electronic devices. Using biometric recognition models, biometric identification can be performed quickly and accurately, yielding accurate biometric recognition results.
[0054] Sub-step 1022: Based on the first difference image between the first image and the second image, perform liveness detection on the object to be tested to obtain the first liveness detection result.
[0055] The first difference image can be used to characterize the difference between the first image and the second image. The first difference image is obtained by subtracting the pixel value matrix corresponding to the first image from the pixel value matrix corresponding to the second image. When the object under test is a living body, due to the different morphologies and materials of different parts of the object, their ability to depolarize polarized light varies, and the reflected light from different parts carries different polarization information. The first difference image can maximize the reflection of this polarization information, therefore, the first difference image can have obvious liveness characteristics. Conversely, when the object under test is an attack material such as a face image, since such attack materials are two-dimensional planes, the first difference image does not have obvious liveness characteristics. Therefore, based on the first difference image, it can be determined whether the object under test is a living body.
[0056] Specifically, the first difference image can be input into the liveness detection model to obtain the liveness detection result. The liveness detection model can be used for liveness identification to distinguish between a live object and attack materials such as two-dimensional images. The liveness detection model can be pre-trained on a convolutional neural network based on machine learning algorithms and deployed in the aforementioned electronic device. Using the liveness detection model, liveness detection can be performed quickly and accurately, obtaining an accurate first liveness detection result.
[0057] Sub-step 1023: Based on the first biometric recognition result and the first liveness detection result, determine the first identity authentication result.
[0058] Specifically, when the first biometric identification result indicates that the identity of the subject to be tested is the target identity, and the first liveness detection result indicates that the subject to be tested is a live body, a first identity authentication result can be obtained to indicate that the identity authentication has passed.
[0059] Conversely, when the first biometric identification result indicates that the identity of the test subject is not the target identity, or when the first liveness detection result indicates that the test subject is not alive, a first identity authentication result indicating that identity authentication has failed can be obtained. Specifically, when the first biometric identification result indicates that the identity of the test subject is the target identity, and the first liveness detection result indicates that the test subject is not alive, subsequent steps can be performed for secondary identity authentication to rule out the possibility of false detection as not being alive due to a screen protector being applied.
[0060] By utilizing the different depolarization capabilities of varying morphologies and materials for polarized light, the difference image between the first and second images can be analyzed. This allows for accurate differentiation between living entities and attack materials in scenarios where no screen protector is applied or where the screen protector lacks waveplate properties, thus achieving identity authentication. This method reduces the requirements for electronic devices and lowers equipment costs. In other embodiments, the difference image is not limited to a simple difference image; any image reflecting the difference between the two images is acceptable, such as obtaining a difference image by calculating a ratio or structural similarity index.
[0061] In some alternative embodiments, step 103 may be further performed via the following sub-steps:
[0062] Sub-step 1031: Based on at least one of the first image, the second image, and the third image, perform biometric identification on the object to be tested to obtain a second biometric identification result.
[0063] Specifically, any one of the first, second, and third images can be input into the biometric recognition model to obtain the second biometric recognition result. Alternatively, any two of the first, second, and third images can be input into the biometric recognition model one by one, and the second biometric recognition result can be determined based on the output of the biometric recognition model.
[0064] For example, when at least two images are input into the biometric recognition model one by one, if the output results of the biometric recognition model both indicate that the biometric verification is successful, a second biometric recognition result indicating that the identity of the test subject is the target identity can be generated; if any output result of the biometric recognition model indicates that the biometric verification is unsuccessful, a second biometric recognition result indicating that the identity of the test subject is not the target identity can be generated.
[0065] Sub-step 1032: Based on at least one difference image among the second difference image between the first image and the third image and the third difference image between the second image and the aforementioned third image, perform liveness detection on the object to be tested to obtain a second liveness detection result.
[0066] The second difference image can be used to represent the difference between the first image and the third image. The third difference image can be used to represent the difference between the second image and the third image. The second difference image can be obtained by subtracting the pixel value matrix corresponding to the first image from the pixel value matrix corresponding to the third image.
[0067] When the object under test is a living organism, the different shapes and materials of different parts of the object have varying depolarization capabilities for polarized light. The reflected light from different parts carries different polarization information, and the second and third difference images can reflect this polarization information. Therefore, the second and third difference images can show obvious liveness characteristics. Conversely, when the object under test is an attack material such as a facial image, because such attack materials are two-dimensional planes, the second and third difference images do not show obvious liveness characteristics. Therefore, based on the second and third difference images, it is possible to determine whether the object under test is a living organism.
[0068] Optionally, either the second or third difference image can be input into the liveness detection model, and the output of the liveness detection model can be used as the second liveness detection result. If the object to be tested is determined to be live based on the second difference image, a second liveness detection result indicating that the liveness detection has passed is generated. Alternatively, if the object to be tested is determined to be live based on the third difference image, a third liveness detection result indicating that the liveness detection has passed is generated.
[0069] Optionally, liveness detection can be performed based on both the second and third difference images. For example, liveness detection can be performed using the liveness detection model described above. If the object to be tested is determined to be live based on both the second and third difference images, a second liveness detection result indicating that the liveness detection has passed is generated. If the object to be tested is determined to be non-live based on either the second or third difference image, a second liveness detection result indicating that the liveness detection has failed is generated. Generating a second liveness detection result indicating that the object to be tested is live when both the second and third difference images determine that the object to be tested is live can improve the accuracy of liveness detection.
[0070] Sub-step 1033: Based on the second biometric recognition result and the second liveness detection result, determine the identity authentication result.
[0071] Specifically, when the second biometric identification result indicates that the identity of the test subject is the target identity, and the second liveness detection result indicates that the test subject is alive, a second identity authentication result indicating successful identity authentication can be obtained. Conversely, when the second biometric identification result indicates that the identity of the test subject is not the target identity, or when the second liveness detection result indicates that the test subject is not alive, a second identity authentication result indicating unsuccessful identity authentication can be obtained.
[0072] By utilizing the different depolarization capabilities of different morphologies and materials for polarized light, the second difference image between the first image and the third image, and the third difference image between the second image and the third image, can be analyzed. This allows for accurate differentiation between living and attacking materials in scenarios where screen protectors with waveplate properties are applied, thereby improving the accuracy of identity authentication.
[0073] Further reference Figure 3 As an implementation of the methods shown in the above figures, this application provides an embodiment of an identity authentication device, which is similar to... Figure 1 Corresponding to the illustrated method embodiment, this device can be specifically applied to various electronic devices. The electronic device may be equipped with a light source and a camera module facing the object under test, and the light source is used to emit polarized light with different polarization angles in a time-division manner.
[0074] like Figure 3As shown, the identity authentication device 300 in this embodiment includes: a first control unit 301, used to control the light source to emit polarized light with a first polarization angle and a second polarization angle in a time-division manner, and to acquire a first image and a second image of the object under test through the camera module; a first identity authentication unit 302, used to perform identity authentication on the object under test based on the first image and the second image, and obtain a first identity authentication result; a second control unit 303, used to control the light source to emit polarized light with a third polarization angle if the first identity authentication result indicates that the identity of the object under test is the target identity and the object under test is not a living body, and to acquire a third image of the object under test through the camera module; and a second identity authentication unit 304, used to perform identity authentication on the object under test based on at least one of the first image, the second image, and the third image, and obtain a second identity authentication result.
[0075] In some optional implementations of this embodiment, the first identity authentication unit 302 is further configured to: perform biometric identification on the test object based on at least one of the first image and the second image to obtain a first biometric identification result; perform liveness detection on the test object based on a first difference image between the first image and the second image to obtain a first liveness detection result; and determine the first identity authentication result based on the first biometric identification result and the first liveness detection result.
[0076] In some optional implementations of this embodiment, the second identity authentication unit 304 is further configured to: perform biometric identification on the test object based on at least one of the first image, the second image, and the third image to obtain a second biometric identification result; perform liveness detection on the test object based on at least one of the second difference image between the first image and the third image and the third difference image between the second image and the third image to obtain a second liveness detection result; and determine the identity authentication result based on the second biometric identification result and the second liveness detection result.
[0077] In some optional implementations of this embodiment, the second identity authentication unit 304 is further configured to: perform liveness detection based on the second difference image and the third difference image respectively; if the test object is determined to be a live object based on the second difference image and the test object is determined to be a live object based on the third difference image, then generate a second liveness detection result indicating that the liveness detection has passed; if the test object is determined to be a non-live object based on the second difference image, or the test object is determined to be a non-live object based on the third difference image, then generate a second liveness detection result indicating that the liveness detection has failed.
[0078] In some optional implementations of this embodiment, the angle difference between the second polarization angle and the first polarization angle is n degrees, and the angle difference between the third polarization angle and the first polarization angle is within a preset range, wherein the minimum value of the preset range is greater than or equal to n / 4 degrees and the maximum value of the preset range is less than or equal to 3n / 4 degrees.
[0079] In some optional implementations of this embodiment, the angle difference between the third polarization angle and the first polarization angle is n / 2 degrees.
[0080] In some optional implementations of this embodiment, n is 90 degrees.
[0081] In some optional implementations of this embodiment, the camera module includes a polarizing element and a photosensitive unit array. The polarized light emitted by the light source passes through the polarizing element and then enters the photosensitive unit array. The polarization angle of the polarizing element is the same as the first polarization angle or the second polarization angle.
[0082] In some optional implementations of this embodiment, the electronic device includes an organic light-emitting diode (OLED) display screen, with at least one of the light source and the camera located below the OLED display screen.
[0083] In some optional implementations of this embodiment, the light source includes a first light source for emitting polarized light with the first polarization angle, a second light source for emitting polarized light with the second polarization angle, and a third light source for emitting polarized light with the third polarization angle; or, the light source itself emits polarized light with the first polarization angle, polarized light with the second polarization angle, and polarized light with the third polarization angle.
[0084] The apparatus provided in the above embodiments of this application first controls a light source to emit polarized light with a first polarization angle and polarized light with a second polarization angle in a time-division manner, and acquires a first image and a second image of the object under test through a camera module; then, based on the first image and the second image, the object under test is authenticated to obtain a first authentication result; if the first authentication result indicates that the object under test is the target identity and the object under test is not a living being, the light source is controlled to emit polarized light with a third polarization angle, and a third image of the object under test is acquired through the camera module; finally, based on at least one of the first image, the second image, and the third image, the object under test is authenticated to obtain a second authentication result. Through the above process, if the initial authentication based on the image acquired under polarized light with two polarization angles fails, authentication can be performed again by combining the image acquired under polarized light with a third polarization angle. In this way, the problem of being unable to distinguish between living beings and attack materials due to the presence of a screen protector with waveplate properties can be solved, thus improving the accuracy of authentication.
[0085] This application also provides an electronic device, including one or more processors and a storage device storing one or more programs thereon. When the one or more programs are executed by the one or more processors, the one or more processors implement the above-described authentication method.
[0086] The following is for reference. Figure 4 It shows a schematic diagram of the structure of an electronic device used to implement some embodiments of this application. Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this application.
[0087] like Figure 4 As shown, electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. RAM 403 also stores various programs and data required for the operation of electronic device 400. Processing device 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0088] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, disks, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 4 Each box shown can represent a device or multiple devices as needed.
[0089] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described authentication method.
[0090] In particular, according to some embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined above in the methods of some embodiments of this application.
[0091] This application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the above-described authentication method.
[0092] It should be noted that the computer-readable medium described in some embodiments of this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0093] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0094] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: control a light source to emit polarized light with a first polarization angle and polarized light with a second polarization angle in a time-division manner, and acquire a first image and a second image of the object under test through a camera module; perform identity authentication on the object under test based on the first image and the second image, obtaining a first identity authentication result; if the first identity authentication result indicates that the identity of the object under test is the target identity and the object under test is not a living being, then control the light source to emit polarized light with a third polarization angle, and acquire a third image of the object under test through a camera module; and perform identity authentication on the object under test based on at least one of the first image, the second image, and the third image, obtaining a second identity authentication result.
[0095] Computer program code for performing operations of some embodiments of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++; and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, or it can be connected to an external computer (e.g., via the Internet using an Internet service provider), including local area networks (LANs) or wide area networks (WANs).
[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0097] The units described in some embodiments of this application can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a first determining unit, a second determining unit, a selecting unit, and a third determining unit. The names of these units do not necessarily limit the specific unit itself.
[0098] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0099] The above description is merely a selection of preferred embodiments of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this application.
Claims
1. An identity authentication method, characterized by, Applied to an electronic device, the electronic device is equipped with a light source and a camera module facing the object under test, the light source being used to emit polarized light with different polarization angles in a time-division manner, the method comprising: The light source is controlled to emit polarized light with a first polarization angle and polarized light with a second polarization angle in a time-division manner, and the camera module acquires a first image and a second image of the object under test. Based on the first image and the second image, the identity of the object under test is authenticated to obtain a first identity authentication result; If the first identity authentication result indicates that the identity of the object under test is the target identity and the object under test is not a living body, then control the light source to emit polarized light with a third polarization angle, and acquire the third image of the object under test through the camera module; Based on the first image, at least one of the second images, and the third image, the identity of the object to be tested is authenticated to obtain a second identity authentication result.
2. The method of claim 1, wherein, The step of authenticating the identity of the object under test based on the first image and the second image to obtain a first identity authentication result includes: Based on at least one of the first image and the second image, biometric identification is performed on the object to be tested to obtain a first biometric identification result. Based on the first difference image between the first image and the second image, liveness detection is performed on the object to be tested to obtain the first liveness detection result; Based on the first biometric identification result and the first liveness detection result, the first identity authentication result is determined.
3. The method according to claim 1, characterized in that, The step of authenticating the identity of the object under test based on at least one of the first image, the second image, and the third image to obtain a second identity authentication result includes: Based on at least one of the first image, the second image, and the third image, biometric identification is performed on the object to be tested to obtain a second biometric identification result. Based on at least one difference image among the second difference image between the first image and the third image and the third difference image between the second image and the third image, liveness detection is performed on the object to be tested to obtain a second liveness detection result; Based on the second biometric identification result and the second liveness detection result, the identity authentication result is determined.
4. The method according to claim 2, characterized in that, The method of performing liveness detection on the object under test based on at least one of the second difference image between the first image and the third image, and the third difference image between the second image and the third image, to obtain a second liveness detection result includes: Liveness detection is performed based on the second difference image and the third difference image, respectively; If the test object is determined to be a live body based on the second difference image, and the test object is determined to be a live body based on the third difference image, then a second liveness detection result indicating that the liveness detection has passed is generated; If the test object is determined to be non-living based on the second difference image, or if the test object is determined to be non-living based on the third difference image, then a second liveness detection result indicating that the liveness detection has failed is generated.
5. The method according to one of claims 1 to 4, characterized in that The angle difference between the second polarization angle and the first polarization angle is n degrees, and the angle difference between the third polarization angle and the first polarization angle is within a preset range. The minimum value of the preset range is greater than or equal to n / 4 degrees and the maximum value of the preset range is less than or equal to 3n / 4 degrees, where n is a positive integer.
6. The method of claim 5, wherein, The difference between the third polarization angle and the first polarization angle is n / 2 degrees.
7. The method of claim 5, wherein, The value of n is 90.
8. The method according to one of claims 1 to 4, characterized in that The camera module includes a polarizing element and a photosensitive unit array. The polarized light emitted by the light source passes through the polarizing element and then enters the photosensitive unit array. The polarization angle of the polarizing element is the same as the first polarization angle or the second polarization angle.
9. The method according to one of claims 1 to 4, characterized in that The light source includes a first light source for emitting polarized light at the first polarization angle, a second light source for emitting polarized light at the second polarization angle, and a third light source for emitting polarized light at the third polarization angle; or, the light source itself emits polarized light at the first polarization angle, polarized light at the second polarization angle, and polarized light at the third polarization angle.
10. An electronic device, comprising: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the method as described in any one of claims 1-9.
11. A computer readable medium having stored thereon a computer program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-9.
12. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-9.