WO2018121428A1 - Living body detection method, apparatus, and storage medium - Google Patents

Living body detection method, apparatus, and storage medium Download PDF

Info

Publication number
WO2018121428A1
WO2018121428A1 PCT/CN2017/117958 CN2017117958W WO2018121428A1 WO 2018121428 A1 WO2018121428 A1 WO 2018121428A1 CN 2017117958 W CN2017117958 W CN 2017117958W WO 2018121428 A1 WO2018121428 A1 WO 2018121428A1
Authority
WO
WIPO (PCT)
Prior art keywords
preset
light
difference
detection
reflected light
Prior art date
Application number
PCT/CN2017/117958
Other languages
French (fr)
Chinese (zh)
Inventor
刘尧
汪铖杰
李季檩
梁亦聪
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2018121428A1 publication Critical patent/WO2018121428A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/40Spoof detection, e.g. liveness detection
    • G06V40/45Detection of the body part being alive
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/165Detection; Localisation; Normalisation using facial parts and geometric relationships

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a living body detecting method, apparatus, and storage medium.
  • identity verification technologies such as fingerprint recognition, eye pattern recognition, iris recognition, and face recognition have been greatly developed.
  • face recognition technology is the most prominent, and it has been more and more widely applied to various identity authentication systems.
  • the identity authentication system based on face recognition mainly needs to solve two problems, one is face verification and the other is living body detection.
  • the living body detection is mainly used to confirm that the collected face image and the like are from the user himself, rather than playing back or forging materials.
  • Aiming at the current methods of detecting live objects, such as photo attacks, video playback attacks, synthetic face attacks, etc., a "randomized interaction” technique is proposed.
  • the so-called "randomized interaction” technology refers to the movement of different parts of the face in the video. The change is cut in, and the random interactions that require the user's active cooperation, such as blinking, shaking, or lip recognition, etc., are used to judge whether the detected object is a living body or the like.
  • An embodiment of the present invention provides a living body detecting method, including:
  • the detection object is a living body.
  • the embodiment of the invention further provides a living body detecting device, comprising:
  • a receiving unit configured to receive a living body detection request
  • a monitoring unit configured to monitor the detection object to obtain an image sequence
  • a detecting unit configured to determine whether the reflected light signal matches a preset optical signal sample when determining that the preset portion of the detection object has a reflected light signal in the image sequence; and when the reflected light signal and the When the optical signal samples are matched, it is determined that the detection object is a living body.
  • the present application also proposes a non-transitory computer readable storage medium storing computer readable instructions that cause at least one processor to perform the methods described above.
  • FIG. 1 is a schematic diagram of a scene of a living body detecting method according to an embodiment of the present invention
  • FIG. 1b is another schematic diagram of a living body detecting method according to an embodiment of the present invention.
  • FIG. 1c is a flowchart of a living body detecting method according to an embodiment of the present invention.
  • FIG. 2 is another flowchart of a living body detecting method according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a living body detecting apparatus according to an embodiment of the present invention.
  • FIG. 3b is another schematic structural diagram of a living body detecting apparatus according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • the algorithm used in the existing scheme for living body detection has a low accuracy, and it cannot effectively resist synthetic face attacks.
  • the cumbersome active interaction will also The pass rate of the correct sample is greatly reduced, so overall, the in vivo detection of the existing scheme is not good, which greatly affects the accuracy and security of the authentication.
  • embodiments of the present invention provide a living body detecting method and apparatus.
  • the living body detecting device may be specifically integrated in a device such as a terminal, and may use the screen light intensity and color change of the terminal, or use other components or devices such as a flash or an infrared emitter as a light source to project onto the detection object, and then, The living body detection is performed by analyzing a preset portion of the detected object in the received image sequence, such as a reflected light signal of the face.
  • the detection interface when the terminal receives the living body detection request, the detection interface can be started according to the living body detection request, wherein, as shown in FIG. 1a, the detection interface is In addition to the detection area, a non-detection area (the gray part marked in Fig. 1a) is also provided, which is mainly used for flashing a color mask, which can be used as a light source to project light to the detection object, for example, see 1b.
  • the reflected light signal of the real living body and the forged living body (the carrier of the composite picture or video, such as a photo, a mobile phone or a tablet computer) is different, it is possible to determine whether or not the projected light is present in the preset portion of the detection object.
  • the detection object can be monitored (the monitoring situation can be performed by using the detection area in the detection interface) Displaying, and then determining whether the preset portion of the detected object in the monitored image sequence has a reflected light signal generated by the projected light, and whether the reflected light signal matches the preset optical signal sample, if present and preset If the optical signal samples match, it is determined that the detection object is a living body, otherwise, if it does not exist or does not match the preset optical signal sample, it is determined that the detection object is not a living body, and the like.
  • a living body detecting device (hereinafter referred to as a living body detecting device), which may be integrated into a device such as a terminal, which may be a mobile phone, a tablet computer, a notebook computer or a personal computer ( PC, Personal Computer) and other devices.
  • a terminal which may be a mobile phone, a tablet computer, a notebook computer or a personal computer ( PC, Personal Computer) and other devices.
  • a living body detecting method includes: receiving a living body detecting request, and starting a light source according to the living body detecting request, wherein the light source is used for projecting light to the detecting object, and monitoring the detecting object to obtain an image sequence, when determining the image sequence
  • the preset part of the detection object has a reflected light signal generated by the projected light, and when the reflected light signal matches the preset light signal sample, the detected object is determined to be a living body.
  • the specific process of the living body detection method can be as follows:
  • the biometric detection request triggered by the user may be received, or the biometric detection request sent by another device may be received, and the like.
  • the body detection request activates a light source for projecting light to the detection object.
  • the corresponding living body detection process may be invoked according to the living body detection request, the light source is activated according to the living body detection process, and the like.
  • the light source can be set according to the needs of the actual application, for example, by adjusting the brightness of the terminal screen, or by using other light-emitting components such as a flash or an infrared emitter or an external device, or
  • the method is implemented by setting a color mask on the display interface, and the like, that is, the step of “starting the light source according to the living body detection request” may be implemented by any one of the following methods:
  • the predetermined light-emitting component is turned on according to the living body detection request, so that the light-emitting component emits light as a light source to the detection object.
  • the light emitting part may comprise a component such as a flash lamp or an infrared emitter.
  • the detection interface may flash a color mask, and the color mask is used as a light source to project light to the detection object.
  • the area of the flashing color mask may be determined according to the requirements of the actual application.
  • the detecting interface may include a detecting area and a non-detecting area, and the detecting area is mainly used for displaying a monitoring situation, and the non-detecting area may be used.
  • the color mask is used as a light source to project light to the detection object, and so on.
  • the color mask and other parameters of the color mask can be set according to the requirements of the actual application.
  • the color mask can be preset by the system and directly retrieved when the detection interface is started, or can be received at the same time.
  • the biometric detection method may further include:
  • a color mask is generated such that the light projected by the color mask can be changed according to a preset rule.
  • the intensity of the change of the light can also be maximized.
  • the preset rule may be determined according to the needs of the actual application, and the manner of maximizing the intensity of the change of the light may also be various. For example, for the same color of light, the brightness of the screen before and after the change may be maximized.
  • the intensity of the change of light for example, the brightness of the screen before and after the change is set to the maximum and minimum, and for the light of different colors, the intensity of the change of the light can be maximized by adjusting the color difference before and after the change, and so on.
  • the color selection may be selected to be the most robust to signal analysis.
  • the color space for example, in the color model (LAB) color space, the screen changes from the brightest red to the brightest green, the chromaticity of the reflected light changes the most, and so on.
  • the camera of the terminal can be specifically called, the detection object is photographed in real time, an image sequence is obtained, and the captured image sequence is displayed in the detection area, and the like.
  • the image sequence may also be subjected to denoising processing.
  • the noise model as the Gaussian noise
  • the timing multi-frame averaging and/or the same-frame multi-scale averaging can be used to reduce the noise as much as possible, and details are not described herein again.
  • the detected object may be determined to be inactive.
  • the reflected signal may be generated by a light source that is projected by the light source to the detection object.
  • the light source may be activated according to the living body detection request after receiving the living body detection request, or may be initiated in other cases. It should be noted that the present application does not limit the manner and timing of starting the light source, and it is only necessary to project light to the predetermined portion of the detection target when monitoring the detection target.
  • the method for determining whether there is a reflected light signal in the preset part of the image sequence in the image sequence may be various.
  • the reflected light information may be detected by using the inter-frame difference of the image.
  • the specific information may be as follows:
  • the difference between the frames may be an interframe difference or a frame difference, where the interframe difference refers to a difference between two adjacent frames, and the frame difference is between frames corresponding to before and after the change of the projected light. difference.
  • the pixel coordinates of the adjacent frames in the image sequence may be respectively acquired when determining that the position change degree of the detection object is less than the preset change value, and then the inter-frame difference is calculated based on the pixel coordinates.
  • the pixel coordinates of the frame corresponding to the frame before and after the change of the projected light are respectively obtained from the image sequence, and the frame is calculated based on the pixel coordinates. difference.
  • the method for calculating the inter-frame difference or the frame difference based on the pixel coordinates may be various, for example, as follows:
  • the pixel coordinates of the frame corresponding to the change of the projected light are transformed to minimize the registration error of the pixel coordinate, and the pixel corresponding to the preset condition is selected according to the transformation result, and the pixel is calculated according to the selected pixel point. Frame difference.
  • the preset change value and the preset condition may be set according to actual application requirements, and details are not described herein again.
  • Determining whether a difference between the frames (such as an interframe difference or a frame difference) is greater than a preset threshold, and if so, determining that a reflected light signal generated by the projected light exists in a preset portion of the detected object in the image sequence, and if not, Then, it is determined that the reflected portion of the detected object in the image sequence does not have a reflected light signal generated by the projected light.
  • the preset threshold may be determined according to the requirements of the actual application, and details are not described herein again.
  • the difference (such as inter-frame difference or frame difference) is classified and analyzed by a preset global feature algorithm or a classifier, and if the analysis result indicates that the inter-frame variation of the preset portion of the detection object is greater than a set value, determining the image sequence
  • the reflected light signal generated by the projected light is present in the preset portion of the detection object. If the analysis result indicates that the inter-frame change of the preset portion of the detection object is not greater than the set value, it is determined that the preset portion of the detected object in the image sequence is not There is a reflected light signal generated by the projected light.
  • the setting value may be determined according to the requirements of the actual application, and the manner of “classifying and analyzing the inter-frame difference by using a preset global feature algorithm or a classifier” may also be various, for example, as follows:
  • the difference (such as the interframe difference or the frame difference) is analyzed to determine whether the reflected light signal generated by the projected light exists in the image sequence, and if the reflected light signal generated by the projected light does not exist, the indication detection is generated.
  • the inter-frame change of the preset part of the object is not greater than the analysis result of the set value; if there is a reflected light signal generated by the projected light, whether the reflector of the reflected light information existing is determined by a preset global feature algorithm or a classifier If the preset part is the preset part, the analysis result indicating that the inter-frame change of the preset part of the detection target is greater than the set value is generated, and if it is not the preset part, generating the indication object The interframe change of the preset part is not greater than the analysis result of the set value.
  • the preset global feature algorithm or classifier can be used in the sequence of images.
  • the image is classified to filter out the frame in which the preset portion exists, and the candidate frame is obtained, and the inter-frame difference of the candidate frame is analyzed to determine whether the reflected light signal generated by the projected light exists in the preset portion.
  • Generating a reflected light signal generated by the light to generate an analysis result indicating that the inter-frame change of the preset portion of the detection target is not greater than a set value; and if there is a reflected light signal generated by the projected light, generating a pre-detection target Let the interframe change of the part be larger than the analysis result of the set value, and so on.
  • the global feature algorithm refers to an algorithm based on global features, wherein the global features may include mean variance of gray scale, gray level co-occurrence matrix, fast Fourier transform (FFT, Fast Fourier Transformation) and discrete cosine transform (DCT, Discrete) Cosine transform) The transformed spectrum.
  • the classifier can include a Support Vector Machine (SVM), a neural network, a decision tree, and the like.
  • the method for determining whether the reflected optical signal matches the preset optical signal sample may also be multiple.
  • any one of the following methods may be adopted:
  • a difference between a parameter value in the reflected optical signal and a parameter value in the preset optical signal sample is less than a preset difference range, and if less than the preset difference range, indicating a parameter value in the reflected optical signal
  • the parameter values in the preset optical signal samples match, and if greater than the preset difference range, it indicates that the parameter values in the reflected optical signal do not match the parameter values in the preset optical signal samples, and the like.
  • the reflected light signal matches the preset optical signal sample by analyzing whether the shape of the reflected light signal on the image matches the shape presented on the preset light signal sample image, for example, if the reflected light The similarity between the shape of the signal presented on the image and the shape presented on the image of the preset optical signal sample is greater than the set value, and then the reflected light signal is determined to match the preset optical signal sample; otherwise, if the reflected light signal is on the image The similarity between the rendered shape and the shape presented on the preset optical signal sample image is less than or equal to the set value, then it is determined that the reflected optical signal does not match the preset optical signal sample, and so on.
  • the preset optical signal sample, the preset difference range, and the set value may be set according to actual application requirements. For example, if a human body part needs to be tested in vivo, the projected light may be irradiated on the person's face.
  • the commonality of the emitted light signals generated after the above is taken as the preset optical signal sample, and the error range that may be generated by the corresponding parameters may be set accordingly as the preset difference range, or may be set accordingly.
  • the corresponding shape (such as the face of a person generally has the facial features of the person, and the general appearance and position of the facial features, etc.) the set value of the similarity, and so on, and will not be described again here.
  • the light source can be started to project light to the detection object, and the detection object is monitored, and then the monitored image is determined. Whether the reflected light signal generated by the projected light exists in the preset portion of the detected object in the sequence, and whether the reflected light signal matches the preset optical signal sample, and if present and matched, determining that the detected object is a living body;
  • the solution does not require complicated interaction and operation with the user, and therefore, the requirement for hardware configuration can be greatly reduced.
  • the scheme is based on detecting the reflected light signal of the preset part of the object, the real living body and forgery are The reflected light signal of the living body (the carrier of the composite picture or video, such as photos, mobile phones or tablets) is different. Therefore, the scheme can also effectively resist the synthetic face attack and improve the accuracy of the discrimination; therefore, in short, This solution can improve the detection of living organisms, thereby improving the accuracy and security of authentication.
  • the living body detecting device is specifically integrated in the terminal, and the light source is specifically a color mask, and the preset portion of the detecting object is specifically a human face as an example.
  • a living body detection method can be as follows:
  • the terminal receives a living body detection request.
  • the biometric detection request triggered by the user may be received, or the biometric detection request sent by another device may be received, and the like.
  • the living body detecting request may be triggered to be generated, so that the terminal receives the living body detecting request.
  • the terminal generates a color mask, so that the light projected by the color mask can be changed according to a preset rule.
  • the intensity of the change of the light can also be maximized.
  • the preset rule may be determined according to the needs of the actual application, and the manner of maximizing the intensity of the change of the light may also be various. For example, for the same color of light, the brightness of the screen before and after the change may be maximized.
  • the intensity of the light changes for example, the brightness of the screen before and after the change is set to the maximum and minimum, and for the light of different colors, the intensity of the change of the light can be maximized by adjusting the color difference before and after the change, such as changing the screen from the darkest of black. The brightest white, and so on.
  • the color selection may be selected to be the most robust to signal analysis.
  • the color space for example, in the color model (LAB) color space, the screen changes from red to brightest, green to brightest, its reflected light has the largest change in chromaticity, and so on.
  • the terminal starts the detection interface according to the living body detection request, and passes the detection boundary.
  • the non-detection area in the face flashes a color mask such that the color mask acts as a light source to project light onto a subject, such as a person's face.
  • the corresponding living body detection process may be invoked according to the living body detection request, the corresponding detection interface is started according to the living body detection process, and the like.
  • the detection interface may include a detection area and a non-detection area.
  • the detection area is mainly used to display the acquired image sequence, and the non-detection area may be used to flash a color mask, and the color mask is used as a light source to detect the object.
  • the color mask is used as a light source to detect the object.
  • the detection object needs to be kept within a certain distance from the screen of the mobile device, for example, when the user needs to detect whether a certain face is a living body. You can take the mobile device to the right place directly in front of the face to monitor the face, and so on.
  • the terminal monitors the detection object to obtain a sequence of images.
  • the camera of the terminal may be specifically called to capture the detected object in real time to obtain a sequence of images, and the captured image sequence is displayed in the detection area.
  • the image sequence may also be subjected to denoising processing.
  • the noise model as the Gaussian noise
  • the timing multi-frame averaging and/or the same-frame multi-scale averaging can be used to reduce the noise as much as possible, and details are not described herein again.
  • the terminal calculates an interframe difference in the sequence of images.
  • the inter-frame alignment method can be used to more precisely correct the pixel pair of the inter-frame difference in the case where the user's face is detected without a sharp position change. That is, when determining that the position change degree of the detection object is less than the preset change value, respectively acquiring the pixel coordinates of the adjacent frame in the image sequence, and then transforming the pixel coordinates to minimize the registration error of the pixel coordinate, and then The interframe difference is calculated based on the result of the transform, for example, as follows:
  • the transformation type of the transformation matrix M employed is the homography transformation with the highest degree of freedom, so that the registration error can be minimized.
  • MSE Mean Square Error
  • RASAC Random Sample Consensus
  • the step "calculate the inter-frame difference based on the transformation result" can include:
  • the pixel points whose correlation is in accordance with the preset condition are filtered, and the inter-frame difference is calculated according to the selected pixel points.
  • the preset change value and the preset condition may be set according to actual application requirements, and details are not described herein again.
  • the terminal determines, according to the interframe difference, whether a reflected light signal generated by the projected light is present in a face of the image in the image sequence. If yes, step 207 is performed. If not, the terminal determines that the detected object is inactive.
  • the terminal may determine whether the interframe difference is greater than a preset threshold, and if yes, determine a reflected light signal generated by the projected light in a face of the image sequence, and if not, determine a face of the person in the image sequence There is a reflected light signal generated by the projected light.
  • the preset threshold may be determined according to the requirements of the actual application, and details are not described herein again.
  • the cascading discriminant model may also be used for processing.
  • the global feature algorithm or the classifier may be used to preprocess the interframe difference to The occurrence of the reflected light signal is roughly determined so that the subsequent processing of most of the normal frames without the reflected light signal can be skipped, that is, only the frame in which the reflected light signal exists is processed later. That is, the step "the terminal determines whether the reflected light signal generated by the projected light is present in the face of the image in the image sequence according to the interframe difference" may include:
  • the inter-frame difference is classified and analyzed by a preset global feature algorithm or a classifier. If the analysis result indicates that the inter-frame variation of the person's face is greater than the set value, determining that the projected surface ray is generated by the person's face in the image sequence. The reflected light signal, if the analysis result indicates that the inter-frame change of the person's face is not greater than the set value, determining that the reflected light signal generated by the projected light is not present in the face of the person in the image sequence.
  • the set value may be determined according to the needs of the actual application, and the “by default”
  • the global feature algorithm or the classifier can classify and analyze the inter-frame difference.
  • the inter-frame difference is analyzed to determine whether there is a reflected light signal generated by the projected light in the image sequence. If there is no reflected light signal generated by the projected light, an inter-frame change indicating the face of the person is generated. An analysis result larger than the set value; if there is a reflected light signal generated by the projected light, the preset global feature algorithm or the classifier determines whether the reflector of the reflected light information exists as a human face, and if it is a human face, An analysis result indicating that the inter-frame change of the face of the person is greater than the set value is generated, and if it is not the face of the person, an analysis result indicating that the inter-frame change of the face of the person is not greater than the set value is generated.
  • the image in the image sequence may be classified by a preset global feature algorithm or a classifier to filter out a frame of the face of the person, obtain a candidate frame, and analyze an interframe difference of the candidate frame to determine the person. Whether there is a reflected light signal generated by the projected light on the face, and if there is no reflected light signal generated by the projected light, an analysis result indicating that the inter-frame change of the face of the person is not greater than a set value is generated; if the projection exists The reflected light signal generated by the light generates an analysis result indicating that the inter-frame variation of the person's face is greater than the set value, and the like.
  • the global feature algorithm refers to an algorithm based on global features, wherein the global features may include a mean variance of gray scales, a gray level co-occurrence matrix, a transformed spectrum such as FFT and DCT.
  • the classifier can be set according to the requirements of the actual application. For example, if it is only used to determine whether there is a reflected light signal, a simpler classifier can be used, and if it is used to determine whether it is a person's face or the like, it can be used. More complex classifiers, such as neural network classifiers, are used for processing and will not be described here.
  • the terminal determines whether the reflected optical signal matches the preset optical signal sample. If the terminal matches, determining whether the detected object is a living body, and if not, determining that the detected object is a non-living body.
  • the terminal may analyze whether the parameter in the reflected optical signal matches the parameter in the preset optical signal sample, and if yes, determine that the reflected optical signal matches the preset optical signal sample, and if not, determine the reflected optical signal and the pre-determined Let the optical signal samples not match. For example, it may be specifically determined whether a difference between a parameter value in the reflected optical signal and a parameter value in the preset optical signal sample is less than a preset difference range, and if less than the preset difference range, indicating a parameter value in the reflected optical signal The parameter values in the preset optical signal samples are matched. If the value is greater than the preset difference range, it indicates that the parameter values in the reflected optical signal do not match the parameter values in the preset optical signal samples. and many more.
  • the terminal may also determine whether the reflected optical signal matches the preset optical signal sample by analyzing whether the shape of the reflected light signal on the image matches the shape presented on the preset optical signal sample image, for example, if The similarity between the shape of the reflected light signal on the image and the shape presented on the image of the preset light signal sample is greater than a set value, and then the reflected light signal is determined to match the preset light signal sample; otherwise, if the reflected light signal is If the similarity between the shape presented on the image and the shape presented on the preset light signal sample image is less than or equal to the set value, it is determined that the reflected light signal does not match the preset optical signal sample, and so on.
  • the preset optical signal sample, the preset difference range, and the set value may be set according to actual application requirements, and details are not described herein again.
  • some interactive operations may also be appropriately added, for example, the user performs an action such as blinking or opening the mouth, that is, in the step “determining the presence of the projected light in the face of the image in the image sequence.
  • the generated reflected light signal it may also include:
  • the detection object such as a person's face
  • the preset action can be set according to the requirements of the actual application. It should be noted that, in order to avoid cumbersome interaction, the number and difficulty of the preset action may be limited, for example, only one simple operation is needed. The interaction, such as blinking or opening the mouth, can not be repeated here.
  • a non-detection area can be disposed on the detection interface for flashing a color mask, wherein the color mask can be used as a light source to project light to a detection object, such as a person's face, so that when needed When the living body is detected, the face of the person can be monitored, and then the reflected light signal generated by the projected light is present in the face of the monitored image sequence, and the reflected light signal matches the preset light signal sample. If it exists and matches, it is determined that the person's face is a living body; since the solution does not need to perform cumbersome interaction operations and operations with the user, the requirement for hardware configuration can be greatly reduced, and the basis for the living body discrimination is determined by the solution.
  • the solution can also Effectively resist synthetic face attacks and improve the accuracy of the judgment; therefore, in summary, the program Under limited to the hardware configuration of the terminal, to improve the detection effect in vivo, thereby improving authentication accuracy and safety.
  • an embodiment of the present invention further provides a living body detecting device, which is referred to as a living body detecting device.
  • the living body detecting device includes one or more memories; one or more processors; The one or more memories are stored with one or more instruction modules configured to be executed by the one or more processors; wherein the one or more instruction modules include: a receiving unit 301, a monitoring unit 303, and Detection unit 304.
  • the one or more instruction modules may further include a startup unit 302. The specific functions of each unit are described as follows:
  • the receiving unit 301 is configured to receive a living body detection request.
  • the receiving unit 301 may be specifically configured to receive a biometric detection request triggered by a user, or may also receive a biometric detection request sent by another device, and the like.
  • the starting unit 302 is configured to start a light source according to the living body detection request, and the light source is used to project light to the detection object.
  • the initiating unit 302 may be specifically configured to invoke a corresponding living body detection process according to the living body detection request, activate a light source according to the living body detection process, and the like.
  • the light source can be set according to the needs of the actual application, for example, by adjusting the brightness of the terminal screen, or by using other light-emitting components such as a flash or an infrared emitter or an external device, or By setting a color mask on the display interface, etc., the startup unit 302 can specifically perform any of the following operations:
  • the activation unit 302 is specifically configured to adjust the brightness of the screen according to the living body detection request, so that the screen as a light source projects light to the detection object.
  • the activation unit 302 is specifically configured to turn on the preset light-emitting component according to the living body detection request, so that the light-emitting component emits light as a light source to the detection object.
  • the light emitting part may comprise a component such as a flash lamp or an infrared emitter.
  • the activation unit 302 is specifically configured to start a detection interface according to the living body detection request, and the detection interface may flash a color mask, and the color mask is used as a light source to project light to the detection object.
  • the area of the flashing color mask may be determined according to the requirements of the actual application.
  • the detecting interface may include a detecting area and a non-detecting area, and the detecting area is mainly used for displaying a monitoring situation, and the non-detecting area may be used.
  • the color mask is used as a light source to project light to the detection object, and so on.
  • the color mask and other parameters of the color mask can be set according to the requirements of the actual application.
  • the color mask can be preset by the system and directly retrieved when the detection interface is started, or can be received at the same time.
  • Automatically generated after the live detection request That is, as shown in FIG. 3b, the living body detecting device may further include a generating unit 305 as follows:
  • the generating unit 305 can be configured to generate a color mask such that the light projected by the color mask can be changed according to a preset rule.
  • the generating unit 305 can also be used to maximize the intensity of the change of the light.
  • the preset rule may be determined according to the needs of the actual application, and the manner of maximizing the intensity of the change of the light may also be various, for example, as follows:
  • the generating unit 305 can be specifically configured to maximize the intensity of the change of the light by adjusting the brightness of the screen before and after the change for the light of the same color. For the light of different colors, the intensity of the change of the light is maximized by adjusting the color difference before and after the change.
  • the color selection may be selected to be the most robust to signal analysis. For details, refer to the previous embodiment, and details are not described herein again.
  • the monitoring unit 303 is configured to monitor the detection object to obtain a sequence of images.
  • the monitoring unit 303 can be specifically used to call the camera of the terminal, capture the detected object in real time, obtain an image sequence, and display the captured image sequence in the detection area.
  • the monitoring unit 303 may perform the denoising processing on the image sequence.
  • the monitoring unit 303 may perform the denoising processing on the image sequence.
  • the detecting unit 304 is configured to determine, when the reflected light signal exists in the preset part of the detection object in the image sequence, determine whether the reflected light signal matches the preset light signal sample; and when the reflected light signal matches the preset light signal sample, It is determined that the detection object is a living body.
  • the detecting unit 304 is further configured to determine, when the reflected portion of the detected object in the image sequence does not have the reflected light signal generated by the projected light, or the reflected light signal does not match the preset optical signal sample, determine the detected object. It is not a living body.
  • the detecting unit 304 may include a calculating subunit, a determining subunit, and a determining subunit, as follows:
  • a calculation subunit that can be used to calculate the difference between frames in the sequence of images.
  • the difference between the frames may be an interframe difference or a frame difference, where the interframe difference refers to a difference between two adjacent frames, and the frame difference is between frames corresponding to before and after the change of the projected light. difference.
  • the calculating subunit may be specifically configured to obtain pixel coordinates of adjacent frames in the image sequence when the degree of change of the position of the detecting object is less than a preset change value. Calculating the inter-frame difference on the pixel coordinates; for example, the pixel coordinates may be transformed to minimize the registration error of the pixel coordinates, and then, according to the transformation result, the pixel points whose correlation meets the preset condition are filtered, and according to the screening The resulting pixels calculate the interframe difference, and so on.
  • the calculating sub-unit may be specifically configured to determine, when the degree of change of the position of the detecting object is less than a preset change value, respectively obtain pixel coordinates of the frame corresponding to the change of the projected light from the image sequence, and calculate the pixel coordinate based on the pixel coordinate Frame difference; for example, the pixel coordinates may be transformed to minimize the registration error of the pixel coordinates, and then, according to the transformation result, the pixel points whose correlation is in accordance with the preset condition are filtered, and the frame is calculated according to the selected pixel point. Poor, and so on.
  • the preset change value and the preset condition may be set according to actual application requirements.
  • the determining subunit may be configured to determine, according to the difference, whether the preset portion of the detection object in the image sequence has a reflected light signal generated by the projected light, and whether the reflected optical signal matches the preset optical signal sample.
  • the determining subunit may be configured to determine that the detected object is a living body when the determining subunit determines that the reflected light signal generated by the projected light is present, and the reflected optical signal matches the preset optical signal sample.
  • the determining subunit may be further configured to determine that the detected object is inactive when the determining subunit determines that the reflected light signal generated by the projected light does not exist, or the reflected optical signal does not match the preset optical signal sample.
  • the method for determining whether there is a reflected light signal generated by the projected light in the preset portion of the image sequence in the image sequence may be different according to the difference between the frames. For example, any one of the following methods may be adopted:
  • the determining subunit may be specifically configured to determine whether the difference between the frames is greater than a preset threshold, and if yes, determining that the reflected light signal generated by the projected light exists in the preset part of the detected object in the image sequence; Determining that the preset portion of the detected object in the image sequence does not have a reflected light signal generated by the projected light.
  • the determining sub-unit may be specifically configured to perform classification analysis on the difference between the frames by using a preset global feature algorithm or a classifier, and if the analysis result indicates that the inter-frame variation of the preset part of the detection object is greater than a set value, determining The preset part of the detection object in the image sequence has a reflected light signal generated by the projected light; if the analysis result indicates that the inter-frame change of the preset part of the detection object is not greater than a set value, determining the detected object in the image sequence The reflected light signal generated by the projected light does not exist in the preset portion.
  • the set value may be determined according to the needs of the actual application, and the manner of “classifying and analyzing the inter-frame difference by using a preset global feature algorithm or a classifier” may also be Kind, for example, can be as follows:
  • the determining subunit may be specifically configured to analyze the difference between the frames to determine whether the reflected light signal generated by the projected light exists in the image sequence, and if there is no reflected light signal generated by the projected light, And generating an analysis result indicating that the inter-frame change of the preset part of the detection object is not greater than a set value; if there is a reflected light signal generated by the projected light, determining the reflected light information existing by using a preset global feature algorithm or a classifier Whether the reflector is a preset part of the detection object, and if it is the preset part, generating an analysis result indicating that the inter-frame change of the preset part of the detection object is greater than a set value, if not the preset part, generating An analysis result indicating that the inter-frame change of the preset portion of the detection object is not greater than the set value.
  • the determining subunit may be specifically configured to classify the image in the image sequence by using a preset global feature algorithm or a classifier to filter out a frame in which the preset part exists, obtain a candidate frame, and analyze the candidate frame.
  • Inter-frame difference to determine whether the preset part has a reflected light signal generated by the projected light, and if there is no reflected light signal generated by the projected light, generating an inter-frame change indicating that the preset part of the detection object is not greater than The analysis result of the set value; if there is a reflected light signal generated by the projected light, an analysis result indicating that the inter-frame change of the preset portion of the detection target is greater than the set value is generated.
  • the global feature algorithm refers to an algorithm based on global features, wherein the global features may include a mean variance of gray scales, a gray level co-occurrence matrix, a transformed spectrum such as FFT and DCT.
  • the method for determining whether the reflected optical signal matches the preset optical signal sample may also be multiple.
  • any one of the following methods may be adopted:
  • the determining subunit may be configured to analyze whether the parameter in the reflected optical signal matches the parameter in the preset optical signal sample, and if yes, determine that the reflected optical signal matches the preset optical signal sample, and if not, determine the reflection
  • the optical signal does not match the preset optical signal sample. For example, it may be specifically determined whether a difference between a parameter value in the reflected optical signal and a parameter value in the preset optical signal sample is less than a preset difference range, and if less than the preset difference range, indicating a parameter value in the reflected optical signal
  • the parameter values in the preset optical signal samples match, and if greater than the preset difference range, it indicates that the parameter values in the reflected optical signal do not match the parameter values in the preset optical signal samples, and the like.
  • the determining subunit may be specifically configured to determine whether the reflected optical signal matches the preset optical signal sample by analyzing whether the shape of the reflected light signal on the image matches the shape presented on the preset optical signal sample image. For example, if the similarity between the shape of the reflected light signal on the image and the shape presented on the preset light signal sample image is greater than the set value, it is determined that the reflected light signal matches the preset light signal sample, otherwise, if Determining the reflected light signal and the preset light signal when the similarity between the shape of the reflected light signal on the image and the shape presented on the preset light signal sample image is less than or equal to the set value Samples do not match, and so on.
  • the preset optical signal sample, the preset difference range, and the set value may be set according to actual application requirements, and details are not described herein again.
  • the foregoing units may be implemented as a separate entity, or may be implemented in any combination, and may be implemented as the same or a plurality of entities.
  • the foregoing method embodiments and details are not described herein.
  • the device can be integrated into a device such as a terminal, and the terminal can be a device such as a mobile phone, a tablet computer, a notebook computer, or a PC.
  • the activation unit 302 can activate the light source to project the light to the detection object, and monitor the 303 through the detection area in the detection interface to monitor the detection object. And determining, by the detecting unit 304, whether the preset portion of the detected object in the monitored image sequence has a reflected light signal generated by the projected light, and whether the reflected light matches the preset optical signal sample, if present and matched, It is determined that the detection object is a living body; since the solution does not need to perform cumbersome interaction operations and operations with the user, the requirement for hardware configuration can be greatly reduced, and the basis for the living body discrimination is to detect the reflection of the preset part of the object.
  • the solution can effectively resist synthetic face attacks and improve The accuracy of the discrimination; therefore, in summary, the program can improve the living body Test results, to improve the accuracy of authentication and security.
  • the embodiment of the present invention further provides a terminal.
  • the terminal may include a radio frequency (RF) circuit 401, a memory 402 including one or more computer readable storage media, and an input unit. 403.
  • RF radio frequency
  • the terminal structure shown in FIG. 4 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements. among them:
  • the RF circuit 401 can be used for transmitting and receiving information or during a call, and receiving and transmitting signals. Specifically, after receiving downlink information of the base station, the downlink information is processed by one or more processors 408. In addition, the data related to the uplink is sent to the base station. .
  • the RF circuit 401 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, and a low noise amplifier (LNA, Low Noise Amplifier), duplexer, etc. In addition, the RF circuit 401 can also communicate with the network and other devices through wireless communication.
  • SIM Subscriber Identity Module
  • LNA Low Noise Amplifier
  • the wireless communication can use any communication standard or protocol, including but not limited to a global mobile communication system (GSM, Global System of Mobile communication), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA) , Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), etc.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS Short Messaging Service
  • the memory 402 can be used to store software programs and modules, and the processor 408 executes various functional applications and data processing by running software programs and modules stored in the memory 402.
  • the memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of the terminal (such as audio data, phone book, etc.).
  • memory 402 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 402 may also include a memory controller to provide access to memory 402 by processor 408 and input unit 403.
  • Input unit 403 can be used to receive input numeric or character information, as well as to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
  • input unit 403 can include a touch-sensitive surface as well as other input devices.
  • Touch-sensitive surfaces also known as touch screens or trackpads, collect touch operations on or near the user (such as the user using a finger, stylus, etc., any suitable object or accessory on a touch-sensitive surface or touch-sensitive Operation near the surface), and drive the corresponding connecting device according to a preset program.
  • the touch sensitive surface may include two parts of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 408 is provided and can receive commands from the processor 408 and execute them.
  • touch-sensitive surfaces can be implemented in a variety of types, including resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 403 can also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • Display unit 404 can be used to display information entered by the user or information provided to the user, as well as various graphical user interfaces of the terminal, which can be composed of graphics, text, icons, video, and any combination thereof.
  • the display unit 404 can include a display panel.
  • the display panel can be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
  • the touch sensitive surface can cover the display panel when the touch sensitive surface is detected in it Upon or near a touch operation, the processor 408 is passed to determine the type of touch event, and the processor 408 then provides a corresponding visual output on the display panel based on the type of touch event.
  • the touch-sensitive surface and display panel are implemented as two separate components to perform input and input functions, in some embodiments, the touch-sensitive surface can be integrated with the display panel to implement input and output functions.
  • the terminal may also include at least one type of sensor 405, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may close the display panel and/or the backlight when the terminal moves to the ear.
  • the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the terminal can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • the audio circuit 406, the speaker, and the microphone provide an audio interface between the user and the terminal.
  • the audio circuit 406 can transmit the converted electrical signal of the audio data to the speaker, and convert it into a sound signal output by the speaker; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 406 and then converted.
  • the audio data is then processed by the audio data output processor 408, sent via RF circuitry 401 to, for example, another terminal, or the audio data is output to memory 402 for further processing.
  • the audio circuit 406 may also include an earbud jack to provide communication between the peripheral earphone and the terminal.
  • WiFi is a short-range wireless transmission technology
  • the terminal can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 407, which provides wireless broadband Internet access for users.
  • FIG. 4 shows the WiFi module 407, it can be understood that it does not belong to the necessary configuration of the terminal, and can be omitted as needed within the scope of not changing the essence of the invention.
  • Processor 408 is the control center of the terminal, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in memory 402, and by invoking data stored in memory 402, The various functions of the terminal and processing data to monitor the mobile phone as a whole.
  • the processor 408 may include one or more processing cores; preferably, the processor 408 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 408.
  • the terminal also includes a power source 409 (such as a battery) that supplies power to the various components.
  • the power source can be logically coupled to the processor 408 through the power management system for power management.
  • the system manages functions such as charging, discharging, and power management.
  • the power supply 409 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
  • the terminal may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the memory 402 described above will store one or more programs and be configured to be executed by one or more processors 408.
  • the one or more programs described above may include the following instruction modules:
  • the receiving unit 301 is configured to receive a living body detection request.
  • the starting unit 302 is configured to start a light source according to the living body detection request, and the light source is used to project light to the detection object;
  • the monitoring unit 303 is configured to monitor the detection object to obtain an image sequence
  • the detecting unit 304 is configured to determine, when the reflected light signal generated by the projected light is present in the preset portion of the detection object in the image sequence, and the reflected light signal matches the preset optical signal sample,
  • the test object is a living body.
  • the processor 408 in the terminal loads the executable file corresponding to the process of one or more applications into the memory 402 according to the following instruction, and the processor 408 runs the application stored in the memory 402, thereby Achieve a variety of functions:
  • Receiving a living body detection request starting a light source according to the living body detection request, wherein the light source is used for projecting light to the detection object, and the object is monitored to obtain a sequence of images, and when the predetermined portion of the detection object in the image sequence is determined to have the projected light When the generated reflected light signal matches the preset optical signal sample, the detected object is determined to be a living body.
  • the method for determining whether the preset portion of the detection object in the image sequence has the reflected light signal generated by the projected light, and determining whether the reflected light signal matches the preset optical signal sample may be various. For details, refer to the foregoing. The embodiment is not described here.
  • the light source may be implemented in various manners, for example, by adjusting the brightness of the screen of the terminal, or by using other light-emitting components such as a flash or an infrared emitter or an external device, or By setting a color mask on the display interface, etc., that is, the application in the memory 402 can also implement the following functions:
  • the screen brightness is adjusted according to the living body detection request such that the screen as a light source projects light to the detection object.
  • the preset light-emitting component is turned on according to the living body detection request, so that the light-emitting component emits light as a light source to the detection object.
  • the light emitting part may comprise a component such as a flash lamp or an infrared emitter.
  • the detection interface is activated according to the living body detection request, and the detection interface may flash a color mask, and the color mask is used as a light source to project light to the detection object.
  • the area of the flashing color mask may be determined according to the requirements of the actual application.
  • the detecting interface may include a detecting area and a non-detecting area, and the detecting area is mainly used for displaying a monitoring situation, and the non-detecting area may be used.
  • the color mask is used as a light source to project light to the detection object, and so on.
  • the color mask and other parameters of the color mask can be set according to the requirements of the actual application, and the color mask can be preset by the system and directly retrieved when the detection interface is started, or It can also be automatically generated after receiving the biometric detection request, that is, the application stored in the memory 402, and can also implement the following functions:
  • a color mask is generated such that the light projected by the color mask can be changed according to a preset rule and the intensity of the change of the light is maximized.
  • the color selection may be selected to be the most robust to signal analysis. Color space.
  • the image sequence may also be subjected to denoising processing, that is, the application stored in the memory 402 may also implement the following functions. :
  • the image sequence is subjected to denoising processing.
  • the noise model as Gaussian noise as an example, it is possible to use timing multi-frame averaging and/or co-frame multi-scale averaging to reduce noise as much as possible, and the like.
  • the terminal when the terminal needs to perform the living body detection, the terminal can start the light source to project the light to the detection object, monitor the detection object, and then determine whether the preset part of the detection object exists in the monitored image sequence. Projecting a reflected light signal generated by the light, and whether the reflected light signal matches the preset optical signal sample, and if present and matched, determining that the detected object is a living body; since the solution does not require complicated interaction and operation with the user, Therefore, the requirement for the hardware configuration can be greatly reduced, and the basis for the living body discrimination is to detect the reflected light signal of the preset part of the object, and the real living body and the forged living body (the composite picture or video carrier, such as a photo) The reflected light signal of the mobile phone or tablet computer is different. Therefore, the solution can also effectively resist the synthetic face attack and improve the accuracy of the discrimination; therefore, in short, the solution can be limited in the terminal, especially the mobile terminal. Improve the detection of living body under hardware configuration, thus improving the identification The
  • the storage medium may include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like.
  • an embodiment of the present invention further provides a storage medium in which a data processing program is stored, and the data processing program is used to execute any one of the foregoing methods of the embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Biology (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Geometry (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Image Analysis (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

A living body detection method and an apparatus, comprising: when detection of a living body is required, a detection subject may be monitored; then determining whether or not a reflected optical signal is present in a pre-set position of the detection subject in an image sequence obtained by means of monitoring, and whether or not said reflected optical signal matches a pre-set optical signal sample; if present and matching, determining the detection subject as a living body.

Description

一种活体检测方法、装置及存储介质Living body detecting method, device and storage medium
本申请要求于2016年12月30日提交中国专利局、申请号为201611257052.2、发明名称为“一种活体检测方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201611257052.2, the entire disclosure of which is incorporated herein in .
技术领域Technical field
本发明涉及通信技术领域,具体涉及一种活体检测方法、装置及存储介质。The present invention relates to the field of communications technologies, and in particular, to a living body detecting method, apparatus, and storage medium.
背景background
近年来,身份验证技术,如指纹识别、眼纹识别、虹膜识别、以及人脸识别等都得到了极大的发展。其中,人脸识别技术最为突出,其已经越来越广泛地应用到各类身份认证系统中。In recent years, identity verification technologies such as fingerprint recognition, eye pattern recognition, iris recognition, and face recognition have been greatly developed. Among them, face recognition technology is the most prominent, and it has been more and more widely applied to various identity authentication systems.
基于人脸识别的身份认证系统,主要需要解决两个问题,一个是人脸验证,另一是活体检测。其中,活体检测主要是用来确认采集到的人脸图像等数据是来自用户本人,而不是回放或者伪造材料。针对目前活体检测的攻击手段,比如照片攻击、视频回放攻击、合成人脸攻击等,提出了“随机化交互”技术,所谓“随机化交互”技术,指的是由视频中面部不同部位的运动变化切入,融入需要用户主动配合的随机化交互动作,比如眨眼、摇头、或唇语识别,等等,并据此来判断检测对象是否为活体,等等。The identity authentication system based on face recognition mainly needs to solve two problems, one is face verification and the other is living body detection. Among them, the living body detection is mainly used to confirm that the collected face image and the like are from the user himself, rather than playing back or forging materials. Aiming at the current methods of detecting live objects, such as photo attacks, video playback attacks, synthetic face attacks, etc., a "randomized interaction" technique is proposed. The so-called "randomized interaction" technology refers to the movement of different parts of the face in the video. The change is cut in, and the random interactions that require the user's active cooperation, such as blinking, shaking, or lip recognition, etc., are used to judge whether the detected object is a living body or the like.
技术内容Technical content
本发明实施例提供一种活体检测方法,包括:An embodiment of the present invention provides a living body detecting method, including:
接收活体检测请求;Receiving a living body detection request;
对所述检测对象进行监控,得到图像序列;Monitoring the detected object to obtain an image sequence;
当确定所述图像序列中所述检测对象的预设部位存在反射光信号时,确定所述反射光信号是否与预设光信号样本匹配;以及Determining whether the reflected light signal matches a preset optical signal sample when determining that there is a reflected light signal in the preset portion of the detection object in the image sequence;
当所述反射光信号与预设光信号样本匹配时,确定所述检测对象为活体。When the reflected light signal matches the preset light signal sample, it is determined that the detection object is a living body.
相应的,本发明实施例还提供一种活体检测装置,包括:Correspondingly, the embodiment of the invention further provides a living body detecting device, comprising:
一个或一个以上存储器;一个或一个以上处理器;其中,所述一个或一个以上存储器存储有一个或者一个以上指令模块,经配置由所 述一个或者一个以上处理器执行;其中,所述一个或者一个以上指令模块包括:One or more memories; one or more processors; wherein the one or more memories store one or more instruction modules, configured by Executing one or more processors to execute; wherein the one or more instruction modules include:
接收单元,用于接收活体检测请求;a receiving unit, configured to receive a living body detection request;
监控单元,用于对所述检测对象进行监控,得到图像序列;a monitoring unit, configured to monitor the detection object to obtain an image sequence;
检测单元,用于当确定所述图像序列中所述检测对象的预设部位存在反射光信号时,确定所述反射光信号是否与预设光信号样本匹配;以及当所述反射光信号与预设光信号样本匹配时,确定所述检测对象为活体。a detecting unit, configured to determine whether the reflected light signal matches a preset optical signal sample when determining that the preset portion of the detection object has a reflected light signal in the image sequence; and when the reflected light signal and the When the optical signal samples are matched, it is determined that the detection object is a living body.
本申请还提出了一种非易失性计算机可读存储介质,存储有计算机可读指令,可以使至少一个处理器执行以上所述的方法。The present application also proposes a non-transitory computer readable storage medium storing computer readable instructions that cause at least one processor to perform the methods described above.
附图简要说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings can also be obtained from those skilled in the art based on these drawings without paying any creative effort.
图1a是本发明实施例提供的活体检测方法的场景示意图;FIG. 1 is a schematic diagram of a scene of a living body detecting method according to an embodiment of the present invention;
图1b是本发明实施例提供的活体检测方法的另一场景示意图;FIG. 1b is another schematic diagram of a living body detecting method according to an embodiment of the present invention;
图1c是本发明实施例提供的活体检测方法的流程图;FIG. 1c is a flowchart of a living body detecting method according to an embodiment of the present invention;
图2是本发明实施例提供的活体检测方法的另一流程图;2 is another flowchart of a living body detecting method according to an embodiment of the present invention;
图3a是本发明实施例提供的活体检测装置的结构示意图;FIG. 3 is a schematic structural diagram of a living body detecting apparatus according to an embodiment of the present invention; FIG.
图3b是本发明实施例提供的活体检测装置的另一结构示意图;FIG. 3b is another schematic structural diagram of a living body detecting apparatus according to an embodiment of the present invention; FIG.
图4是本发明实施例提供的终端的结构示意图。FIG. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
在对现有技术的研究和实践过程中,现有方案活体检测所采用的算法,其判别的准确率并不高,而且,也无法有效抵挡合成人脸攻击,另外,繁琐的主动交互也会大大降低正确样本的通过率,所以,整体而言,现有方案的活体检测效果并不佳,大大影响身份验证的准确性和安全性。In the research and practice of the prior art, the algorithm used in the existing scheme for living body detection has a low accuracy, and it cannot effectively resist synthetic face attacks. In addition, the cumbersome active interaction will also The pass rate of the correct sample is greatly reduced, so overall, the in vivo detection of the existing scheme is not good, which greatly affects the accuracy and security of the authentication.
有鉴于此,本发明实施例提供一种活体检测方法和装置。 In view of this, embodiments of the present invention provide a living body detecting method and apparatus.
其中,该活体检测装置具体可以集成在终端等设备中,它可以利用终端的屏幕光强和颜色变化、或利用闪光灯或红外发射器等其他部件或设备作为光源,投射至检测对象上,然后,通过分析接收到的图像序列中检测对象的预设部位,比如面部的反射光信号,来进行活体检测。The living body detecting device may be specifically integrated in a device such as a terminal, and may use the screen light intensity and color change of the terminal, or use other components or devices such as a flash or an infrared emitter as a light source to project onto the detection object, and then, The living body detection is performed by analyzing a preset portion of the detected object in the received image sequence, such as a reflected light signal of the face.
例如,以集成在终端中,且该光源为一颜色遮罩为例,当终端接收到活体检测请求时,可以根据该活体检测请求启动检测界面,其中,如图1a所示,该检测界面除了设置有检测区域之外,还设置有一非检测区域(图1a中所标记的灰色部分),主要用于闪现颜色遮罩,该颜色遮罩可以作为光源向检测对象投射光线,比如,可参见图1b。由于真正的活体与伪造的活体(合成图片或视频的载体,如相片、手机或平板电脑等)的反射光信号是不同的,因此,可以通过判断检测对象的预设部位是否存在该投射光线所产生的反射光信号,且该反射光信号是否与预设光信号样本匹配,来对活体进行判别,譬如,可以对该检测对象进行监控(可以通过该检测界面中的检测区域对监控的情况进行显示),然后,确定监控得到的图像序列中检测对象的预设部位是否存在该投射光线所产生的反射光信号,且该反射光信号是否与预设光信号样本匹配,若存在且与预设光信号样本匹配,则确定该检测对象为活体,否则,若不存在或与预设光信号样本不匹配,则确定该检测对象为非活体,等等。For example, in the case where the terminal is integrated in the terminal and the light source is a color mask, when the terminal receives the living body detection request, the detection interface can be started according to the living body detection request, wherein, as shown in FIG. 1a, the detection interface is In addition to the detection area, a non-detection area (the gray part marked in Fig. 1a) is also provided, which is mainly used for flashing a color mask, which can be used as a light source to project light to the detection object, for example, see 1b. Since the reflected light signal of the real living body and the forged living body (the carrier of the composite picture or video, such as a photo, a mobile phone or a tablet computer) is different, it is possible to determine whether or not the projected light is present in the preset portion of the detection object. And generating a reflected light signal, and the reflected light signal is matched with the preset light signal sample to determine the living body, for example, the detection object can be monitored (the monitoring situation can be performed by using the detection area in the detection interface) Displaying, and then determining whether the preset portion of the detected object in the monitored image sequence has a reflected light signal generated by the projected light, and whether the reflected light signal matches the preset optical signal sample, if present and preset If the optical signal samples match, it is determined that the detection object is a living body, otherwise, if it does not exist or does not match the preset optical signal sample, it is determined that the detection object is not a living body, and the like.
以下分别进行详细说明。需说明的是,以下实施例的序号不作为对实施例优选顺序的限定。The details are described below separately. It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
实施例一、Embodiment 1
本实施例将从终端的活体检测装置(简称活体检测装置)的角度进行描述,该活体检测装置具体可以集成在终端等设备中,该终端具体可以为手机、平板电脑、笔记本电脑或个人计算机(PC,Personal Computer)等设备。The present embodiment will be described from the perspective of a living body detecting device (hereinafter referred to as a living body detecting device), which may be integrated into a device such as a terminal, which may be a mobile phone, a tablet computer, a notebook computer or a personal computer ( PC, Personal Computer) and other devices.
一种活体检测方法,包括:接收活体检测请求,根据该活体检测请求启动光源,其中,该光源用于向检测对象投射光线,对该检测对象进行监控,以得到图像序列,当确定该图像序列中检测对象的预设部位存在该投射光线所产生的反射光信号,且该反射光信号与预设光信号样本匹配时,确定该检测对象为活体。A living body detecting method includes: receiving a living body detecting request, and starting a light source according to the living body detecting request, wherein the light source is used for projecting light to the detecting object, and monitoring the detecting object to obtain an image sequence, when determining the image sequence The preset part of the detection object has a reflected light signal generated by the projected light, and when the reflected light signal matches the preset light signal sample, the detected object is determined to be a living body.
如图1c所示,该活体检测方法的具体流程可以如下:As shown in FIG. 1c, the specific process of the living body detection method can be as follows:
101、接收活体检测请求。101. Receive a living body detection request.
例如,具体可以接收用户触发的活体检测请求,或者,也可以接收其他设备发送的活体检测请求,等等。For example, the biometric detection request triggered by the user may be received, or the biometric detection request sent by another device may be received, and the like.
在本申请的实施例中,在接收活体检测请求之后,可以根据该活 体检测请求启动光源,该光源用于向检测对象投射光线。In the embodiment of the present application, after receiving the living body detection request, according to the activity The body detection request activates a light source for projecting light to the detection object.
例如,具体可以根据该活体检测请求调用相应的活体检测进程,根据该活体检测进程启动光源,等等。For example, the corresponding living body detection process may be invoked according to the living body detection request, the light source is activated according to the living body detection process, and the like.
其中,该光源可以根据实际应用的需求进行设置,比如,可以通过调节终端屏幕的亮度来实现,或者,也可以利用闪光灯或红外发射器等其他发光部件或外置设备来实现、或者,还可以通过在显示界面上设置一颜色遮罩来实现,等等,即步骤“根据该活体检测请求启动光源”具体可以采用如下任意一种方式来实现:The light source can be set according to the needs of the actual application, for example, by adjusting the brightness of the terminal screen, or by using other light-emitting components such as a flash or an infrared emitter or an external device, or The method is implemented by setting a color mask on the display interface, and the like, that is, the step of “starting the light source according to the living body detection request” may be implemented by any one of the following methods:
(1)根据该活体检测请求调整屏幕亮度,使得该屏幕作为光源向检测对象投射光线。(1) Adjusting the brightness of the screen according to the living body detection request, so that the screen as a light source projects light to the detection object.
(2)根据该活体检测请求开启预设发光部件,使得该发光部件作为光源向检测对象投射光线。(2) The predetermined light-emitting component is turned on according to the living body detection request, so that the light-emitting component emits light as a light source to the detection object.
其中,该发光部件可以包括闪光灯或红外发射器等部件。Wherein, the light emitting part may comprise a component such as a flash lamp or an infrared emitter.
(3)根据该活体检测请求启动检测界面,该检测界面可以闪现颜色遮罩,该颜色遮罩作为光源向检测对象投射光线。(3) Starting a detection interface according to the living body detection request, the detection interface may flash a color mask, and the color mask is used as a light source to project light to the detection object.
其中,该闪现颜色遮罩的区域可以根据实际应用的需求而定,例如,该检测界面可以包括检测区域和非检测区域,检测区域主要用于对监控情况进行显示,而该非检测区域可以用于闪现颜色遮罩,该颜色遮罩作为光源向检测对象投射光线,等等。The area of the flashing color mask may be determined according to the requirements of the actual application. For example, the detecting interface may include a detecting area and a non-detecting area, and the detecting area is mainly used for displaying a monitoring situation, and the non-detecting area may be used. In the flash color mask, the color mask is used as a light source to project light to the detection object, and so on.
其中,该颜色遮罩的颜色和透明度等参数可以根据实际应用的需求进行设置,该颜色遮罩可以由系统预先进行设定,并在启动检测界面时直接调取,或者,也可以在接收到活体检测请求之后自动生成,即在步骤“接收活体检测请求”之后,该活体检测方法还可以包括:The color mask and other parameters of the color mask can be set according to the requirements of the actual application. The color mask can be preset by the system and directly retrieved when the detection interface is started, or can be received at the same time. After the biometric detection request is automatically generated, that is, after the step of receiving the biometric detection request, the biometric detection method may further include:
生成颜色遮罩,使得该颜色遮罩所投射出的光线能够按照预设规律进行变化。A color mask is generated such that the light projected by the color mask can be changed according to a preset rule.
可选的,为了便于后续可以更好地识别出光线的变化,还可以最大化该光线的变化强度。Optionally, in order to facilitate the subsequent recognition of the change of the light, the intensity of the change of the light can also be maximized.
其中,该预设规律可以根据实际应用的需求而定,而最大化该光线的变化强度的方式也可以有多种,例如,对于同颜色的光线,可以通过调整变化前后的屏幕亮度来最大化光线的变化强度,比如,让变化前后的屏幕亮度设置为最大和最小,而对于不同颜色的光线,则可以通过调整变化前后的色差来最大化光线的变化强度,等等。The preset rule may be determined according to the needs of the actual application, and the manner of maximizing the intensity of the change of the light may also be various. For example, for the same color of light, the brightness of the screen before and after the change may be maximized. The intensity of the change of light, for example, the brightness of the screen before and after the change is set to the maximum and minimum, and for the light of different colors, the intensity of the change of the light can be maximized by adjusting the color difference before and after the change, and so on.
可选的,为了后续可以更好地从图像帧间差中检测出反射光信号,除了可以最大化该光线的变化强度之外,还可以在颜色的选择上,尽量选择对信号分析最鲁棒的颜色空间,比如,在色彩模型(LAB)颜色空间下,屏幕由红色最亮转变到绿色最亮,其反射光的色度变化最大,等等。 Optionally, in order to better detect the reflected light signal from the image frame difference, in addition to maximizing the intensity of the change of the light, the color selection may be selected to be the most robust to signal analysis. The color space, for example, in the color model (LAB) color space, the screen changes from the brightest red to the brightest green, the chromaticity of the reflected light changes the most, and so on.
102、对该检测对象进行监控,得到图像序列。102. Monitor the detected object to obtain an image sequence.
例如,具体可以调用终端的摄像头,实时对检测对象进行拍摄,得到图像序列,并将拍摄得到的图像序列在该检测区域中进行显示,等等。For example, the camera of the terminal can be specifically called, the detection object is photographed in real time, an image sequence is obtained, and the captured image sequence is displayed in the detection area, and the like.
可选的,为了减少噪声所造成的数值浮动对信号的影响,在得到图像序列后,还可以对该图像序列进行去噪声处理。例如,以噪声模型为高斯噪声为例,具体可以使用时序上多帧平均和/或同帧多尺度平均来尽可能地减小噪声,在此不再赘述。Optionally, in order to reduce the influence of the numerical floating on the signal caused by the noise, after the image sequence is obtained, the image sequence may also be subjected to denoising processing. For example, taking the noise model as the Gaussian noise as an example, the timing multi-frame averaging and/or the same-frame multi-scale averaging can be used to reduce the noise as much as possible, and details are not described herein again.
103、当确定该图像序列中检测对象的预设部位存在反射光信号时,确定所述反射光信号是否与预设光信号样本匹配。103. Determine whether the reflected optical signal matches a preset optical signal sample when it is determined that the reflected portion of the detected object in the image sequence has a reflected light signal.
104、当反射光信号与预设光信号样本匹配时,确定该检测对象为活体。104. When the reflected optical signal matches the preset optical signal sample, determining that the detected object is a living body.
此外,在上述步骤中,若确定该图像序列中检测对象的预设部位不存在反射光信号或该反射光信号与预设光信号样本不匹配,则可确定该检测对象为非活体。In addition, in the above step, if it is determined that the reflected portion of the detected object in the image sequence does not have a reflected light signal or the reflected light signal does not match the preset optical signal sample, the detected object may be determined to be inactive.
在本申请的实施例中,上述反射信号可以由光源向所述检测对象投射的光线所产生。该光源可以是在接收活体检测请求之后根据该活体检测请求启动的,也可以是在其他情况下启动的。需要说明的是,本申请对于光源的启动方式以及时机不进行限定,只要是对该检测对象进行监控时有光线投射到检测对象的预设部位即可。In an embodiment of the present application, the reflected signal may be generated by a light source that is projected by the light source to the detection object. The light source may be activated according to the living body detection request after receiving the living body detection request, or may be initiated in other cases. It should be noted that the present application does not limit the manner and timing of starting the light source, and it is only necessary to project light to the predetermined portion of the detection target when monitoring the detection target.
其中,确定该图像序列中检测对象的预设部位是否存在反射光信号的方式可以有多种,例如,具体可以利用图像的帧间差来检测该反射光信息,比如,具体可以如下:The method for determining whether there is a reflected light signal in the preset part of the image sequence in the image sequence may be various. For example, the reflected light information may be detected by using the inter-frame difference of the image. For example, the specific information may be as follows:
(1)计算该图像序列中帧之间的差分。(1) Calculate the difference between frames in the image sequence.
其中,该帧之间的差分可以是帧间差,也可以是帧差,帧间差指的是相邻两帧之间的差,而帧差为投射光线变化前后所对应的帧之间的差。The difference between the frames may be an interframe difference or a frame difference, where the interframe difference refers to a difference between two adjacent frames, and the frame difference is between frames corresponding to before and after the change of the projected light. difference.
例如,以计算帧间差为例,具体可以在确定检测对象的位置变化程度小于预设变化值时,分别获取该图像序列中邻近帧的像素坐标,然后,基于该像素坐标计算帧间差。For example, in the calculation of the inter-frame difference, the pixel coordinates of the adjacent frames in the image sequence may be respectively acquired when determining that the position change degree of the detection object is less than the preset change value, and then the inter-frame difference is calculated based on the pixel coordinates.
又例如,以计算帧差为例,具体可以确定检测对象的位置变化程度小于预设变化值时,分别从该图像序列中获取投射光线变化前后所对应的帧的像素坐标,基于像素坐标计算帧差。For example, taking the frame difference as an example, when determining that the position change degree of the detection object is less than the preset change value, the pixel coordinates of the frame corresponding to the frame before and after the change of the projected light are respectively obtained from the image sequence, and the frame is calculated based on the pixel coordinates. difference.
其中,基于该像素坐标计算帧间差或帧差的方式可以有多种,比如,可以如下:The method for calculating the inter-frame difference or the frame difference based on the pixel coordinates may be various, for example, as follows:
对邻近帧的像素坐标进行变换,以最小化该像素坐标的配准误差,根据变换结果筛选出相关性符合预设条件的像素点,根据筛选出 的像素点计算帧间差。Transforming pixel coordinates of adjacent frames to minimize the registration error of the pixel coordinates, and filtering out pixel points whose correlation meets the preset condition according to the transformation result, according to the screening The pixel points calculate the interframe difference.
或者,对投射光线变化前后所对应的帧的像素坐标进行变换,以最小化该像素坐标的配准误差,根据变换结果筛选出相关性符合预设条件的像素点,根据筛选出的像素点计算帧差。Alternatively, the pixel coordinates of the frame corresponding to the change of the projected light are transformed to minimize the registration error of the pixel coordinate, and the pixel corresponding to the preset condition is selected according to the transformation result, and the pixel is calculated according to the selected pixel point. Frame difference.
其中,预设变化值和预设条件均可根据实际应用的需求进行设置,在此不再赘述。The preset change value and the preset condition may be set according to actual application requirements, and details are not described herein again.
需说明的是,若确定检测对象的位置变化程度大于等于预设变化值,则可从图像序列中获取其他的邻近帧或其他投射光线变化前后所对应的帧来进行计算,或重新获取图像序列。It should be noted that, if it is determined that the position change degree of the detection object is greater than or equal to the preset change value, other adjacent frames or other frames corresponding to the change of the projected light may be acquired from the image sequence to perform calculation, or the image sequence may be reacquired. .
(2)根据该帧之间的差分(比如帧间差或帧差)确定该图像序列中检测对象的预设部位是否存在该投射光线所产生的反射光信号,例如,具体可以采用如下任意一种方式:(2) determining, according to the difference between the frames (such as the interframe difference or the frame difference), whether the preset part of the detection object in the image sequence has a reflected light signal generated by the projected light. For example, any one of the following may be used. Ways:
第一种方式:The first way:
确定该帧之间的差分(比如帧间差或帧差)是否大于预设阈值,若是,则确定该图像序列中检测对象的预设部位存在该投射光线所产生的反射光信号,若否,则确定该图像序列中检测对象的预设部位不存在该投射光线所产生的反射光信号。Determining whether a difference between the frames (such as an interframe difference or a frame difference) is greater than a preset threshold, and if so, determining that a reflected light signal generated by the projected light exists in a preset portion of the detected object in the image sequence, and if not, Then, it is determined that the reflected portion of the detected object in the image sequence does not have a reflected light signal generated by the projected light.
其中,该预设阈值可以根据实际应用的需求而定,在此不再赘述。The preset threshold may be determined according to the requirements of the actual application, and details are not described herein again.
第二种方式:The second way:
通过预设全局特征算法或分类器对该差分(比如帧间差或帧差)进行分类分析,若分析结果指示检测对象的预设部位的帧间变化大于设定值,则确定该图像序列中检测对象的预设部位存在该投射光线所产生的反射光信号,若分析结果指示检测对象的预设部位的帧间变化不大于设定值,则确定该图像序列中检测对象的预设部位不存在该投射光线所产生的反射光信号。The difference (such as inter-frame difference or frame difference) is classified and analyzed by a preset global feature algorithm or a classifier, and if the analysis result indicates that the inter-frame variation of the preset portion of the detection object is greater than a set value, determining the image sequence The reflected light signal generated by the projected light is present in the preset portion of the detection object. If the analysis result indicates that the inter-frame change of the preset portion of the detection object is not greater than the set value, it is determined that the preset portion of the detected object in the image sequence is not There is a reflected light signal generated by the projected light.
其中,该设定值可以根据实际应用的需求而定,而该“通过预设全局特征算法或分类器对该帧间差进行分类分析”的方式也可以有多种,例如,可以如下:The setting value may be determined according to the requirements of the actual application, and the manner of “classifying and analyzing the inter-frame difference by using a preset global feature algorithm or a classifier” may also be various, for example, as follows:
对该差分(比如帧间差或帧差)进行分析,以判断该图像序列中是否存在该投射光线所产生的反射光信号,若不存在该投射光线所产生的反射光信号,则生成指示检测对象的预设部位的帧间变化不大于设定值的分析结果;若存在该投射光线所产生的反射光信号,则通过预设全局特征算法或分类器判断存在的反射光信息的反射体是否为该检测对象的预设部位,若为该预设部位,则生成指示检测对象的预设部位的帧间变化大于设定值的分析结果,若不是该预设部位,则生成指示检测对象的预设部位的帧间变化不大于设定值的分析结果。The difference (such as the interframe difference or the frame difference) is analyzed to determine whether the reflected light signal generated by the projected light exists in the image sequence, and if the reflected light signal generated by the projected light does not exist, the indication detection is generated. The inter-frame change of the preset part of the object is not greater than the analysis result of the set value; if there is a reflected light signal generated by the projected light, whether the reflector of the reflected light information existing is determined by a preset global feature algorithm or a classifier If the preset part is the preset part, the analysis result indicating that the inter-frame change of the preset part of the detection target is greater than the set value is generated, and if it is not the preset part, generating the indication object The interframe change of the preset part is not greater than the analysis result of the set value.
或者,也可以通过预设全局特征算法或分类器对该图像序列中的 图像进行分类,以筛选出存在该预设部位的帧,得到候选帧,分析该候选帧的帧间差,以判断该预设部位是否存在该投射光线所产生的反射光信号,若不存在该投射光线所产生的反射光信号,则生成指示检测对象的预设部位的帧间变化不大于设定值的分析结果;若存在该投射光线所产生的反射光信号,则生成指示检测对象的预设部位的帧间变化大于设定值的分析结果,等等。Alternatively, the preset global feature algorithm or classifier can be used in the sequence of images. The image is classified to filter out the frame in which the preset portion exists, and the candidate frame is obtained, and the inter-frame difference of the candidate frame is analyzed to determine whether the reflected light signal generated by the projected light exists in the preset portion. Generating a reflected light signal generated by the light to generate an analysis result indicating that the inter-frame change of the preset portion of the detection target is not greater than a set value; and if there is a reflected light signal generated by the projected light, generating a pre-detection target Let the interframe change of the part be larger than the analysis result of the set value, and so on.
其中,全局特征算法指的是基于全局特征的算法,其中,全局特征可以包括灰度的均值方差、灰度共生矩阵、快速傅氏变换(FFT,Fast Fourier Transformation)和离散余弦变换(DCT,Discrete cosine transform)等变换后的频谱。分类器可以包括支持向量机(SVM,Support Vector Machine)、神经网络和决策树等。The global feature algorithm refers to an algorithm based on global features, wherein the global features may include mean variance of gray scale, gray level co-occurrence matrix, fast Fourier transform (FFT, Fast Fourier Transformation) and discrete cosine transform (DCT, Discrete) Cosine transform) The transformed spectrum. The classifier can include a Support Vector Machine (SVM), a neural network, a decision tree, and the like.
可选的,确定反射光信号是否与预设光信号样本匹配的方式也可以有多种,例如,可以采用如下任意一种方式:Optionally, the method for determining whether the reflected optical signal matches the preset optical signal sample may also be multiple. For example, any one of the following methods may be adopted:
分析反射光信号中的参数是否与预设光信号样本中的参数匹配,若匹配,则确定反射光信号与预设光信号样本匹配,若不匹配,则确定反射光信号与预设光信号样本不匹配。Analyzing whether the parameter in the reflected light signal matches the parameter in the preset optical signal sample, and if yes, determining that the reflected light signal matches the preset optical signal sample, and if not, determining the reflected light signal and the preset optical signal sample Mismatch.
比如,具体可以确定反射光信号中的参数值与预设光信号样本中的参数值的差是否小于预设差值范围,若小于预设差值范围,则表明反射光信号中的参数值与预设光信号样本中的参数值匹配,若大于预设差值范围,则表明反射光信号中的参数值与预设光信号样本中的参数值不匹配,等等。For example, it may be specifically determined whether a difference between a parameter value in the reflected optical signal and a parameter value in the preset optical signal sample is less than a preset difference range, and if less than the preset difference range, indicating a parameter value in the reflected optical signal The parameter values in the preset optical signal samples match, and if greater than the preset difference range, it indicates that the parameter values in the reflected optical signal do not match the parameter values in the preset optical signal samples, and the like.
或者,也可以通过分析反射光信号在图像上所呈现的形状与预设光信号样本图像上所呈现的形状是否匹配,来确定反射光信号是否与预设光信号样本匹配,比如,如果反射光信号在图像上所呈现的形状与预设光信号样本图像上所呈现的形状的相似度大于设定值,则确定反射光信号与预设光信号样本匹配,否则,如果反射光信号在图像上所呈现的形状与预设光信号样本图像上所呈现的形状的相似度小于等于设定值,则确定反射光信号与预设光信号样本不匹配,等等。Alternatively, it is also possible to determine whether the reflected light signal matches the preset optical signal sample by analyzing whether the shape of the reflected light signal on the image matches the shape presented on the preset light signal sample image, for example, if the reflected light The similarity between the shape of the signal presented on the image and the shape presented on the image of the preset optical signal sample is greater than the set value, and then the reflected light signal is determined to match the preset optical signal sample; otherwise, if the reflected light signal is on the image The similarity between the rendered shape and the shape presented on the preset optical signal sample image is less than or equal to the set value, then it is determined that the reflected optical signal does not match the preset optical signal sample, and so on.
其中,该预设光信号样本、预设差值范围和设定值可以根据实际应用的需求进行设置,比如,如果需要对人的面部进行活体测试,则可以将该投射光线照射在人的面部上后会产生的发射光信号的共性作为该预设光信号样本,并可以据此设定相应的各个参数可能会产生的误差范围,以作为预设差值范围,或者,也可以据此设定相应的形状(比如人的面部一般具有人的五官、以及五官的大致样子和位置等等)相似度的设定值,等等,在此不再赘述。The preset optical signal sample, the preset difference range, and the set value may be set according to actual application requirements. For example, if a human body part needs to be tested in vivo, the projected light may be irradiated on the person's face. The commonality of the emitted light signals generated after the above is taken as the preset optical signal sample, and the error range that may be generated by the corresponding parameters may be set accordingly as the preset difference range, or may be set accordingly. The corresponding shape (such as the face of a person generally has the facial features of the person, and the general appearance and position of the facial features, etc.) the set value of the similarity, and so on, and will not be described again here.
由上可知,本实施例在需要进行活体检测时,可以启动光源向检测对象投射光线,并对该检测对象进行监控,然后确定监控得到的图 像序列中检测对象的预设部位是否存在该投射光线所产生的反射光信号,且该反射光信号是否与预设光信号样本匹配,如果存在且匹配,则确定该检测对象为活体;由于该方案无需与用户进行繁琐的交互操作和运算,因此,可以大大减低对硬件配置的需求,而且,由于该方案进行活体判别的依据是检测对象预设部位的反射光信号,而真正的活体与伪造的活体(合成图片或视频的载体,比如相片、手机或平板电脑等)的反射光信号是不同的,因此,该方案也可以有效抵挡合成人脸攻击,提高判别的准确性;所以,总而言之,该方案可以提高活体检测效果,从而提高身份验证的准确性和安全性。As can be seen from the above, in the embodiment, when the living body detection is required, the light source can be started to project light to the detection object, and the detection object is monitored, and then the monitored image is determined. Whether the reflected light signal generated by the projected light exists in the preset portion of the detected object in the sequence, and whether the reflected light signal matches the preset optical signal sample, and if present and matched, determining that the detected object is a living body; The solution does not require complicated interaction and operation with the user, and therefore, the requirement for hardware configuration can be greatly reduced. Moreover, since the scheme is based on detecting the reflected light signal of the preset part of the object, the real living body and forgery are The reflected light signal of the living body (the carrier of the composite picture or video, such as photos, mobile phones or tablets) is different. Therefore, the scheme can also effectively resist the synthetic face attack and improve the accuracy of the discrimination; therefore, in short, This solution can improve the detection of living organisms, thereby improving the accuracy and security of authentication.
实施例二、Embodiment 2
根据实施例一所描述的方法以下将举例作进一步详细说明。The method described in the first embodiment will be further described in detail below by way of example.
在本实施例中,将以该活体检测装置具体集成在终端中,光源具体为颜色遮罩,且检测对象的预设部位具体为人的面部为例进行说明。In this embodiment, the living body detecting device is specifically integrated in the terminal, and the light source is specifically a color mask, and the preset portion of the detecting object is specifically a human face as an example.
如图2所示,一种活体检测方法,具体流程可以如下:As shown in FIG. 2, a living body detection method can be as follows:
201、终端接收活体检测请求。201. The terminal receives a living body detection request.
例如,具体可以接收用户触发的活体检测请求,或者,也可以接收其他设备发送的活体检测请求,等等。For example, the biometric detection request triggered by the user may be received, or the biometric detection request sent by another device may be received, and the like.
比如,以用户触发为例,当用户启动该活体检测功能,比如点击活体检测的启动键时,便可以触发生成该活体检测请求,从而使得终端接收到该活体检测请求。For example, in the case of the user triggering, when the user activates the living body detecting function, for example, clicking the start button of the living body detection, the living body detecting request may be triggered to be generated, so that the terminal receives the living body detecting request.
202、终端生成颜色遮罩,使得该颜色遮罩所投射出的光线能够按照预设规律进行变化。202. The terminal generates a color mask, so that the light projected by the color mask can be changed according to a preset rule.
可选的,为了便于后续可以更好地识别出光线的变化,还可以最大化该光线的变化强度。Optionally, in order to facilitate the subsequent recognition of the change of the light, the intensity of the change of the light can also be maximized.
其中,该预设规律可以根据实际应用的需求而定,而最大化该光线的变化强度的方式也可以有多种,例如,对于同颜色的光线,可以通过调整变化前后的屏幕亮度来最大化光线的变化强度,比如,让变化前后的屏幕亮度设置为最大和最小,而对于不同颜色的光线,则可以通过调整变化前后的色差来最大化光线的变化强度,比如将屏幕由黑色最暗转变为白色最亮,等等。The preset rule may be determined according to the needs of the actual application, and the manner of maximizing the intensity of the change of the light may also be various. For example, for the same color of light, the brightness of the screen before and after the change may be maximized. The intensity of the light changes, for example, the brightness of the screen before and after the change is set to the maximum and minimum, and for the light of different colors, the intensity of the change of the light can be maximized by adjusting the color difference before and after the change, such as changing the screen from the darkest of black. The brightest white, and so on.
可选的,为了后续可以更好地从图像帧间差中检测出反射光信号,除了可以最大化该光线的变化强度之外,还可以在颜色的选择上,尽量选择对信号分析最鲁棒的颜色空间,比如,在色彩模型(LAB)颜色空间下,屏幕由红色最亮转变到绿色最亮,其反射光的色度变化最大,以此类推,等等。Optionally, in order to better detect the reflected light signal from the image frame difference, in addition to maximizing the intensity of the change of the light, the color selection may be selected to be the most robust to signal analysis. The color space, for example, in the color model (LAB) color space, the screen changes from red to brightest, green to brightest, its reflected light has the largest change in chromaticity, and so on.
203、终端根据该活体检测请求启动检测界面,并通过该检测界 面中的非检测区域闪现颜色遮罩,使得该颜色遮罩作为光源向检测对象,比如人的面部投射光线。203. The terminal starts the detection interface according to the living body detection request, and passes the detection boundary. The non-detection area in the face flashes a color mask such that the color mask acts as a light source to project light onto a subject, such as a person's face.
例如,具体可以根据该活体检测请求调用相应的活体检测进程,根据该活体检测进程启动相应的检测界面,等等。For example, the corresponding living body detection process may be invoked according to the living body detection request, the corresponding detection interface is started according to the living body detection process, and the like.
其中,该检测界面可以包括检测区域和非检测区域,检测区域主要用于对获取到的图像序列进行显示,而该非检测区域可以用于闪现颜色遮罩,该颜色遮罩作为光源向检测对象投射光线,具体可以参加图1b,这样,在检测对象上,便会因该光线而产生反射光,而且,根据光的颜色和强度等参数的不光,其产生的反射光也会有所区别。The detection interface may include a detection area and a non-detection area. The detection area is mainly used to display the acquired image sequence, and the non-detection area may be used to flash a color mask, and the color mask is used as a light source to detect the object. To project the light, you can participate in Figure 1b. In this way, the reflected light will be generated by the light on the object to be detected, and the reflected light will be different depending on the color and intensity of the light.
需说明的是,为了保证颜色遮罩所发射的光线可以投射至检测对象,该检测对象需要与该移动设备的屏幕保持在一定的距离内,比如,当用户需要检测某个人脸是否为活体时,可以将移动设备拿到该人脸的正前方距离适当的地方,以便对该人脸进行监控,等等。It should be noted that, in order to ensure that the light emitted by the color mask can be projected to the detection object, the detection object needs to be kept within a certain distance from the screen of the mobile device, for example, when the user needs to detect whether a certain face is a living body. You can take the mobile device to the right place directly in front of the face to monitor the face, and so on.
204、终端对该检测对象进行监控,以得到图像序列。204. The terminal monitors the detection object to obtain a sequence of images.
例如,具体可以调用终端的摄像头,实时对检测对象进行拍摄,得到图像序列,并将拍摄得到的图像序列在该检测区域中进行显示。For example, the camera of the terminal may be specifically called to capture the detected object in real time to obtain a sequence of images, and the captured image sequence is displayed in the detection area.
可选的,为了减少噪声所造成的数值浮动对信号的影响,在得到图像序列后,还可以对该图像序列进行去噪声处理。例如,以噪声模型为高斯噪声为例,具体可以使用时序上多帧平均和/或同帧多尺度平均来尽可能地减小噪声,在此不再赘述。Optionally, in order to reduce the influence of the numerical floating on the signal caused by the noise, after the image sequence is obtained, the image sequence may also be subjected to denoising processing. For example, taking the noise model as the Gaussian noise as an example, the timing multi-frame averaging and/or the same-frame multi-scale averaging can be used to reduce the noise as much as possible, and details are not described herein again.
205、终端计算该图像序列中的帧间差。205. The terminal calculates an interframe difference in the sequence of images.
其中,用帧间差来检测反射光信号,就需要图像序列中图像之间的二维像素点能够尽量的一一对应。因此,可以在检测用户面部没有剧烈位置变化的情况下,使用帧间对齐方法来更加精细的矫正作帧间差的像素对。即可以在确定检测对象的位置变化程度小于预设变化值时,分别获取该图像序列中邻近帧的像素坐标,然后,对该像素坐标进行变换,以最小化该像素坐标的配准误差,再基于变换结果来计算帧间差,例如,可以如下:Wherein, using the inter-frame difference to detect the reflected light signal requires that the two-dimensional pixel points between the images in the image sequence can be as one-to-one correspondence as possible. Therefore, the inter-frame alignment method can be used to more precisely correct the pixel pair of the inter-frame difference in the case where the user's face is detected without a sharp position change. That is, when determining that the position change degree of the detection object is less than the preset change value, respectively acquiring the pixel coordinates of the adjacent frame in the image sequence, and then transforming the pixel coordinates to minimize the registration error of the pixel coordinate, and then The interframe difference is calculated based on the result of the transform, for example, as follows:
令物体上的同一点在两张邻近帧I和I’的像素坐标分别为p=[x,y,w]T和p0=[x0,y0,w0]T,其中w为齐次坐标项,求解3*3变换矩阵M,如下:Let the pixel of the same point on the object in the two adjacent frames I and I' be p=[x,y,w] T and p 0 =[x 0 ,y 0 ,w 0 ] T , where w is Qi The secondary coordinate term solves the 3*3 transformation matrix M as follows:
[x',y',w']=Mp0 [x',y',w']=Mp 0
Figure PCTCN2017117958-appb-000001
Figure PCTCN2017117958-appb-000001
在这里,所采用的变换矩阵M的变换类型为自由度最高的单应性变换,从而可以最小化配准误差。 Here, the transformation type of the transformation matrix M employed is the homography transformation with the highest degree of freedom, so that the registration error can be minimized.
在最优化求解M的方法上,较常用的方法是均方误差(MSE,Mean Square Error)估计和随机抽样一致算法(RANSAC,Random Sample Consensus)。可选的,为了得到更鲁棒的结果,还可以使用单应流算法(homography flow)。In the method of optimizing the solution M, the more common methods are the Mean Square Error (MSE) estimation and the Random Sample Consensus (RANSAC, Random Sample Consensus). Alternatively, in order to obtain more robust results, a homography flow can also be used.
由于即便能求解出最优变换矩阵M,帧间还是有可能无法匹配的像素点,因此,可以筛选出相关性较强的像素点,而忽略掉相关性较弱的像素点,然后,基于筛选出的像素点再来作帧间差计算,从而一方面可以减少计算量,另一方面,可以增强结果,即可选的,步骤“基于变换结果来计算帧间差”可以包括:Since even if the optimal transformation matrix M can be solved, there may be pixels that cannot be matched between frames. Therefore, it is possible to filter out the pixels with strong correlation and ignore the pixels with weak correlation, and then, based on the screening. The pixel points are calculated for inter-frame difference, so that the amount of calculation can be reduced on the one hand, and the result can be enhanced on the other hand. Alternatively, the step "calculate the inter-frame difference based on the transformation result" can include:
根据变换结果筛选出相关性符合预设条件的像素点,并根据筛选出的像素点计算帧间差。According to the transformation result, the pixel points whose correlation is in accordance with the preset condition are filtered, and the inter-frame difference is calculated according to the selected pixel points.
其中,预设变化值和预设条件均可根据实际应用的需求进行设置,在此不再赘述。The preset change value and the preset condition may be set according to actual application requirements, and details are not described herein again.
需说明的是,若确定检测对象的位置变化程度大于等于预设变化值,则可从图像序列中获取其他的邻近帧来进行计算,或重新获取图像序列,再进行计算。It should be noted that if it is determined that the position change degree of the detection object is greater than or equal to the preset change value, other adjacent frames may be acquired from the image sequence to perform calculation, or the image sequence may be re-acquired, and then calculated.
206、终端根据该帧间差确定该图像序列中人的面部是否存在该投射光线所产生的反射光信号,若存在,则执行步骤207,若不存在,则确定该检测对象为非活体。206. The terminal determines, according to the interframe difference, whether a reflected light signal generated by the projected light is present in a face of the image in the image sequence. If yes, step 207 is performed. If not, the terminal determines that the detected object is inactive.
例如,终端可以确定该帧间差是否大于预设阈值,若是,则确定该图像序列中人的面部存在该投射光线所产生的反射光信号,若否,则确定该图像序列中人的面部不存在该投射光线所产生的反射光信号。For example, the terminal may determine whether the interframe difference is greater than a preset threshold, and if yes, determine a reflected light signal generated by the projected light in a face of the image sequence, and if not, determine a face of the person in the image sequence There is a reflected light signal generated by the projected light.
其中,该预设阈值可以根据实际应用的需求而定,在此不再赘述。The preset threshold may be determined according to the requirements of the actual application, and details are not described herein again.
可选的,为了提高检测的准确率,以及减小检测的计算量,还可以使用级联判别模型来进行处理,比如,可以采用全局特征算法或者分类器来对帧间差进行预先处理,以粗略判定反射光信号的发生,使得可以跳过大部分没有反射光信号的普通帧的后续处理,即后续只需要对存在有反射光信号的帧进行处理即可。即,步骤“终端根据该帧间差确定该图像序列中人的面部是否存在该投射光线所产生的反射光信号”可以包括:Optionally, in order to improve the accuracy of the detection and reduce the calculation amount of the detection, the cascading discriminant model may also be used for processing. For example, the global feature algorithm or the classifier may be used to preprocess the interframe difference to The occurrence of the reflected light signal is roughly determined so that the subsequent processing of most of the normal frames without the reflected light signal can be skipped, that is, only the frame in which the reflected light signal exists is processed later. That is, the step "the terminal determines whether the reflected light signal generated by the projected light is present in the face of the image in the image sequence according to the interframe difference" may include:
通过预设全局特征算法或分类器对该帧间差进行分类分析,若分析结果指示人的面部的帧间变化大于设定值,则确定该图像序列中人的面部存在该投射光线所产生的反射光信号,若分析结果指示人的面部的帧间变化不大于设定值,则确定该图像序列中人的面部不存在该投射光线所产生的反射光信号。The inter-frame difference is classified and analyzed by a preset global feature algorithm or a classifier. If the analysis result indicates that the inter-frame variation of the person's face is greater than the set value, determining that the projected surface ray is generated by the person's face in the image sequence The reflected light signal, if the analysis result indicates that the inter-frame change of the person's face is not greater than the set value, determining that the reflected light signal generated by the projected light is not present in the face of the person in the image sequence.
其中,该设定值可以根据实际应用的需求而定,而该“通过预设 全局特征算法或分类器对该帧间差进行分类分析”的方式也可以有多种,例如,可以如下:Wherein, the set value may be determined according to the needs of the actual application, and the “by default” The global feature algorithm or the classifier can classify and analyze the inter-frame difference. There are also various ways, for example, the following:
对该帧间差进行分析,以判断该图像序列中是否存在该投射光线所产生的反射光信号,若不存在该投射光线所产生的反射光信号,则生成指示人的面部的帧间变化不大于设定值的分析结果;若存在该投射光线所产生的反射光信号,则通过预设全局特征算法或分类器判断存在的反射光信息的反射体是否为人的面部,若为人的面部,则生成指示人的面部的帧间变化大于设定值的分析结果,若不是人的面部,则生成指示人的面部的帧间变化不大于设定值的分析结果。The inter-frame difference is analyzed to determine whether there is a reflected light signal generated by the projected light in the image sequence. If there is no reflected light signal generated by the projected light, an inter-frame change indicating the face of the person is generated. An analysis result larger than the set value; if there is a reflected light signal generated by the projected light, the preset global feature algorithm or the classifier determines whether the reflector of the reflected light information exists as a human face, and if it is a human face, An analysis result indicating that the inter-frame change of the face of the person is greater than the set value is generated, and if it is not the face of the person, an analysis result indicating that the inter-frame change of the face of the person is not greater than the set value is generated.
或者,也可以通过预设全局特征算法或分类器对该图像序列中的图像进行分类,以筛选出存在人的面部的帧,得到候选帧,分析该候选帧的帧间差,以判断该人的面部是否存在该投射光线所产生的反射光信号,若不存在该投射光线所产生的反射光信号,则生成指示人的面部的帧间变化不大于设定值的分析结果;若存在该投射光线所产生的反射光信号,则生成指示人的面部的帧间变化大于设定值的分析结果,等等。Alternatively, the image in the image sequence may be classified by a preset global feature algorithm or a classifier to filter out a frame of the face of the person, obtain a candidate frame, and analyze an interframe difference of the candidate frame to determine the person. Whether there is a reflected light signal generated by the projected light on the face, and if there is no reflected light signal generated by the projected light, an analysis result indicating that the inter-frame change of the face of the person is not greater than a set value is generated; if the projection exists The reflected light signal generated by the light generates an analysis result indicating that the inter-frame variation of the person's face is greater than the set value, and the like.
其中,全局特征算法指的是基于全局特征的算法,其中,全局特征可以包括灰度的均值方差、灰度共生矩阵、FFT和DCT等变换后的频谱。The global feature algorithm refers to an algorithm based on global features, wherein the global features may include a mean variance of gray scales, a gray level co-occurrence matrix, a transformed spectrum such as FFT and DCT.
而分类器则可以根据实际应用的需求进行设置,比如,若只用于判别是否存在反射光信号,则可采用较为简单的分类器,而若用于判别是否为人的面部等处,则可采用更加复杂的分类器,比如神经网络分类器等来进行处理,在此不再赘述。The classifier can be set according to the requirements of the actual application. For example, if it is only used to determine whether there is a reflected light signal, a simpler classifier can be used, and if it is used to determine whether it is a person's face or the like, it can be used. More complex classifiers, such as neural network classifiers, are used for processing and will not be described here.
需说明的是,除了可以通过计算帧间差来分析图像序列中人的面部是否存在该投射光线所产生的反射光信号之外,还可以通过计算投射光线变化前后的帧差(即不一定是相邻的两帧)来分析图像序列中人的面部是否存在该投射光线所产生的反射光信号,具体可参见实施例一,在此不再赘述。It should be noted that, besides calculating the inter-frame difference to analyze whether the face of the person in the image sequence has the reflected light signal generated by the projected light, it is also possible to calculate the frame difference before and after the change of the projected light (ie, not necessarily The two adjacent frames are used to analyze whether there is a reflected light signal generated by the projected light in the face of the person in the image sequence. For details, refer to the first embodiment, and details are not described herein again.
207、终端确定反射光信号与预设光信号样本是否匹配,若匹配,则确定该检测对象为活体,若不匹配,则确定该检测对象为非活体。207. The terminal determines whether the reflected optical signal matches the preset optical signal sample. If the terminal matches, determining whether the detected object is a living body, and if not, determining that the detected object is a non-living body.
例如,终端可以分析反射光信号中的参数是否与预设光信号样本中的参数匹配,若匹配,则确定反射光信号与预设光信号样本匹配,若不匹配,则确定反射光信号与预设光信号样本不匹配。比如,具体可以确定反射光信号中的参数值与预设光信号样本中的参数值的差是否小于预设差值范围,若小于预设差值范围,则表明反射光信号中的参数值与预设光信号样本中的参数值匹配,若大于预设差值范围,则表明反射光信号中的参数值与预设光信号样本中的参数值不匹配, 等等。For example, the terminal may analyze whether the parameter in the reflected optical signal matches the parameter in the preset optical signal sample, and if yes, determine that the reflected optical signal matches the preset optical signal sample, and if not, determine the reflected optical signal and the pre-determined Let the optical signal samples not match. For example, it may be specifically determined whether a difference between a parameter value in the reflected optical signal and a parameter value in the preset optical signal sample is less than a preset difference range, and if less than the preset difference range, indicating a parameter value in the reflected optical signal The parameter values in the preset optical signal samples are matched. If the value is greater than the preset difference range, it indicates that the parameter values in the reflected optical signal do not match the parameter values in the preset optical signal samples. and many more.
又例如,终端也可以通过分析反射光信号在图像上所呈现的形状与预设光信号样本图像上所呈现的形状是否匹配,来确定反射光信号是否与预设光信号样本匹配,比如,如果反射光信号在图像上所呈现的形状与预设光信号样本图像上所呈现的形状的相似度大于设定值,则确定反射光信号与预设光信号样本匹配,否则,如果反射光信号在图像上所呈现的形状与预设光信号样本图像上所呈现的形状的相似度小于等于设定值,则确定反射光信号与预设光信号样本不匹配,等等。For another example, the terminal may also determine whether the reflected optical signal matches the preset optical signal sample by analyzing whether the shape of the reflected light signal on the image matches the shape presented on the preset optical signal sample image, for example, if The similarity between the shape of the reflected light signal on the image and the shape presented on the image of the preset light signal sample is greater than a set value, and then the reflected light signal is determined to match the preset light signal sample; otherwise, if the reflected light signal is If the similarity between the shape presented on the image and the shape presented on the preset light signal sample image is less than or equal to the set value, it is determined that the reflected light signal does not match the preset optical signal sample, and so on.
其中,该预设光信号样本、预设差值范围和设定值可以根据实际应用的需求进行设置,在此不再赘述。The preset optical signal sample, the preset difference range, and the set value may be set according to actual application requirements, and details are not described herein again.
可选的,为了更加进一步提高检测的准确率,还可以适当地加入一些互动操作,比如,让用户执行眨眼或张嘴等动作,即在步骤“确定该图像序列中人的面部存在该投射光线所产生的反射光信号之后”,还可以包括:Optionally, in order to further improve the accuracy of the detection, some interactive operations may also be appropriately added, for example, the user performs an action such as blinking or opening the mouth, that is, in the step “determining the presence of the projected light in the face of the image in the image sequence. After the generated reflected light signal", it may also include:
生成指示检测对象(比如人的面部)执行预设动作的提示信息,显示该提示信息,并对该检测对象进行监控,若监控到检测对象执行了该预设动作,才确定该检测对象为活体,否则,若监控到检测对象没有执行该预设动作,则确定该检测对象为非活体。Generating prompt information indicating that the detection object (such as a person's face) performs a preset action, displaying the prompt information, and monitoring the detected object, and if the detected object performs the preset action, determining that the detected object is a living body Otherwise, if it is monitored that the detection object does not perform the preset action, it is determined that the detection object is not a living body.
其中,该预设动作可以根据实际应用的需求进行设置,需说明的是,为了避免繁琐的交互操作,可以对该预设动作的数量和难易程度进行一定限制,比如,只需进行一次简单的交互,如眨眼或张嘴等即可,在此不再赘述。The preset action can be set according to the requirements of the actual application. It should be noted that, in order to avoid cumbersome interaction, the number and difficulty of the preset action may be limited, for example, only one simple operation is needed. The interaction, such as blinking or opening the mouth, can not be repeated here.
由上可知,本实施例可以通过在检测界面设置一非检测区域,用于闪现颜色遮罩,其中,该颜色遮罩可以作为光源向检测对象,如人的面部投射光线,这样,当需要进行活体检测时,便可以对该人的面部进行监控,然后确定监控得到的图像序列中人的面部是否存在该投射光线所产生的反射光信号,且该反射光信号是否与预设光信号样本匹配,如果存在且匹配,则确定该人的面部为活体;由于该方案无需与用户进行繁琐的交互操作和运算,因此,可以大大减低对硬件配置的需求,而且,由于该方案进行活体判别的依据是检测对象预设部位的反射光信号,而真正的活体与伪造的活体(合成图片或视频的载体,比如相片、手机或平板电脑等)的反射光信号是不同的,因此,该方案也可以有效抵挡合成人脸攻击,提高判别的准确性;所以,总而言之,该方案可以在终端有限的硬件配置下,提高活体检测效果,从而提高身份验证的准确性和安全性。As can be seen from the above, in this embodiment, a non-detection area can be disposed on the detection interface for flashing a color mask, wherein the color mask can be used as a light source to project light to a detection object, such as a person's face, so that when needed When the living body is detected, the face of the person can be monitored, and then the reflected light signal generated by the projected light is present in the face of the monitored image sequence, and the reflected light signal matches the preset light signal sample. If it exists and matches, it is determined that the person's face is a living body; since the solution does not need to perform cumbersome interaction operations and operations with the user, the requirement for hardware configuration can be greatly reduced, and the basis for the living body discrimination is determined by the solution. It is a reflected light signal of the preset part of the detection object, and the real living body is different from the reflected light signal of the forged living body (a carrier of a composite picture or video, such as a photo, a mobile phone or a tablet computer), so the solution can also Effectively resist synthetic face attacks and improve the accuracy of the judgment; therefore, in summary, the program Under limited to the hardware configuration of the terminal, to improve the detection effect in vivo, thereby improving authentication accuracy and safety.
实施例三、 Embodiment 3
为了更好地实施以上方法,本发明实施例还提供一种活体检测装置,简称活体检测装置,如图3a所示,该活体检测装置包括一个或一个以上存储器;一个或一个以上处理器;其中,所述一个或一个以上存储器存储有一个或者一个以上指令模块,经配置由所述一个或者一个以上处理器执行;其中,所述一个或者一个以上指令模块包括:接收单元301、监控单元303和检测单元304。在本申请的实施例中,上述一个或者一个以上指令模块还可以进一步包括启动单元302。其中,各个单元的具体功能描述如下:In order to better implement the above method, an embodiment of the present invention further provides a living body detecting device, which is referred to as a living body detecting device. As shown in FIG. 3a, the living body detecting device includes one or more memories; one or more processors; The one or more memories are stored with one or more instruction modules configured to be executed by the one or more processors; wherein the one or more instruction modules include: a receiving unit 301, a monitoring unit 303, and Detection unit 304. In an embodiment of the present application, the one or more instruction modules may further include a startup unit 302. The specific functions of each unit are described as follows:
(1)接收单元301;(1) receiving unit 301;
接收单元301,用于接收活体检测请求。The receiving unit 301 is configured to receive a living body detection request.
例如,接收单元301,具体可以用于接收用户触发的活体检测请求,或者,也可以接收其他设备发送的活体检测请求,等等。For example, the receiving unit 301 may be specifically configured to receive a biometric detection request triggered by a user, or may also receive a biometric detection request sent by another device, and the like.
(2)启动单元302;(2) starting unit 302;
启动单元302,用于根据该活体检测请求启动光源,该光源用于向检测对象投射光线。The starting unit 302 is configured to start a light source according to the living body detection request, and the light source is used to project light to the detection object.
比如,该启动单元302,具体可以用于根据该活体检测请求调用相应的活体检测进程,根据该活体检测进程启动光源,等等。For example, the initiating unit 302 may be specifically configured to invoke a corresponding living body detection process according to the living body detection request, activate a light source according to the living body detection process, and the like.
其中,该光源可以根据实际应用的需求进行设置,比如,可以通过调节终端屏幕的亮度来实现,或者,也可以利用闪光灯或红外发射器等其他发光部件或外置设备来实现、或者,还可以通过在显示界面上设置一颜色遮罩来实现,等等,即启动单元302具体可以执行如下任意一种操作:The light source can be set according to the needs of the actual application, for example, by adjusting the brightness of the terminal screen, or by using other light-emitting components such as a flash or an infrared emitter or an external device, or By setting a color mask on the display interface, etc., the startup unit 302 can specifically perform any of the following operations:
(1)启动单元302,具体可以用于根据该活体检测请求调整屏幕亮度,使得该屏幕作为光源向检测对象投射光线。(1) The activation unit 302 is specifically configured to adjust the brightness of the screen according to the living body detection request, so that the screen as a light source projects light to the detection object.
(2)启动单元302,具体可以用于根据该活体检测请求开启预设发光部件,使得该发光部件作为光源向检测对象投射光线。(2) The activation unit 302 is specifically configured to turn on the preset light-emitting component according to the living body detection request, so that the light-emitting component emits light as a light source to the detection object.
其中,该发光部件可以包括闪光灯或红外发射器等部件。Wherein, the light emitting part may comprise a component such as a flash lamp or an infrared emitter.
(3)启动单元302,具体可以用于根据该活体检测请求启动检测界面,该检测界面可以闪现颜色遮罩,该颜色遮罩作为光源向检测对象投射光线。(3) The activation unit 302 is specifically configured to start a detection interface according to the living body detection request, and the detection interface may flash a color mask, and the color mask is used as a light source to project light to the detection object.
其中,该闪现颜色遮罩的区域可以根据实际应用的需求而定,例如,该检测界面可以包括检测区域和非检测区域,检测区域主要用于对监控情况进行显示,而该非检测区域可以用于闪现颜色遮罩,该颜色遮罩作为光源向检测对象投射光线,等等。The area of the flashing color mask may be determined according to the requirements of the actual application. For example, the detecting interface may include a detecting area and a non-detecting area, and the detecting area is mainly used for displaying a monitoring situation, and the non-detecting area may be used. In the flash color mask, the color mask is used as a light source to project light to the detection object, and so on.
其中,该颜色遮罩的颜色和透明度等参数可以根据实际应用的需求进行设置,该颜色遮罩可以由系统预先进行设定,并在启动检测界面时直接调取,或者,也可以在接收到活体检测请求之后自动生成, 即如图3b所示,该活体检测装置还可以包括生成单元305,如下:The color mask and other parameters of the color mask can be set according to the requirements of the actual application. The color mask can be preset by the system and directly retrieved when the detection interface is started, or can be received at the same time. Automatically generated after the live detection request, That is, as shown in FIG. 3b, the living body detecting device may further include a generating unit 305 as follows:
该生成单元305,可以用于生成颜色遮罩,使得该颜色遮罩所投射出的光线能够按照预设规律进行变化。The generating unit 305 can be configured to generate a color mask such that the light projected by the color mask can be changed according to a preset rule.
可选的,为了便于后续可以更好地识别出光线的变化,该生成单元305还可以用于最大化该光线的变化强度。Optionally, in order to facilitate the subsequent recognition of the change of the light, the generating unit 305 can also be used to maximize the intensity of the change of the light.
其中,该预设规律可以根据实际应用的需求而定,而最大化该光线的变化强度的方式也可以有多种,例如,可以如下:The preset rule may be determined according to the needs of the actual application, and the manner of maximizing the intensity of the change of the light may also be various, for example, as follows:
生成单元305,具体可以用于对于同颜色的光线,通过调整变化前后的屏幕亮度来最大化光线的变化强度;对于不同颜色的光线,通过调整变化前后的色差来最大化光线的变化强度。The generating unit 305 can be specifically configured to maximize the intensity of the change of the light by adjusting the brightness of the screen before and after the change for the light of the same color. For the light of different colors, the intensity of the change of the light is maximized by adjusting the color difference before and after the change.
可选的,为了后续可以更好地从图像帧间差中检测出反射光信号,除了可以最大化该光线的变化强度之外,还可以在颜色的选择上,尽量选择对信号分析最鲁棒的颜色空间,具体可参见前面的实施例,在此不再赘述。Optionally, in order to better detect the reflected light signal from the image frame difference, in addition to maximizing the intensity of the change of the light, the color selection may be selected to be the most robust to signal analysis. For details, refer to the previous embodiment, and details are not described herein again.
(3)监控单元303;(3) monitoring unit 303;
监控单元303,用于对该检测对象进行监控,得到图像序列。The monitoring unit 303 is configured to monitor the detection object to obtain a sequence of images.
例如,监控单元303,具体可以用于调用终端的摄像头,实时对检测对象进行拍摄,得到图像序列,并将拍摄得到的图像序列在该检测区域中进行显示。For example, the monitoring unit 303 can be specifically used to call the camera of the terminal, capture the detected object in real time, obtain an image sequence, and display the captured image sequence in the detection area.
可选的,为了减少噪声所造成的数值浮动对信号的影响,在得到图像序列后,监控单元303还可以对该图像序列进行去噪声处理,详见前面的实施例,在此不再赘述。Optionally, in order to reduce the influence of the value floating on the signal caused by the noise, after the image sequence is obtained, the monitoring unit 303 may perform the denoising processing on the image sequence. For details, refer to the previous embodiment, and details are not described herein again.
(4)检测单元304;(4) detecting unit 304;
检测单元304,用于确定该图像序列中检测对象的预设部位存在反射光信号时,确定反射光信号与预设光信号样本是否匹配;以及当反射光信号与预设光信号样本匹配时,确定该检测对象为活体。The detecting unit 304 is configured to determine, when the reflected light signal exists in the preset part of the detection object in the image sequence, determine whether the reflected light signal matches the preset light signal sample; and when the reflected light signal matches the preset light signal sample, It is determined that the detection object is a living body.
该检测单元304,还可以用于确定该图像序列中检测对象的预设部位不存在该投射光线所产生的反射光信号,或反射光信号与预设光信号样本不匹配时,确定该检测对象为非活体。The detecting unit 304 is further configured to determine, when the reflected portion of the detected object in the image sequence does not have the reflected light signal generated by the projected light, or the reflected light signal does not match the preset optical signal sample, determine the detected object. It is not a living body.
例如,该检测单元304可以包括计算子单元、判断子单元和确定子单元,如下:For example, the detecting unit 304 may include a calculating subunit, a determining subunit, and a determining subunit, as follows:
计算子单元,可以用于计算该图像序列中帧之间的差分。A calculation subunit that can be used to calculate the difference between frames in the sequence of images.
其中,该帧之间的差分可以是帧间差,也可以是帧差,帧间差指的是相邻两帧之间的差,而帧差为投射光线变化前后所对应的帧之间的差。The difference between the frames may be an interframe difference or a frame difference, where the interframe difference refers to a difference between two adjacent frames, and the frame difference is between frames corresponding to before and after the change of the projected light. difference.
比如,该计算子单元,具体可以用于确定检测对象的位置变化程度小于预设变化值时,分别获取该图像序列中邻近帧的像素坐标,基 于该像素坐标计算帧间差;比如,可以对该像素坐标进行变换,以最小化该像素坐标的配准误差,然后,根据变换结果筛选出相关性符合预设条件的像素点,并根据筛选出的像素点计算帧间差,等等。For example, the calculating subunit may be specifically configured to obtain pixel coordinates of adjacent frames in the image sequence when the degree of change of the position of the detecting object is less than a preset change value. Calculating the inter-frame difference on the pixel coordinates; for example, the pixel coordinates may be transformed to minimize the registration error of the pixel coordinates, and then, according to the transformation result, the pixel points whose correlation meets the preset condition are filtered, and according to the screening The resulting pixels calculate the interframe difference, and so on.
又比如,该计算子单元,具体可以用于确定检测对象的位置变化程度小于预设变化值时,分别从该图像序列中获取投射光线变化前后所对应的帧的像素坐标,基于该像素坐标计算帧差;比如,可以对该像素坐标进行变换,以最小化该像素坐标的配准误差,然后,根据变换结果筛选出相关性符合预设条件的像素点,并根据筛选出的像素点计算帧差,等等。For example, the calculating sub-unit may be specifically configured to determine, when the degree of change of the position of the detecting object is less than a preset change value, respectively obtain pixel coordinates of the frame corresponding to the change of the projected light from the image sequence, and calculate the pixel coordinate based on the pixel coordinate Frame difference; for example, the pixel coordinates may be transformed to minimize the registration error of the pixel coordinates, and then, according to the transformation result, the pixel points whose correlation is in accordance with the preset condition are filtered, and the frame is calculated according to the selected pixel point. Poor, and so on.
其中,该预设变化值和预设条件均可以根据实际应用的需求进行设置。The preset change value and the preset condition may be set according to actual application requirements.
判断子单元,可以用于根据该差分确定该图像序列中检测对象的预设部位是否存在该投射光线所产生的反射光信号,且反射光信号是否与预设光信号样本匹配。The determining subunit may be configured to determine, according to the difference, whether the preset portion of the detection object in the image sequence has a reflected light signal generated by the projected light, and whether the reflected optical signal matches the preset optical signal sample.
确定子单元,可以用于在判断子单元确定存在该投射光线所产生的反射光信号,且反射光信号与预设光信号样本匹配时,确定该检测对象为活体。The determining subunit may be configured to determine that the detected object is a living body when the determining subunit determines that the reflected light signal generated by the projected light is present, and the reflected optical signal matches the preset optical signal sample.
该确定子单元,还可以用于在判断子单元确定不存在该投射光线所产生的反射光信号,或反射光信号与预设光信号样本不匹配时,确定该检测对象为非活体。The determining subunit may be further configured to determine that the detected object is inactive when the determining subunit determines that the reflected light signal generated by the projected light does not exist, or the reflected optical signal does not match the preset optical signal sample.
其中,根据该帧之间的差分确定该图像序列中检测对象的预设部位是否存在该投射光线所产生的反射光信号的方式可以有多种,例如,可以采用如下任意一种方式:The method for determining whether there is a reflected light signal generated by the projected light in the preset portion of the image sequence in the image sequence may be different according to the difference between the frames. For example, any one of the following methods may be adopted:
第一种方式:The first way:
判断子单元,具体可以用于确定该帧之间的差分是否大于预设阈值,若是,则确定该图像序列中检测对象的预设部位存在该投射光线所产生的反射光信号;若否,则确定该图像序列中检测对象的预设部位不存在该投射光线所产生的反射光信号。The determining subunit may be specifically configured to determine whether the difference between the frames is greater than a preset threshold, and if yes, determining that the reflected light signal generated by the projected light exists in the preset part of the detected object in the image sequence; Determining that the preset portion of the detected object in the image sequence does not have a reflected light signal generated by the projected light.
第二种方式:The second way:
该判断子单元,具体可以用于通过预设全局特征算法或分类器对该帧之间的差分进行分类分析,若分析结果指示检测对象的预设部位的帧间变化大于设定值,则确定该图像序列中检测对象的预设部位存在该投射光线所产生的反射光信号;若分析结果指示检测对象的预设部位的帧间变化不大于设定值,则确定该图像序列中检测对象的预设部位不存在该投射光线所产生的反射光信号。The determining sub-unit may be specifically configured to perform classification analysis on the difference between the frames by using a preset global feature algorithm or a classifier, and if the analysis result indicates that the inter-frame variation of the preset part of the detection object is greater than a set value, determining The preset part of the detection object in the image sequence has a reflected light signal generated by the projected light; if the analysis result indicates that the inter-frame change of the preset part of the detection object is not greater than a set value, determining the detected object in the image sequence The reflected light signal generated by the projected light does not exist in the preset portion.
其中,该设定值可以根据实际应用的需求而定,而该“通过预设全局特征算法或分类器对该帧间差进行分类分析”的方式也可以有多 种,比如,可以如下:Wherein, the set value may be determined according to the needs of the actual application, and the manner of “classifying and analyzing the inter-frame difference by using a preset global feature algorithm or a classifier” may also be Kind, for example, can be as follows:
该判断子单元,具体可以用于对该帧之间的差分进行分析,以判断该图像序列中是否存在该投射光线所产生的反射光信号,若不存在该投射光线所产生的反射光信号,则生成指示检测对象的预设部位的帧间变化不大于设定值的分析结果;若存在该投射光线所产生的反射光信号,则通过预设全局特征算法或分类器判断存在的反射光信息的反射体是否为该检测对象的预设部位,若为该预设部位,则生成指示检测对象的预设部位的帧间变化大于设定值的分析结果,若不是该预设部位,则生成指示检测对象的预设部位的帧间变化不大于设定值的分析结果。The determining subunit may be specifically configured to analyze the difference between the frames to determine whether the reflected light signal generated by the projected light exists in the image sequence, and if there is no reflected light signal generated by the projected light, And generating an analysis result indicating that the inter-frame change of the preset part of the detection object is not greater than a set value; if there is a reflected light signal generated by the projected light, determining the reflected light information existing by using a preset global feature algorithm or a classifier Whether the reflector is a preset part of the detection object, and if it is the preset part, generating an analysis result indicating that the inter-frame change of the preset part of the detection object is greater than a set value, if not the preset part, generating An analysis result indicating that the inter-frame change of the preset portion of the detection object is not greater than the set value.
或者,该判断子单元,具体可以用于通过预设全局特征算法或分类器对该图像序列中的图像进行分类,以筛选出存在该预设部位的帧,得到候选帧,分析该候选帧的帧间差,以判断该预设部位是否存在该投射光线所产生的反射光信号,若不存在该投射光线所产生的反射光信号,则生成指示检测对象的预设部位的帧间变化不大于设定值的分析结果;若存在该投射光线所产生的反射光信号,则生成指示检测对象的预设部位的帧间变化大于设定值的分析结果。Alternatively, the determining subunit may be specifically configured to classify the image in the image sequence by using a preset global feature algorithm or a classifier to filter out a frame in which the preset part exists, obtain a candidate frame, and analyze the candidate frame. Inter-frame difference, to determine whether the preset part has a reflected light signal generated by the projected light, and if there is no reflected light signal generated by the projected light, generating an inter-frame change indicating that the preset part of the detection object is not greater than The analysis result of the set value; if there is a reflected light signal generated by the projected light, an analysis result indicating that the inter-frame change of the preset portion of the detection target is greater than the set value is generated.
其中,全局特征算法指的是基于全局特征的算法,其中,全局特征可以包括灰度的均值方差、灰度共生矩阵、FFT和DCT等变换后的频谱。The global feature algorithm refers to an algorithm based on global features, wherein the global features may include a mean variance of gray scales, a gray level co-occurrence matrix, a transformed spectrum such as FFT and DCT.
可选的,确定反射光信号是否与预设光信号样本匹配的方式也可以有多种,例如,可以采用如下任意一种方式:Optionally, the method for determining whether the reflected optical signal matches the preset optical signal sample may also be multiple. For example, any one of the following methods may be adopted:
判断子单元,具体可以用于分析反射光信号中的参数是否与预设光信号样本中的参数匹配,若匹配,则确定反射光信号与预设光信号样本匹配,若不匹配,则确定反射光信号与预设光信号样本不匹配。比如,具体可以确定反射光信号中的参数值与预设光信号样本中的参数值的差是否小于预设差值范围,若小于预设差值范围,则表明反射光信号中的参数值与预设光信号样本中的参数值匹配,若大于预设差值范围,则表明反射光信号中的参数值与预设光信号样本中的参数值不匹配,等等。The determining subunit may be configured to analyze whether the parameter in the reflected optical signal matches the parameter in the preset optical signal sample, and if yes, determine that the reflected optical signal matches the preset optical signal sample, and if not, determine the reflection The optical signal does not match the preset optical signal sample. For example, it may be specifically determined whether a difference between a parameter value in the reflected optical signal and a parameter value in the preset optical signal sample is less than a preset difference range, and if less than the preset difference range, indicating a parameter value in the reflected optical signal The parameter values in the preset optical signal samples match, and if greater than the preset difference range, it indicates that the parameter values in the reflected optical signal do not match the parameter values in the preset optical signal samples, and the like.
或者,判断子单元,具体可以用于通过分析反射光信号在图像上所呈现的形状与预设光信号样本图像上所呈现的形状是否匹配,来确定反射光信号是否与预设光信号样本匹配,比如,如果反射光信号在图像上所呈现的形状与预设光信号样本图像上所呈现的形状的相似度大于设定值,则确定反射光信号与预设光信号样本匹配,否则,如果反射光信号在图像上所呈现的形状与预设光信号样本图像上所呈现的形状的相似度小于等于设定值,则确定反射光信号与预设光信号 样本不匹配,等等。Alternatively, the determining subunit may be specifically configured to determine whether the reflected optical signal matches the preset optical signal sample by analyzing whether the shape of the reflected light signal on the image matches the shape presented on the preset optical signal sample image. For example, if the similarity between the shape of the reflected light signal on the image and the shape presented on the preset light signal sample image is greater than the set value, it is determined that the reflected light signal matches the preset light signal sample, otherwise, if Determining the reflected light signal and the preset light signal when the similarity between the shape of the reflected light signal on the image and the shape presented on the preset light signal sample image is less than or equal to the set value Samples do not match, and so on.
其中,该预设光信号样本、预设差值范围和设定值可以根据实际应用的需求进行设置,在此不再赘述。The preset optical signal sample, the preset difference range, and the set value may be set according to actual application requirements, and details are not described herein again.
具体实施时,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元的具体实施可参见前面的方法实施例,在此不再赘述。In the specific implementation, the foregoing units may be implemented as a separate entity, or may be implemented in any combination, and may be implemented as the same or a plurality of entities. For the specific implementation of the foregoing, refer to the foregoing method embodiments, and details are not described herein.
该活体检测装置具体可以集成在终端等设备中,该终端具体可以为手机、平板电脑、笔记本电脑或PC等设备。The device can be integrated into a device such as a terminal, and the terminal can be a device such as a mobile phone, a tablet computer, a notebook computer, or a PC.
由上可知,本实施例的活体检测装置在需要进行活体检测时,可以由启动单元302启动光源向检测对象投射光线,并由监控但303通过该检测界面中的检测区域对该检测对象进行监控,然后由检测单元304确定监控得到的图像序列中检测对象的预设部位是否存在该投射光线所产生的反射光信号,且该反射光是否与预设光信号样本匹配,如果存在且匹配,则确定该检测对象为活体;由于该方案无需与用户进行繁琐的交互操作和运算,因此,可以大大减低对硬件配置的需求,而且,由于该方案进行活体判别的依据是检测对象预设部位的反射光信号,而真正的活体与伪造的活体(合成图片或视频的载体,比如相片、手机或平板电脑等)的反射光信号是不同的,因此,该方案也可以有效抵挡合成人脸攻击,提高判别的准确性;所以,总而言之,该方案可以提高活体检测效果,从而提高身份验证的准确性和安全性。As can be seen from the above, when the living body detection device of the present embodiment needs to perform the living body detection, the activation unit 302 can activate the light source to project the light to the detection object, and monitor the 303 through the detection area in the detection interface to monitor the detection object. And determining, by the detecting unit 304, whether the preset portion of the detected object in the monitored image sequence has a reflected light signal generated by the projected light, and whether the reflected light matches the preset optical signal sample, if present and matched, It is determined that the detection object is a living body; since the solution does not need to perform cumbersome interaction operations and operations with the user, the requirement for hardware configuration can be greatly reduced, and the basis for the living body discrimination is to detect the reflection of the preset part of the object. Optical signals, but the real living body and the fake living body (composite picture or video carrier, such as photos, mobile phones or tablets, etc.) have different reflected light signals. Therefore, the solution can effectively resist synthetic face attacks and improve The accuracy of the discrimination; therefore, in summary, the program can improve the living body Test results, to improve the accuracy of authentication and security.
实施例四、Embodiment 4
相应的,本发明实施例还提供一种终端,如图4所示,该终端可以包括射频(RF,Radio Frequency)电路401、包括有一个或一个以上计算机可读存储介质的存储器402、输入单元403、显示单元404、传感器405、音频电路406、无线保真(WiFi,Wireless Fidelity)模块407、包括有一个或者一个以上处理核心的处理器408、以及电源409等部件。本领域技术人员可以理解,图4中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:Correspondingly, the embodiment of the present invention further provides a terminal. As shown in FIG. 4, the terminal may include a radio frequency (RF) circuit 401, a memory 402 including one or more computer readable storage media, and an input unit. 403. The display unit 404, the sensor 405, the audio circuit 406, the Wireless Fidelity (WiFi) module 407, the processor 408 including one or more processing cores, and the power source 409 and the like. It will be understood by those skilled in the art that the terminal structure shown in FIG. 4 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements. among them:
RF电路401可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器408处理;另外,将涉及上行的数据发送给基站。通常,RF电路401包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,Low Noise Amplifier)、双工器等。此外,RF电路401还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统 (GSM,Global System of Mobile communication)、通用分组无线服务(GPRS,General Packet Radio Service)、码分多址(CDMA,Code Division Multiple Access)、宽带码分多址(WCDMA,Wideband Code Division Multiple Access)、长期演进(LTE,Long Term Evolution)、电子邮件、短消息服务(SMS,Short Messaging Service)等。The RF circuit 401 can be used for transmitting and receiving information or during a call, and receiving and transmitting signals. Specifically, after receiving downlink information of the base station, the downlink information is processed by one or more processors 408. In addition, the data related to the uplink is sent to the base station. . Generally, the RF circuit 401 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, and a low noise amplifier (LNA, Low Noise Amplifier), duplexer, etc. In addition, the RF circuit 401 can also communicate with the network and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to a global mobile communication system (GSM, Global System of Mobile communication), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA) , Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), etc.
存储器402可用于存储软件程序以及模块,处理器408通过运行存储在存储器402的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器402可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器402可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器402还可以包括存储器控制器,以提供处理器408和输入单元403对存储器402的访问。The memory 402 can be used to store software programs and modules, and the processor 408 executes various functional applications and data processing by running software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of the terminal (such as audio data, phone book, etc.). Moreover, memory 402 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 402 may also include a memory controller to provide access to memory 402 by processor 408 and input unit 403.
输入单元403可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,在一个具体的实施例中,输入单元403可包括触敏表面以及其他输入设备。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器408,并能接收处理器408发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面。除了触敏表面,输入单元403还可以包括其他输入设备。具体地,其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。 Input unit 403 can be used to receive input numeric or character information, as well as to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls. In particular, in one particular embodiment, input unit 403 can include a touch-sensitive surface as well as other input devices. Touch-sensitive surfaces, also known as touch screens or trackpads, collect touch operations on or near the user (such as the user using a finger, stylus, etc., any suitable object or accessory on a touch-sensitive surface or touch-sensitive Operation near the surface), and drive the corresponding connecting device according to a preset program. Alternatively, the touch sensitive surface may include two parts of a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 408 is provided and can receive commands from the processor 408 and execute them. In addition, touch-sensitive surfaces can be implemented in a variety of types, including resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface, the input unit 403 can also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
显示单元404可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元404可包括显示面板,可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其 上或附近的触摸操作后,传送给处理器408以确定触摸事件的类型,随后处理器408根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图4中,触敏表面与显示面板是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。 Display unit 404 can be used to display information entered by the user or information provided to the user, as well as various graphical user interfaces of the terminal, which can be composed of graphics, text, icons, video, and any combination thereof. The display unit 404 can include a display panel. Alternatively, the display panel can be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch sensitive surface can cover the display panel when the touch sensitive surface is detected in it Upon or near a touch operation, the processor 408 is passed to determine the type of touch event, and the processor 408 then provides a corresponding visual output on the display panel based on the type of touch event. Although in FIG. 4, the touch-sensitive surface and display panel are implemented as two separate components to perform input and input functions, in some embodiments, the touch-sensitive surface can be integrated with the display panel to implement input and output functions.
终端还可包括至少一种传感器405,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The terminal may also include at least one type of sensor 405, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may close the display panel and/or the backlight when the terminal moves to the ear. . As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the terminal can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
音频电路406、扬声器,传声器可提供用户与终端之间的音频接口。音频电路406可将接收到的音频数据转换后的电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路406接收后转换为音频数据,再将音频数据输出处理器408处理后,经RF电路401以发送给比如另一终端,或者将音频数据输出至存储器402以便进一步处理。音频电路406还可能包括耳塞插孔,以提供外设耳机与终端的通信。The audio circuit 406, the speaker, and the microphone provide an audio interface between the user and the terminal. The audio circuit 406 can transmit the converted electrical signal of the audio data to the speaker, and convert it into a sound signal output by the speaker; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 406 and then converted. The audio data is then processed by the audio data output processor 408, sent via RF circuitry 401 to, for example, another terminal, or the audio data is output to memory 402 for further processing. The audio circuit 406 may also include an earbud jack to provide communication between the peripheral earphone and the terminal.
WiFi属于短距离无线传输技术,终端通过WiFi模块407可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图4示出了WiFi模块407,但是可以理解的是,其并不属于终端的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-range wireless transmission technology, and the terminal can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 407, which provides wireless broadband Internet access for users. Although FIG. 4 shows the WiFi module 407, it can be understood that it does not belong to the necessary configuration of the terminal, and can be omitted as needed within the scope of not changing the essence of the invention.
处理器408是终端的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器402内的软件程序和/或模块,以及调用存储在存储器402内的数据,执行终端的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器408可包括一个或多个处理核心;优选的,处理器408可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器408中。 Processor 408 is the control center of the terminal, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in memory 402, and by invoking data stored in memory 402, The various functions of the terminal and processing data to monitor the mobile phone as a whole. Optionally, the processor 408 may include one or more processing cores; preferably, the processor 408 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 408.
终端还包括给各个部件供电的电源409(比如电池),优选的,电源可以通过电源管理系统与处理器408逻辑相连,从而通过电源管理 系统实现管理充电、放电、以及功耗管理等功能。电源409还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The terminal also includes a power source 409 (such as a battery) that supplies power to the various components. Preferably, the power source can be logically coupled to the processor 408 through the power management system for power management. The system manages functions such as charging, discharging, and power management. The power supply 409 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
尽管未示出,终端还可以包括摄像头、蓝牙模块等,在此不再赘述。具体在本实施例中,上述存储器402将存储有一个或者一个以上程序,且经配置由一个或者一个以上处理器408执行。上述一个或者一个以上程序可以包括如下指令模块:Although not shown, the terminal may further include a camera, a Bluetooth module, and the like, and details are not described herein again. In particular, in the present embodiment, the memory 402 described above will store one or more programs and be configured to be executed by one or more processors 408. The one or more programs described above may include the following instruction modules:
接收单元301,用于接收活体检测请求;The receiving unit 301 is configured to receive a living body detection request.
启动单元302,用于根据所述活体检测请求启动光源,所述光源用于向检测对象投射光线;The starting unit 302 is configured to start a light source according to the living body detection request, and the light source is used to project light to the detection object;
监控单元303,用于对所述检测对象进行监控,以得到图像序列;The monitoring unit 303 is configured to monitor the detection object to obtain an image sequence;
检测单元304,用于当确定所述图像序列中所述检测对象的预设部位存在所述投射光线所产生的反射光信号,且所述反射光信号与预设光信号样本匹配时,确定所述检测对象为活体。The detecting unit 304 is configured to determine, when the reflected light signal generated by the projected light is present in the preset portion of the detection object in the image sequence, and the reflected light signal matches the preset optical signal sample, The test object is a living body.
终端中的处理器408会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器402中,并由处理器408来运行存储在存储器402中的应用程序,从而实现各种功能:The processor 408 in the terminal loads the executable file corresponding to the process of one or more applications into the memory 402 according to the following instruction, and the processor 408 runs the application stored in the memory 402, thereby Achieve a variety of functions:
接收活体检测请求,根据该活体检测请求启动光源,其中,该光源用于向检测对象投射光线,对象进行监控,以得到图像序列,当确定该图像序列中检测对象的预设部位存在该投射光线所产生的反射光信号,且该反射光信号与预设光信号样本匹配时,确定该检测对象为活体。Receiving a living body detection request, starting a light source according to the living body detection request, wherein the light source is used for projecting light to the detection object, and the object is monitored to obtain a sequence of images, and when the predetermined portion of the detection object in the image sequence is determined to have the projected light When the generated reflected light signal matches the preset optical signal sample, the detected object is determined to be a living body.
其中,确定该图像序列中检测对象的预设部位是否存在该投射光线所产生的反射光信号,以及确定该反射光信号是否与预设光信号样本匹配的方式可以有多种,具体可参见前面的实施例,在此不再赘述。The method for determining whether the preset portion of the detection object in the image sequence has the reflected light signal generated by the projected light, and determining whether the reflected light signal matches the preset optical signal sample may be various. For details, refer to the foregoing. The embodiment is not described here.
其中,该光源的实现方式也可以有多种,比如,可以通过调节终端屏幕的亮度来实现,或者,也可以利用闪光灯或红外发射器等其他发光部件或外置设备来实现、或者,还可以通过在显示界面上设置一颜色遮罩来实现,等等,即该存储器402中的应用程序,也可以实现如下功能:The light source may be implemented in various manners, for example, by adjusting the brightness of the screen of the terminal, or by using other light-emitting components such as a flash or an infrared emitter or an external device, or By setting a color mask on the display interface, etc., that is, the application in the memory 402 can also implement the following functions:
根据该活体检测请求调整屏幕亮度,使得该屏幕作为光源向检测对象投射光线。The screen brightness is adjusted according to the living body detection request such that the screen as a light source projects light to the detection object.
或者,根据该活体检测请求开启预设发光部件,使得该发光部件作为光源向检测对象投射光线。其中,该发光部件可以包括闪光灯或红外发射器等部件。Alternatively, the preset light-emitting component is turned on according to the living body detection request, so that the light-emitting component emits light as a light source to the detection object. Wherein, the light emitting part may comprise a component such as a flash lamp or an infrared emitter.
或者,根据该活体检测请求启动检测界面,该检测界面可以闪现颜色遮罩,该颜色遮罩作为光源向检测对象投射光线。 Alternatively, the detection interface is activated according to the living body detection request, and the detection interface may flash a color mask, and the color mask is used as a light source to project light to the detection object.
其中,该闪现颜色遮罩的区域可以根据实际应用的需求而定,例如,该检测界面可以包括检测区域和非检测区域,检测区域主要用于对监控情况进行显示,而该非检测区域可以用于闪现颜色遮罩,该颜色遮罩作为光源向检测对象投射光线,等等。The area of the flashing color mask may be determined according to the requirements of the actual application. For example, the detecting interface may include a detecting area and a non-detecting area, and the detecting area is mainly used for displaying a monitoring situation, and the non-detecting area may be used. In the flash color mask, the color mask is used as a light source to project light to the detection object, and so on.
另外,需说明的是,该颜色遮罩的颜色和透明度等参数可以根据实际应用的需求进行设置,该颜色遮罩可以由系统预先进行设定,并在启动检测界面时直接调取,或者,也可以在接收到活体检测请求之后自动生成,即该存储在存储器402中的应用程序,还可以实现如下功能:In addition, it should be noted that the color mask and other parameters of the color mask can be set according to the requirements of the actual application, and the color mask can be preset by the system and directly retrieved when the detection interface is started, or It can also be automatically generated after receiving the biometric detection request, that is, the application stored in the memory 402, and can also implement the following functions:
生成颜色遮罩,使得该颜色遮罩所投射出的光线能够按照预设规律进行变化,并最大化该光线的变化强度。A color mask is generated such that the light projected by the color mask can be changed according to a preset rule and the intensity of the change of the light is maximized.
其中,最大化该光线的变化强度的方式也可以有多种,具体可参见前面的实施例,在此不再赘述。There are a plurality of ways to maximize the intensity of the change of the light. For details, refer to the previous embodiment, and details are not described herein again.
可选的,为了后续可以更好地从图像帧间差中检测出反射光信号,除了可以最大化该光线的变化强度之外,还可以在颜色的选择上,尽量选择对信号分析最鲁棒的颜色空间。Optionally, in order to better detect the reflected light signal from the image frame difference, in addition to maximizing the intensity of the change of the light, the color selection may be selected to be the most robust to signal analysis. Color space.
可选的,为了减少噪声所造成的数值浮动对信号的影响,在得到图像序列后,还可以对该图像序列进行去噪声处理,即该存储在存储器402中的应用程序,还可以实现如下功能:Optionally, in order to reduce the influence of the numerical floating on the signal caused by the noise, after the image sequence is obtained, the image sequence may also be subjected to denoising processing, that is, the application stored in the memory 402 may also implement the following functions. :
对该图像序列进行去噪声处理。The image sequence is subjected to denoising processing.
例如,以噪声模型为高斯噪声为例,具体可以使用时序上多帧平均和/或同帧多尺度平均来尽可能地减小噪声,等等。For example, taking the noise model as Gaussian noise as an example, it is possible to use timing multi-frame averaging and/or co-frame multi-scale averaging to reduce noise as much as possible, and the like.
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。For the specific implementation of the foregoing operations, refer to the foregoing embodiments, and details are not described herein again.
由上可知,本实施例的终端在需要进行活体检测时,可以启动光源向检测对象投射光线,并对该检测对象进行监控,然后确定监控得到的图像序列中检测对象的预设部位是否存在该投射光线所产生的反射光信号,且该反射光信号是否与预设光信号样本匹配,如果存在且匹配,则确定该检测对象为活体;由于该方案无需与用户进行繁琐的交互操作和运算,因此,可以大大减低对硬件配置的需求,而且,由于该方案进行活体判别的依据是检测对象预设部位的反射光信号,而真正的活体与伪造的活体(合成图片或视频的载体,比如相片、手机或平板电脑等)的反射光信号是不同的,因此,该方案也可以有效抵挡合成人脸攻击,提高判别的准确性;所以,总而言之,该方案可以在终端,特别是移动终端有限的硬件配置下,提高活体检测效果,从而提高身份验证的准确性和安全性。As can be seen from the above, when the terminal needs to perform the living body detection, the terminal can start the light source to project the light to the detection object, monitor the detection object, and then determine whether the preset part of the detection object exists in the monitored image sequence. Projecting a reflected light signal generated by the light, and whether the reflected light signal matches the preset optical signal sample, and if present and matched, determining that the detected object is a living body; since the solution does not require complicated interaction and operation with the user, Therefore, the requirement for the hardware configuration can be greatly reduced, and the basis for the living body discrimination is to detect the reflected light signal of the preset part of the object, and the real living body and the forged living body (the composite picture or video carrier, such as a photo) The reflected light signal of the mobile phone or tablet computer is different. Therefore, the solution can also effectively resist the synthetic face attack and improve the accuracy of the discrimination; therefore, in short, the solution can be limited in the terminal, especially the mobile terminal. Improve the detection of living body under hardware configuration, thus improving the identification The accuracy and security.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存 储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。A person of ordinary skill in the art can understand that all or part of the steps of the foregoing embodiments can be completed by a program to instruct related hardware, and the program can be saved. The storage medium may include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like.
因此,本发明实施例还提供了一种存储介质,其中存储有数据处理程序,该数据处理程序用于执行本发明实施例上述方法的任何一种实施例。Therefore, an embodiment of the present invention further provides a storage medium in which a data processing program is stored, and the data processing program is used to execute any one of the foregoing methods of the embodiments of the present invention.
以上对本发明实施例所提供的一种活体检测方法和装置进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 The method and device for detecting a living body provided by the embodiments of the present invention are described in detail. The principles and embodiments of the present invention are described in the following. The description of the above embodiments is only for helping to understand the present invention. The method and its core idea; at the same time, those skilled in the art, according to the idea of the present invention, there will be changes in the specific embodiments and application scope. In summary, the content of this specification should not be construed as Limitations of the invention.

Claims (39)

  1. 一种活体检测方法,包括:A living body detection method includes:
    接收活体检测请求;Receiving a living body detection request;
    对所述检测对象进行监控,得到图像序列;Monitoring the detected object to obtain an image sequence;
    当确定所述图像序列中所述检测对象的预设部位存在反射光信号时,确定所述反射光信号与预设光信号样本是否匹配;以及Determining whether the reflected light signal matches a preset optical signal sample when determining that there is a reflected light signal in the preset portion of the detection object in the image sequence;
    当所述反射光信号与预设光信号样本匹配时,确定所述检测对象为活体。When the reflected light signal matches the preset light signal sample, it is determined that the detection object is a living body.
  2. 根据权利要求1所述的方法,其中,还包括:The method of claim 1 further comprising:
    当确定所述图像序列中所述检测对象的预设部位不存在反射光信号或所述反射光信号与所述预设光信号样本不匹配时,确定所述检测对象为非活体。When it is determined that the preset portion of the detection object in the image sequence does not have a reflected light signal or the reflected light signal does not match the preset optical signal sample, it is determined that the detection object is not a living body.
  3. 根据权利要求1或2所述的方法,其中,所述反射信号由光源向所述检测对象投射的光线所产生。The method according to claim 1 or 2, wherein the reflected signal is generated by light rays projected by the light source to the detection object.
  4. 根据权利要求3所述的方法,其中,还包括:根据所述活体检测请求启动所述光源。The method of claim 3, further comprising: activating the light source in accordance with the living body detection request.
  5. 根据权利要求4所述的方法,其中,所述根据所述活体检测请求启动光源,包括:The method of claim 4, wherein the actuating the light source according to the living body detection request comprises:
    根据所述活体检测请求启动检测界面,所述检测界面包括非检测区域,所述非检测区域用于闪现颜色遮罩,所述颜色遮罩作为光源向检测对象投射光线;或者,Initiating a detection interface according to the living body detection request, the detection interface includes a non-detection area, the non-detection area is used to flash a color mask, and the color mask is used as a light source to project light to the detection object; or
    根据所述活体检测请求调整屏幕亮度,使得所述屏幕作为光源向检测对象投射光线;或者,Adjusting a screen brightness according to the living body detection request, so that the screen as a light source projects light to the detection object; or
    根据所述活体检测请求开启预设发光部件,使得所述发光部件作为光源向检测对象投射光线。The preset light-emitting component is turned on according to the living body detection request, so that the light-emitting component emits light as a light source to the detection object.
  6. 根据权利要求5所述的方法,其中,所述接收活体检测请求之后,还包括:The method according to claim 5, wherein after receiving the living body detection request, the method further comprises:
    生成颜色遮罩,使得所述颜色遮罩所投射出的光线能够按照预设规律进行变化;Generating a color mask such that the light projected by the color mask can be changed according to a preset rule;
    最大化所述光线的变化强度。Maximize the intensity of the change in the light.
  7. 根据权利要求6所述的方法,其中,所述最大化所述光线的变化强度,包括:The method of claim 6 wherein said maximizing said intensity of change of said light comprises:
    对于同颜色的光线,通过调整变化前后的屏幕亮度来最大化光线的变化强度;For the same color of light, maximize the intensity of light changes by adjusting the brightness of the screen before and after the change;
    对于不同颜色的光线,通过调整变化前后的色差来最大化光线的变化强度。 For different colors of light, maximize the intensity of the light by adjusting the color difference before and after the change.
  8. 根据权利要求1至7任一项所述的方法,其中,确定所述图像序列中所述检测对象的预设部位是否存在所述反射光信号,包括:The method according to any one of claims 1 to 7, wherein determining whether the preset portion of the detection object in the image sequence has the reflected light signal comprises:
    计算所述图像序列中帧之间的差分,所述帧之间的差分为帧间差或帧差,所述帧差为投射光线变化前后所对应的帧之间的差;Calculating a difference between frames in the image sequence, where a difference between the frames is an interframe difference or a frame difference, where the frame difference is a difference between frames corresponding to before and after the change of the projected light;
    根据所述差分确定所述图像序列中所述检测对象的预设部位是否存在所述投射光线所产生的反射光信号。Determining, according to the difference, whether a preset portion of the detection object in the image sequence has a reflected light signal generated by the projected light.
  9. 根据权利要求8所述的方法,其中,所述根据所述差分确定所述图像序列中所述检测对象的预设部位是否存在所述投射光线所产生的反射光信号,包括:The method according to claim 8, wherein the determining, according to the difference, whether the preset portion of the detection object in the image sequence has a reflected light signal generated by the projected light, comprises:
    确定所述差分是否大于预设阈值;Determining whether the difference is greater than a preset threshold;
    若是,则确定所述图像序列中检测对象的预设部位存在所述投射光线所产生的反射光信号;If yes, determining that the preset portion of the detection object in the image sequence has a reflected light signal generated by the projected light;
    若否,则确定所述图像序列中检测对象的预设部位不存在所述投射光线所产生的反射光信号。If not, it is determined that the reflected portion of the detected object in the image sequence does not have a reflected light signal generated by the projected light.
  10. 根据权利要求8所述的方法,其中,所述根据所述差分确定所述图像序列中所述检测对象的预设部位是否存在所述投射光线所产生的反射光信号,包括:The method according to claim 8, wherein the determining, according to the difference, whether the preset portion of the detection object in the image sequence has a reflected light signal generated by the projected light, comprises:
    通过预设全局特征算法或分类器对所述差分进行分类分析;Performing classification analysis on the difference by a preset global feature algorithm or a classifier;
    若分析结果指示所述检测对象的预设部位的帧间变化大于设定值,则确定所述图像序列中所述检测对象的预设部位存在所述投射光线所产生的反射光信号;If the analysis result indicates that the inter-frame change of the preset portion of the detection object is greater than the set value, determining that the preset portion of the detection object in the image sequence has a reflected light signal generated by the projected light;
    若分析结果指示所述检测对象的预设部位的帧间变化不大于设定值,则确定所述图像序列中所述检测对象的预设部位不存在所述投射光线所产生的反射光信号。If the analysis result indicates that the inter-frame change of the preset portion of the detection object is not greater than the set value, determining that the preset portion of the detection object in the image sequence does not have the reflected light signal generated by the projected light.
  11. 根据权利要求10所述的方法,其中,所述通过预设全局特征算法或分类器对所述差分进行分类分析,包括:The method according to claim 10, wherein the classifying and analyzing the difference by using a preset global feature algorithm or a classifier comprises:
    对所述差分进行分析,以判断所述图像序列中是否存在所述投射光线所产生的反射光信号;And analyzing the difference to determine whether the reflected light signal generated by the projected light is present in the image sequence;
    若不存在所述投射光线所产生的反射光信号,则生成指示检测对象的预设部位的帧间变化不大于设定值的分析结果;If there is no reflected light signal generated by the projected light, generating an analysis result indicating that an inter-frame change of the preset portion of the detection target is not greater than a set value;
    若存在所述投射光线所产生的反射光信号,则通过预设全局特征算法或分类器判断存在的反射光信息的反射体是否为所述检测对象的预设部位,若为所述预设部位,则生成指示所述检测对象的预设部位的帧间变化大于设定值的分析结果,若不是所述预设部位,则生成指示所述检测对象的预设部位的帧间变化不大于设定值的分析结果。If the reflected light signal generated by the projected light is present, determining whether the reflector of the reflected light information existing is a preset part of the detection object by using a preset global feature algorithm or a classifier, if the preset part is And generating an analysis result indicating that the inter-frame change of the preset part of the detection object is greater than a set value, and if not the preset part, generating an inter-frame change indicating that the preset part of the detection object is not greater than The analysis result of the fixed value.
  12. 根据权利要求10所述的方法,其中,所述通过预设全局特征算法或分类器对所述差分进行分类分析,包括: The method according to claim 10, wherein the classifying and analyzing the difference by using a preset global feature algorithm or a classifier comprises:
    通过预设全局特征算法或分类器对所述图像序列中的图像进行分类,以筛选出存在所述预设部位的帧,得到候选帧;Sorting the image in the image sequence by using a preset global feature algorithm or a classifier to filter out a frame in which the preset portion exists to obtain a candidate frame;
    分析所述候选帧的帧间差,以判断所述预设部位是否存在所述投射光线所产生的反射光信号;And analyzing an interframe difference of the candidate frame to determine whether the preset part has a reflected light signal generated by the projected light;
    若不存在所述投射光线所产生的反射光信号,则生成指示所述检测对象的预设部位的帧间变化不大于设定值的分析结果;If there is no reflected light signal generated by the projected light, generating an analysis result indicating that an inter-frame change of the preset portion of the detection target is not greater than a set value;
    若存在所述投射光线所产生的反射光信号,则生成指示所述检测对象的预设部位的帧间变化大于设定值的分析结果。If there is a reflected light signal generated by the projected light, an analysis result indicating that an inter-frame change of the preset portion of the detection target is greater than a set value is generated.
  13. 根据权利要求8所述的方法,其中,所述计算所述图像序列中帧之间的差分,包括:The method of claim 8 wherein said calculating a difference between frames in said sequence of images comprises:
    确定所述检测对象的位置变化程度小于预设变化值时,分别获取所述图像序列中邻近帧的像素坐标,基于像素坐标计算帧间差;或者,When it is determined that the degree of change of the position of the detection object is less than a preset change value, respectively acquiring pixel coordinates of adjacent frames in the image sequence, and calculating an inter-frame difference based on pixel coordinates; or
    确定所述检测对象的位置变化程度小于预设变化值时,分别从所述图像序列中获取投射光线变化前后所对应的帧的像素坐标,基于像素坐标计算帧差。When it is determined that the degree of change of the position of the detection object is less than a preset change value, pixel coordinates of frames corresponding to before and after the change of the projected light are respectively acquired from the image sequence, and the frame difference is calculated based on the pixel coordinates.
  14. 根据权利要求13所述的方法,其中,基于像素坐标计算帧间差或帧差,包括:The method of claim 13 wherein calculating the interframe difference or frame difference based on the pixel coordinates comprises:
    对像素坐标进行变换,以最小化所述像素坐标的配准误差;Transforming pixel coordinates to minimize registration errors of the pixel coordinates;
    根据变换结果筛选出相关性符合预设条件的像素点;Filtering pixels corresponding to the preset conditions according to the transformation result;
    根据筛选出的像素点计算帧间差或帧差。The interframe difference or frame difference is calculated based on the selected pixel points.
  15. 根据权利要求1至14任一项所述的方法,其中,所述对所述检测对象进行监控,以得到图像序列之后,还包括:The method according to any one of claims 1 to 14, wherein after the monitoring the object to be monitored to obtain a sequence of images, the method further comprises:
    对所述图像序列进行去噪声处理。The image sequence is subjected to denoising processing.
  16. 一种活体检测方法,由终端执行,所述方法包括:A living body detecting method is performed by a terminal, and the method includes:
    接收活体检测请求;Receiving a living body detection request;
    对所述检测对象进行监控,得到图像序列;Monitoring the detected object to obtain an image sequence;
    当确定所述图像序列中所述检测对象的预设部位存在反射光信号时,确定所述反射光信号与预设光信号样本是否匹配;以及Determining whether the reflected light signal matches a preset optical signal sample when determining that there is a reflected light signal in the preset portion of the detection object in the image sequence;
    当所述反射光信号与预设光信号样本匹配时,确定所述检测对象为活体。When the reflected light signal matches the preset light signal sample, it is determined that the detection object is a living body.
  17. 根据权利要求16所述的方法,其中,还包括:The method of claim 16 further comprising:
    当确定所述图像序列中所述检测对象的预设部位不存在所述反射光信号或所述反射光信号与所述预设光信号样本不匹配时,确定所述检测对象为非活体。Determining that the detection object is inactive when determining that the reflected portion of the detection object in the image sequence does not have the reflected light signal or the reflected light signal does not match the preset optical signal sample.
  18. 根据权利要求16或17所述的方法,其中,所述反射信号由光源向所述检测对象投射的光线所产生。 The method according to claim 16 or 17, wherein the reflected signal is generated by light rays projected by the light source to the detection object.
  19. 根据权利要求18所述的方法,其中,还包括:根据所述活体检测请求启动所述光源。The method of claim 18, further comprising: activating the light source in accordance with the living body detection request.
  20. 根据权利要求19所述的方法,其中,所述根据所述活体检测请求启动光源,包括:The method of claim 19, wherein the actuating the light source according to the living body detection request comprises:
    根据所述活体检测请求启动检测界面,所述检测界面包括非检测区域,所述非检测区域用于闪现颜色遮罩,所述颜色遮罩作为光源向检测对象投射光线;或者,Initiating a detection interface according to the living body detection request, the detection interface includes a non-detection area, the non-detection area is used to flash a color mask, and the color mask is used as a light source to project light to the detection object; or
    根据所述活体检测请求调整屏幕亮度,使得所述屏幕作为光源向检测对象投射光线;或者,Adjusting a screen brightness according to the living body detection request, so that the screen as a light source projects light to the detection object; or
    根据所述活体检测请求开启预设发光部件,使得所述发光部件作为光源向检测对象投射光线。The preset light-emitting component is turned on according to the living body detection request, so that the light-emitting component emits light as a light source to the detection object.
  21. 根据权利要求20所述的方法,其中,所述接收活体检测请求之后,还包括:The method according to claim 20, wherein after receiving the living body detection request, the method further comprises:
    生成颜色遮罩,使得所述颜色遮罩所投射出的光线能够按照预设规律进行变化;Generating a color mask such that the light projected by the color mask can be changed according to a preset rule;
    最大化所述光线的变化强度。Maximize the intensity of the change in the light.
  22. 根据权利要求21所述的方法,其中,所述最大化所述光线的变化强度,包括:The method of claim 21 wherein said maximizing the intensity of change of said light comprises:
    对于同颜色的光线,通过调整变化前后的屏幕亮度来最大化光线的变化强度;For the same color of light, maximize the intensity of light changes by adjusting the brightness of the screen before and after the change;
    对于不同颜色的光线,通过调整变化前后的色差来最大化光线的变化强度。For different colors of light, maximize the intensity of the light by adjusting the color difference before and after the change.
  23. 根据权利要求16至22任一项所述的方法,其中,确定所述图像序列中所述检测对象的预设部位是否存在反射光信号,包括:The method according to any one of claims 16 to 22, wherein determining whether a preset portion of the detection object in the image sequence has a reflected light signal comprises:
    计算所述图像序列中帧之间的差分,所述帧之间的差分为帧间差或帧差,所述帧差为投射光线变化前后所对应的帧之间的差;Calculating a difference between frames in the image sequence, where a difference between the frames is an interframe difference or a frame difference, where the frame difference is a difference between frames corresponding to before and after the change of the projected light;
    根据所述差分确定所述图像序列中所述检测对象的预设部位是否存在所述投射光线所产生的反射光信号。Determining, according to the difference, whether a preset portion of the detection object in the image sequence has a reflected light signal generated by the projected light.
  24. 根据权利要求23所述的方法,其中,所述根据所述差分确定所述图像序列中所述检测对象的预设部位是否存在所述投射光线所产生的反射光信号,包括:The method according to claim 23, wherein the determining, according to the difference, whether a preset portion of the detection object in the image sequence has a reflected light signal generated by the projected light, comprises:
    确定所述差分是否大于预设阈值;Determining whether the difference is greater than a preset threshold;
    若是,则确定所述图像序列中检测对象的预设部位存在所述投射光线所产生的反射光信号;If yes, determining that the preset portion of the detection object in the image sequence has a reflected light signal generated by the projected light;
    若否,则确定所述图像序列中检测对象的预设部位不存在所述投射光线所产生的反射光信号。If not, it is determined that the reflected portion of the detected object in the image sequence does not have a reflected light signal generated by the projected light.
  25. 根据权利要求23所述的方法,其中,所述根据所述差分确 定所述图像序列中所述检测对象的预设部位是否存在所述投射光线所产生的反射光信号,包括:The method of claim 23, wherein said determining is based on said difference Determining, by the preset portion of the detection object in the image sequence, whether there is a reflected light signal generated by the projected light, comprising:
    通过预设全局特征算法或分类器对所述差分进行分类分析;Performing classification analysis on the difference by a preset global feature algorithm or a classifier;
    若分析结果指示所述检测对象的预设部位的帧间变化大于设定值,则确定所述图像序列中所述检测对象的预设部位存在所述投射光线所产生的反射光信号;If the analysis result indicates that the inter-frame change of the preset portion of the detection object is greater than the set value, determining that the preset portion of the detection object in the image sequence has a reflected light signal generated by the projected light;
    若分析结果指示所述检测对象的预设部位的帧间变化不大于设定值,则确定所述图像序列中所述检测对象的预设部位不存在所述投射光线所产生的反射光信号。If the analysis result indicates that the inter-frame change of the preset portion of the detection object is not greater than the set value, determining that the preset portion of the detection object in the image sequence does not have the reflected light signal generated by the projected light.
  26. 根据权利要求25所述的方法,其中,所述通过预设全局特征算法或分类器对所述差分进行分类分析,包括:The method according to claim 25, wherein said classifying said difference by said preset global feature algorithm or classifier comprises:
    对所述差分进行分析,以判断所述图像序列中是否存在所述投射光线所产生的反射光信号;And analyzing the difference to determine whether the reflected light signal generated by the projected light is present in the image sequence;
    若不存在所述投射光线所产生的反射光信号,则生成指示检测对象的预设部位的帧间变化不大于设定值的分析结果;If there is no reflected light signal generated by the projected light, generating an analysis result indicating that an inter-frame change of the preset portion of the detection target is not greater than a set value;
    若存在所述投射光线所产生的反射光信号,则通过预设全局特征算法或分类器判断存在的反射光信息的反射体是否为所述检测对象的预设部位,若为所述预设部位,则生成指示所述检测对象的预设部位的帧间变化大于设定值的分析结果,若不是所述预设部位,则生成指示所述检测对象的预设部位的帧间变化不大于设定值的分析结果。If the reflected light signal generated by the projected light is present, determining whether the reflector of the reflected light information existing is a preset part of the detection object by using a preset global feature algorithm or a classifier, if the preset part is And generating an analysis result indicating that the inter-frame change of the preset part of the detection object is greater than a set value, and if not the preset part, generating an inter-frame change indicating that the preset part of the detection object is not greater than The analysis result of the fixed value.
  27. 根据权利要求25所述的方法,其中,所述通过预设全局特征算法或分类器对所述差分进行分类分析,包括:The method according to claim 25, wherein said classifying said difference by said preset global feature algorithm or classifier comprises:
    通过预设全局特征算法或分类器对所述图像序列中的图像进行分类,以筛选出存在所述预设部位的帧,得到候选帧;Sorting the image in the image sequence by using a preset global feature algorithm or a classifier to filter out a frame in which the preset portion exists to obtain a candidate frame;
    分析所述候选帧的帧间差,以判断所述预设部位是否存在所述投射光线所产生的反射光信号;And analyzing an interframe difference of the candidate frame to determine whether the preset part has a reflected light signal generated by the projected light;
    若不存在所述投射光线所产生的反射光信号,则生成指示所述检测对象的预设部位的帧间变化不大于设定值的分析结果;If there is no reflected light signal generated by the projected light, generating an analysis result indicating that an inter-frame change of the preset portion of the detection target is not greater than a set value;
    若存在所述投射光线所产生的反射光信号,则生成指示所述检测对象的预设部位的帧间变化大于设定值的分析结果。If there is a reflected light signal generated by the projected light, an analysis result indicating that an inter-frame change of the preset portion of the detection target is greater than a set value is generated.
  28. 根据权利要求23所述的方法,其中,所述计算所述图像序列中帧之间的差分,包括:The method of claim 23 wherein said calculating a difference between frames in said sequence of images comprises:
    确定所述检测对象的位置变化程度小于预设变化值时,分别获取所述图像序列中邻近帧的像素坐标,基于像素坐标计算帧间差;或者,When it is determined that the degree of change of the position of the detection object is less than a preset change value, respectively acquiring pixel coordinates of adjacent frames in the image sequence, and calculating an inter-frame difference based on pixel coordinates; or
    确定所述检测对象的位置变化程度小于预设变化值时,分别从所述图像序列中获取投射光线变化前后所对应的帧的像素坐标,基于像素坐标计算帧差。 When it is determined that the degree of change of the position of the detection object is less than a preset change value, pixel coordinates of frames corresponding to before and after the change of the projected light are respectively acquired from the image sequence, and the frame difference is calculated based on the pixel coordinates.
  29. 根据权利要求28所述的方法,其中,基于像素坐标计算帧间差或帧差,包括:The method of claim 28, wherein calculating an interframe difference or a frame difference based on pixel coordinates comprises:
    对像素坐标进行变换,以最小化所述像素坐标的配准误差;Transforming pixel coordinates to minimize registration errors of the pixel coordinates;
    根据变换结果筛选出相关性符合预设条件的像素点;Filtering pixels corresponding to the preset conditions according to the transformation result;
    根据筛选出的像素点计算帧间差或帧差。The interframe difference or frame difference is calculated based on the selected pixel points.
  30. 根据权利要求16至29任一项所述的方法,其中,所述对所述检测对象进行监控,以得到图像序列之后,还包括:The method according to any one of claims 16 to 29, wherein after monitoring the detected object to obtain a sequence of images, the method further comprises:
    对所述图像序列进行去噪声处理。The image sequence is subjected to denoising processing.
  31. 一种活体检测装置,包括:A living body detecting device includes:
    一个或一个以上存储器;One or more memories;
    一个或一个以上处理器;其中,One or more processors; among them,
    所述一个或一个以上存储器存储有一个或者一个以上指令模块,经配置由所述一个或者一个以上处理器执行;其中,The one or more memories storing one or more instruction modules configured to be executed by the one or more processors; wherein
    所述一个或者一个以上指令模块包括:The one or more instruction modules include:
    接收单元,用于接收活体检测请求;a receiving unit, configured to receive a living body detection request;
    监控单元,用于对所述检测对象进行监控,以得到图像序列;a monitoring unit, configured to monitor the detection object to obtain an image sequence;
    检测单元,用于当确定所述图像序列中所述检测对象的预设部位存在反射光信号时,确定所述反射光信号与预设光信号样本是否匹配;以及当所述反射光信号与预设光信号样本匹配时,确定所述检测对象为活体。a detecting unit, configured to determine whether the reflected light signal matches a preset optical signal sample when determining that the preset portion of the detection object has a reflected light signal in the image sequence; and when the reflected light signal and the When the optical signal samples are matched, it is determined that the detection object is a living body.
  32. 根据权利要求31所述的装置,其中,The device according to claim 31, wherein
    所述检测单元,还用于确定所述图像序列中所述检测对象的预设部位不存在反射光信号或所述反射光信号与预设光信号样本不匹配时,确定所述检测对象为非活体。The detecting unit is further configured to: when it is determined that the preset portion of the detection object does not have a reflected light signal, or the reflected light signal does not match the preset optical signal sample, determine that the detection object is non- Living body.
  33. 根据权利要求31或32所述的装置,其中,所述一个或者一个以上指令模块还包括:The apparatus of claim 31 or 32, wherein the one or more instruction modules further comprise:
    启动单元,根据所述活体检测请求启动光源,所述光源用于向检测对象投射光线。The activation unit starts a light source according to the living body detection request, and the light source is used to project light to the detection object.
  34. 根据权利要求33所述的装置,其中,The device according to claim 33, wherein
    所述启动单元,具体用于根据所述活体检测请求启动检测界面,所述检测界面包括非检测区域,所述非检测区域用于闪现颜色遮罩,所述颜色遮罩作为光源向所述检测对象投射光线;或者,The activation unit is specifically configured to start a detection interface according to the living body detection request, the detection interface includes a non-detection area, the non-detection area is used to flash a color mask, and the color mask is used as a light source to detect The object casts light; or,
    所述启动单元,具体用于根据所述活体检测请求调整屏幕亮度,使得所述屏幕作为光源向所述检测对象投射光线;或者,The activation unit is configured to adjust a screen brightness according to the living body detection request, so that the screen is used as a light source to project light to the detection object; or
    所述启动单元,具体用于根据所述活体检测请求开启预设发光部件,使得所述发光部件作为光源向所述检测对象投射光线。The activation unit is configured to turn on a preset light-emitting component according to the living body detection request, so that the light-emitting component emits light as a light source to the detection object.
  35. 根据权利要求34所述的装置,其中,还包括生成单元; The apparatus according to claim 34, further comprising a generating unit;
    所述生成单元,用于生成颜色遮罩,使得所述颜色遮罩所投射出的光线能够按照预设规律进行变化,最大化所述光线的变化强度。The generating unit is configured to generate a color mask, so that the light projected by the color mask can be changed according to a preset rule to maximize the intensity of the change of the light.
  36. 根据权利要求35所述的装置,其中,所述生成单元,具体用于:The device according to claim 35, wherein the generating unit is specifically configured to:
    对于同颜色的光线,通过调整变化前后的屏幕亮度来最大化光线的变化强度;For the same color of light, maximize the intensity of light changes by adjusting the brightness of the screen before and after the change;
    对于不同颜色的光线,通过调整变化前后的色差来最大化光线的变化强度。For different colors of light, maximize the intensity of the light by adjusting the color difference before and after the change.
  37. 根据权利要求31至36任一项所述的装置,其中,所述检测单元包括计算子单元、判断子单元和确定子单元;The apparatus according to any one of claims 31 to 36, wherein the detecting unit comprises a calculating subunit, a judging subunit, and a determining subunit;
    所述计算子单元,用于计算所述图像序列中帧之间的差分,所述帧之间的差分为帧间差或帧差,所述帧差为投射光线变化前后所对应的帧之间的差;The calculating subunit is configured to calculate a difference between frames in the image sequence, where a difference between the frames is an interframe difference or a frame difference, where the frame difference is between frames corresponding to before and after the change of the projected light Poor
    所述判断子单元,用于根据所述差分确定所述图像序列中所述检测对象的预设部位是否存在所述投射光线所产生的反射光信号;The determining subunit is configured to determine, according to the difference, whether a preset part of the detection object in the image sequence has a reflected light signal generated by the projected light;
    所述确定子单元,用于在判断子单元确定所述投射光线所产生的反射光信号,反射光信号与预设光信号样本匹配时,确定所述检测对象为活体。The determining subunit is configured to determine, when the determining subunit determines the reflected light signal generated by the projected light, and the reflected light signal matches the preset optical signal sample, determining that the detecting object is a living body.
  38. 根据权利要求37所述的装置,其中,The device according to claim 37, wherein
    所述计算子单元,具体用于确定所述检测对象的位置变化程度小于预设变化值时,分别获取所述图像序列中邻近帧的像素坐标,基于像素坐标计算帧间差;或者,The calculating subunit, specifically for determining that the degree of change of the position of the detection object is less than a preset change value, respectively acquiring pixel coordinates of adjacent frames in the image sequence, and calculating an interframe difference based on pixel coordinates; or
    所述计算子单元,具体用于确定所述检测对象的位置变化程度小于预设变化值时,分别从所述图像序列中获取投射光线变化前后所对应的帧的像素坐标,基于像素坐标计算帧差。The calculating subunit, specifically for determining that the degree of change of the position of the detecting object is less than a preset change value, respectively acquiring pixel coordinates of a frame corresponding to the frame before and after the change of the projected light from the image sequence, and calculating the frame based on the pixel coordinates difference.
  39. 一种非易失性计算机可读存储介质,存储有计算机可读指令,可以使至少一个处理器执行如权利要求1-30任一项所述的方法。 A non-transitory computer readable storage medium storing computer readable instructions for causing at least one processor to perform the method of any of claims 1-30.
PCT/CN2017/117958 2016-12-30 2017-12-22 Living body detection method, apparatus, and storage medium WO2018121428A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611257052.2 2016-12-30
CN201611257052 2016-12-30

Publications (1)

Publication Number Publication Date
WO2018121428A1 true WO2018121428A1 (en) 2018-07-05

Family

ID=62031297

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2017/117958 WO2018121428A1 (en) 2016-12-30 2017-12-22 Living body detection method, apparatus, and storage medium
PCT/CN2018/111218 WO2019080797A1 (en) 2016-12-30 2018-10-22 Living body detection method, terminal, and storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/111218 WO2019080797A1 (en) 2016-12-30 2018-10-22 Living body detection method, terminal, and storage medium

Country Status (2)

Country Link
CN (1) CN107992794B (en)
WO (2) WO2018121428A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110969077A (en) * 2019-09-16 2020-04-07 成都恒道智融信息技术有限公司 Living body detection method based on color change
CN111444831A (en) * 2020-03-25 2020-07-24 深圳中科信迅信息技术有限公司 Method for recognizing human face through living body detection
CN111797735A (en) * 2020-06-22 2020-10-20 深圳壹账通智能科技有限公司 Face video recognition method, device, equipment and storage medium
CN113298747A (en) * 2020-02-19 2021-08-24 北京沃东天骏信息技术有限公司 Picture and video detection method and device
WO2023221996A1 (en) * 2022-05-16 2023-11-23 北京旷视科技有限公司 Living body detection method, electronic device, storage medium, and program product

Families Citing this family (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107992794B (en) * 2016-12-30 2019-05-28 腾讯科技(深圳)有限公司 A kind of biopsy method, device and storage medium
CN107832712A (en) * 2017-11-13 2018-03-23 深圳前海微众银行股份有限公司 Biopsy method, device and computer-readable recording medium
CN109101881B (en) * 2018-07-06 2021-08-20 华中科技大学 Real-time blink detection method based on multi-scale time sequence image
CN113408403A (en) * 2018-09-10 2021-09-17 创新先进技术有限公司 Living body detection method, living body detection device, and computer-readable storage medium
CN111310514A (en) * 2018-12-11 2020-06-19 上海耕岩智能科技有限公司 Method for reconstructing biological characteristics of coded mask and storage medium
CN111310515A (en) * 2018-12-11 2020-06-19 上海耕岩智能科技有限公司 Code mask biological characteristic analysis method, storage medium and neural network
CN109660745A (en) * 2018-12-21 2019-04-19 深圳前海微众银行股份有限公司 Video recording method, device, terminal and computer readable storage medium
CN111488756B (en) * 2019-01-25 2023-10-03 杭州海康威视数字技术股份有限公司 Face recognition-based living body detection method, electronic device, and storage medium
CN109961025B (en) * 2019-03-11 2020-01-24 烟台市广智微芯智能科技有限责任公司 True and false face identification and detection method and detection system based on image skewness
CN110414346A (en) * 2019-06-25 2019-11-05 北京迈格威科技有限公司 Biopsy method, device, electronic equipment and storage medium
CN110298312B (en) * 2019-06-28 2022-03-18 北京旷视科技有限公司 Living body detection method, living body detection device, electronic apparatus, and computer-readable storage medium
CN112183156B (en) * 2019-07-02 2023-08-11 杭州海康威视数字技术股份有限公司 Living body detection method and equipment
CN110516644A (en) * 2019-08-30 2019-11-29 深圳前海微众银行股份有限公司 A kind of biopsy method and device
CN110688946A (en) * 2019-09-26 2020-01-14 上海依图信息技术有限公司 Public cloud silence in-vivo detection device and method based on picture identification
CN111126229A (en) * 2019-12-17 2020-05-08 中国建设银行股份有限公司 Data processing method and device
CN111274928B (en) * 2020-01-17 2023-04-07 腾讯科技(深圳)有限公司 Living body detection method and device, electronic equipment and storage medium
CN111310575B (en) * 2020-01-17 2022-07-08 腾讯科技(深圳)有限公司 Face living body detection method, related device, equipment and storage medium
SG10202005395VA (en) * 2020-06-08 2021-01-28 Alipay Labs Singapore Pte Ltd Face liveness detection system, device and method
CN111783640A (en) * 2020-06-30 2020-10-16 北京百度网讯科技有限公司 Detection method, device, equipment and storage medium
CN111899232B (en) * 2020-07-20 2023-07-04 广西大学 Method for nondestructive detection of bamboo-wood composite container bottom plate by image processing
CN111914763B (en) * 2020-08-04 2023-11-28 网易(杭州)网络有限公司 Living body detection method, living body detection device and terminal equipment
CN112528909B (en) * 2020-12-18 2024-05-21 平安银行股份有限公司 Living body detection method, living body detection device, electronic equipment and computer readable storage medium
CN113807159A (en) * 2020-12-31 2021-12-17 京东科技信息技术有限公司 Face recognition processing method, device, equipment and storage medium thereof
CN112818782B (en) * 2021-01-22 2021-09-21 电子科技大学 Generalized silence living body detection method based on medium sensing
CN113837930B (en) * 2021-09-24 2024-02-02 重庆中科云从科技有限公司 Face image synthesis method, device and computer readable storage medium
CN113869219B (en) * 2021-09-29 2024-05-21 平安银行股份有限公司 Face living body detection method, device, equipment and storage medium
CN115995102A (en) * 2021-10-15 2023-04-21 北京眼神科技有限公司 Face silence living body detection method, device, storage medium and equipment
CN116978078A (en) * 2022-04-14 2023-10-31 京东科技信息技术有限公司 Living body detection method, living body detection device, living body detection system, electronic equipment and computer readable medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951769A (en) * 2015-07-02 2015-09-30 京东方科技集团股份有限公司 Living body recognition device, living body recognition method and living body authentication system
CN105260731A (en) * 2015-11-25 2016-01-20 商汤集团有限公司 Human face living body detection system and method based on optical pulses
CN105637532A (en) * 2015-06-08 2016-06-01 北京旷视科技有限公司 Vivo detection method, vivo detection system and computer program product
CN105912986A (en) * 2016-04-01 2016-08-31 北京旷视科技有限公司 In vivo detection method, in vivo detection system and computer program product
CN107273794A (en) * 2017-04-28 2017-10-20 北京建筑大学 Live body discrimination method and device in a kind of face recognition process

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105612533B (en) * 2015-06-08 2021-03-02 北京旷视科技有限公司 Living body detection method, living body detection system, and computer program product
CN106529512B (en) * 2016-12-15 2019-09-10 北京旷视科技有限公司 Living body faces verification method and device
CN107992794B (en) * 2016-12-30 2019-05-28 腾讯科技(深圳)有限公司 A kind of biopsy method, device and storage medium
CN107220635A (en) * 2017-06-21 2017-09-29 北京市威富安防科技有限公司 Human face in-vivo detection method based on many fraud modes

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105637532A (en) * 2015-06-08 2016-06-01 北京旷视科技有限公司 Vivo detection method, vivo detection system and computer program product
CN104951769A (en) * 2015-07-02 2015-09-30 京东方科技集团股份有限公司 Living body recognition device, living body recognition method and living body authentication system
CN105260731A (en) * 2015-11-25 2016-01-20 商汤集团有限公司 Human face living body detection system and method based on optical pulses
CN105912986A (en) * 2016-04-01 2016-08-31 北京旷视科技有限公司 In vivo detection method, in vivo detection system and computer program product
CN107273794A (en) * 2017-04-28 2017-10-20 北京建筑大学 Live body discrimination method and device in a kind of face recognition process

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110969077A (en) * 2019-09-16 2020-04-07 成都恒道智融信息技术有限公司 Living body detection method based on color change
CN113298747A (en) * 2020-02-19 2021-08-24 北京沃东天骏信息技术有限公司 Picture and video detection method and device
CN111444831A (en) * 2020-03-25 2020-07-24 深圳中科信迅信息技术有限公司 Method for recognizing human face through living body detection
CN111797735A (en) * 2020-06-22 2020-10-20 深圳壹账通智能科技有限公司 Face video recognition method, device, equipment and storage medium
WO2023221996A1 (en) * 2022-05-16 2023-11-23 北京旷视科技有限公司 Living body detection method, electronic device, storage medium, and program product

Also Published As

Publication number Publication date
CN107992794A (en) 2018-05-04
WO2019080797A1 (en) 2019-05-02
CN107992794B (en) 2019-05-28

Similar Documents

Publication Publication Date Title
WO2018121428A1 (en) Living body detection method, apparatus, and storage medium
WO2017181769A1 (en) Facial recognition method, apparatus and system, device, and storage medium
WO2019096008A1 (en) Identification method, computer device, and storage medium
US9443155B2 (en) Systems and methods for real human face recognition
US9953506B2 (en) Alarming method and device
US11074466B2 (en) Anti-counterfeiting processing method and related products
US10061969B2 (en) Fingerprint unlocking method and terminal
KR102488563B1 (en) Apparatus and Method for Processing Differential Beauty Effect
EP3382600A1 (en) Method of recognition based on iris recognition and electronic device supporting the same
CN108345819B (en) Method and device for sending alarm message
WO2019020014A1 (en) Unlocking control method and related product
WO2015003522A1 (en) Face recognition method, apparatus, and mobile terminal
US20170243063A1 (en) Authentication method, electronic device, and storage medium
CN108259758B (en) Image processing method, image processing apparatus, storage medium, and electronic device
US11328044B2 (en) Dynamic recognition method and terminal device
WO2019011098A1 (en) Unlocking control method and relevant product
CN107241552B (en) Image acquisition method, device, storage medium and terminal
WO2019154184A1 (en) Biological feature recognition method and mobile terminal
CN112037162A (en) Facial acne detection method and equipment
WO2019015418A1 (en) Unlocking control method and related product
US20200125874A1 (en) Anti-Counterfeiting Processing Method, Electronic Device, and Non-Transitory Computer-Readable Storage Medium
CN110765924A (en) Living body detection method and device and computer-readable storage medium
US10671713B2 (en) Method for controlling unlocking and related products
WO2019011207A1 (en) Method for iris recognition and related products
KR102497444B1 (en) Object recognition method and mobile terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17887997

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17887997

Country of ref document: EP

Kind code of ref document: A1