Video and living body detection method, system, device, storage medium and program product

By using the color value of video frames to detect the white balance parameters in vivo detection, and using the white balance sequence to verify the living body, the problems of low efficiency and narrow application range of existing vivo detection methods are solved, and effective defense against hijacking camera attacks are achieved.

CN114387548BActive Publication Date: 2025-03-21YUANLI JINZHI (CHONGQING) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111676628.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-03-21
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The existing live detection methods have problems with low detection efficiency, narrow application range, and the inability to defend against attack methods that hijack camera uploads.

Method used

By obtaining the video to be detected, the target video frame and the reference video frame are extracted, the white balance parameter of the video is determined based on the color values ​​of both, and the white balance sequence is used to verify whether the target object is a living body.

Benefits of technology

It realizes more efficient live detection, expands the scope of application, and can effectively defend against attacks that hijack camera uploads.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114387548B_ABST
    Figure CN114387548B_ABST
Patent Text Reader

Abstract

The present application provides a video and living body detection method, system, device, storage medium and program product. The method comprises: obtaining a video to be detected; extracting a target video frame and a reference video frame of the target video frame from the video to be detected, wherein the reference video frame is a video frame captured before the white balance parameter takes effect, and the target video frame is a video frame in the video to be detected that is located after the reference video frame; based on the color value of the target video frame and the color value of the reference video frame, determining whether the white balance parameter of the video to be detected is effective, and the effectiveness of the white balance parameter of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected. The video detection method of the present application helps to better realize white balance living body detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a video and living body detection method, system, device, storage medium and program product. Background Art

[0002] Liveness detection technology is a technology that detects whether the photo used for face comparison is taken by a real person. It can effectively prevent others from forging portraits by using screen copying, printed paper copying or masks, and has important applications in consumer finance, entertainment games and other fields. In recent years, the deception methods of the black industry have become more sophisticated. They can directly upload pre-shot videos or pictures to the API by hijacking the camera and other means, thereby deceiving the liveness detection model. This attack method cannot be defended by simply using the liveness detection model. At present, motion liveness, lip reading liveness and colorful liveness can well defend against this attack, but motion liveness, lip reading liveness and colorful liveness still have many defects. For example, motion liveness and lip reading liveness need to spend a long time interacting with users, and the detection efficiency is low. Colorful liveness has high requirements for the brightness of the ambient light, the screen film of the mobile phone, the brightness of the mobile phone screen, etc., and its application range is narrow. It can be seen that the liveness detection methods in related technologies need to be improved. Summary of the invention

[0003] The present application provides a video and living body detection method, system, device, storage medium and program product, which helps to better achieve white balance living body detection. The specific technical solution is as follows:

[0004] In a first aspect of an embodiment of the present application, a video detection method is first provided, the method comprising:

[0005] Get the video to be detected;

[0006] Extracting a target video frame and a reference video frame of the target video frame from the video to be detected, wherein the reference video frame is a video frame captured before the white balance parameter takes effect, and the target video frame is a video frame in the video to be detected that is located after the reference video frame;

[0007] Based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame, it is determined whether the white balance parameters of the video to be detected are effective. The effectiveness of the white balance parameters of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected.

[0008] In a second aspect of an embodiment of the present application, a living body detection method is provided, comprising:

[0009] Obtain the video to be detected of the target object;

[0010] Based on the color values ​​of each pixel on the target video frame in the video to be detected and the color values ​​of each pixel on the reference video frame, determining whether the white balance parameter of the video to be detected is effective; the reference video frame is a video frame captured before the white balance parameter is effective, and the target video frame is a video frame in the video to be detected that is located after the reference video frame; the effectiveness of the white balance parameter of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected;

[0011] When it is determined that the white balance parameters of the video to be detected are effective, it is verified whether the target object is a living body based on a target white balance sequence and a recorded white balance sequence parsed from the video to be detected, wherein the target white balance sequence is used to indicate that the white balance parameters of the camera device are adjusted during the recording process of the video to be detected.

[0012] In a third aspect of the embodiments of the present application, a video detection system is provided, the system comprising: a user terminal and a server;

[0013] The user terminal is used to record the video to be detected of the target object through a camera device, and send the video to be detected to the server;

[0014] The server is used to extract a target video frame and a reference video frame of the target video frame from the video to be detected, and determine whether the white balance parameter of the video to be detected is effective based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame;

[0015] Among them, the effectiveness of the white balance parameters of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected; the reference video frame is: the video frame captured before the white balance parameters take effect, and the target video frame is the video frame in the video to be detected that is located after the reference video frame.

[0016] In a fourth aspect of the embodiments of the present application, a video detection device is provided, the device comprising:

[0017] A first acquisition module is used to acquire a video to be detected;

[0018] An extraction module is used to extract a target video frame and a reference video frame of the target video frame from the video to be detected, wherein the reference video frame is a video frame captured before the white balance parameter takes effect, and the target video frame is a video frame in the video to be detected that is located after the reference video frame;

[0019] The first determination module is used to determine whether the white balance parameters of the video to be detected are effective based on the color values ​​of each pixel on the target video frame and the color values ​​of each pixel on the reference video frame. The effectiveness of the white balance parameters of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected.

[0020] In a fifth aspect of the embodiments of the present application, a living body detection device is provided, the device comprising:

[0021] The second acquisition module is used to acquire the video to be detected of the target object;

[0022] A fourth determination module is used to determine whether the white balance parameter of the video to be detected is effective based on the color value of each pixel on the target video frame in the video to be detected and the color value of each pixel on the reference video frame; the reference video frame is a video frame captured before the white balance parameter is effective, and the target video frame is a video frame in the video to be detected that is located after the reference video frame; the effectiveness of the white balance parameter of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected;

[0023] The second verification module is used to verify whether the target object is a living body based on a target white balance sequence and a recorded white balance sequence parsed from the video to be detected when it is determined that the white balance parameters of the video to be detected are effective, wherein the target white balance sequence is used to indicate that the white balance parameters of the camera device are adjusted during the recording process of the video to be detected.

[0024] In a sixth aspect of the embodiments of the present application, there is further provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0025] Memory, used to store computer programs;

[0026] The processor is used to implement the steps of the video detection method described in the first aspect of the embodiment of the present application, or implement the steps of the living body detection method described in the second aspect of the embodiment of the present application when executing the program stored in the memory.

[0027] In the seventh aspect of the embodiments of the present application, a computer-readable storage medium is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the steps of the video detection method described in the first aspect of the embodiments of the present application, or executes the steps of the liveness detection method described in the second aspect of the embodiments of the present application.

[0028] In an eighth aspect of the embodiments of the present application, a computer program product is also provided, comprising a computer program / instructions, characterized in that when the computer program / instructions are executed by a processor, the steps of the video detection method as described in the first aspect of the embodiments of the present application are implemented, or the steps of the liveness detection method as described in the second aspect of the embodiments of the present application are implemented.

[0029] Through the video detection method of the present application, the video to be detected is first obtained, and then the target video frame and the reference video frame of the target video frame are extracted from the video to be detected. The reference video frame is the video frame captured before the white balance parameter takes effect, and the target video frame is the video frame in the video to be detected that is located after the reference video frame. Next, based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame, it is determined whether the white balance parameters of the video to be detected are effective. The effectiveness of the white balance parameters of the video to be detected indicates that the white balance information of the camera device has changed during the process of recording at least one target video frame of the video to be detected. The video detection method of the present application has the following multiple technical effects:

[0030] 1. By detecting whether the white balance parameters of each video frame in the video to be detected are effective, it can be detected whether the white balance parameters of the video to be detected are effective (whether it is collected after the camera device sets the white balance parameters). If the white balance parameters of all video frames are not effective, it can be determined that the white balance liveness detection has failed (for example, the video to be detected is a suspected attack video), and other steps of the subsequent white balance liveness detection will not be executed, avoiding unnecessary waste of computing resources on the server.

[0031] Second, by detecting whether the white balance parameters of the video to be detected are effective, it provides technical support for further detecting whether the white balance sequence actually used in the video to be detected matches the pre-given target white balance parameter sequence, thereby realizing white balance liveness detection, which can overcome the defects of narrow application range and low detection efficiency of liveness detection methods in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0033] Figure 1 It is a schematic diagram of an implementation environment shown in an embodiment of the present application;

[0034] Figure 2 is a flow chart of a video detection method shown in an embodiment of the present application;

[0035] Figure 3 is a flow chart of a living body detection method shown in an embodiment of the present application;

[0036] Figure 4 is a structural block diagram of another video detection device shown in an embodiment of the present application;

[0037] Figure 5 is a structural block diagram of a living body detection device shown in an embodiment of the present application;

[0038] Figure 6 It is a structural schematic diagram of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0040] In recent years, research on computer vision, deep learning, machine learning, image processing, image recognition and other technologies based on artificial intelligence has made important progress. Artificial Intelligence (AI) is an emerging science and technology that studies and develops theories, methods, technologies and application systems for simulating and extending human intelligence. Artificial intelligence is a comprehensive discipline involving many types of technologies such as chips, big data, cloud computing, the Internet of Things, distributed storage, deep learning, machine learning, neural networks, etc. Computer vision, as an important branch of artificial intelligence, specifically allows machines to recognize the world. Computer vision technology usually includes face recognition, liveness detection, fingerprint recognition and anti-counterfeiting verification, biometric recognition, face detection, pedestrian detection, target detection, pedestrian recognition, image processing, image recognition, image semantic understanding, image retrieval, text recognition, video processing, video content recognition, behavior recognition, 3D reconstruction, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), computational photography, robot navigation and positioning and other technologies. With the research and progress of artificial intelligence technology, this technology has been applied in many fields, such as security, urban management, traffic management, building management, park management, face access, face attendance, logistics management, warehouse management, robots, intelligent marketing, computational photography, mobile phone imaging, cloud services, smart homes, wearable devices, driverless, autonomous driving, smart medical care, face payment, face unlocking, fingerprint unlocking, identity verification, smart screens, smart TVs, cameras, mobile Internet, live streaming, beauty, makeup, medical beauty, and intelligent temperature measurement. In related technologies, motion liveness detection requires users to perform certain actions according to prompts, and lip reading liveness detection requires users to say random numbers on the screen according to prompts, which is often impossible with photos. However, the interaction time for this type of detection is too long, and it is too difficult for some users to complete, resulting in low overall detection efficiency.

[0041] In colorful liveness detection, the screen of the user terminal will emit light of various colors according to the random sequence sent by the server. When verifying liveness, the server will compare the light sequence in the recorded video with the light sequence sent by the server to determine whether the video is real and not hijacked. However, colorful liveness detection has many defects, such as: (1) The screen lighting has very high requirements for the environment and must be effective in a dark environment; (2) It has high requirements for mobile phone screen films and is not effective for mobile phone films with poor light transmittance; (3) In order to illuminate as much light as possible, the mobile phone screen needs to be brightened, which shortens the distance between the face and the mobile phone screen, causing glare and reducing the user experience.

[0042] Under the above background conditions, liveness detection based on white balance has emerged. Therefore, how to perform liveness detection based on white balance has become one of the problems that need to be solved urgently.

[0043] In order to solve the above problems, the present application provides a video detection method, which will be described in detail below.

[0044] The video detection method provided in this application can be applied to a user terminal, where the user terminal collects the video to be detected of the target object through a camera device, and performs the detection of the video to be detected locally through a processor. The video detection method provided in this application can also be applied to a server, where the server obtains the video to be detected of the target object collected by the camera device, and performs video detection on the video to be detected.

[0045] Of course, the video detection method of the present application can also be applied to scenarios where the user terminal and the server collaborate, such as Figure 1 shown. Figure 1 This is a schematic diagram of an implementation environment shown in an embodiment of the present application. Figure 1 In the embodiment, the user terminal is connected to the server through communication. The user terminal collects the video to be detected of the target object through a built-in camera device or an external camera device, and then sends the video to be detected to the server, and the server detects the video to be detected. The user terminal can be a smart phone, a tablet, a computer and other portable smart devices, and the server can be a single server or a cluster of multiple servers. This embodiment does not specifically limit the types of user terminals and servers.

[0046] In order to better describe the video detection method of the present application, it is particularly noted that the following embodiments of the present application are based on Figure 1 The application scenario shown is taken as an example to illustrate the specific implementation of the video detection method.

[0047] Figure 2 is a flow chart of a video detection method shown in an embodiment of the present application. Figure 2The video detection method of the present application may specifically include the following steps:

[0048] Step S21: Obtain the video to be detected.

[0049] In this embodiment, the user terminal collects the video to be detected of the target object through a built-in camera device or an external camera device, and then sends the video to be detected to the server.

[0050] Optionally, if the executor of the method provided in the embodiment of the present application is a user terminal, after the user terminal captures the video to be detected of the target object through a built-in camera device or an external camera device, the video detection method is directly executed by the user terminal.

[0051] Therefore, in the above step S21, the video to be detected is obtained by the server from the user terminal or an external camera device, or the user terminal captures the video to be detected of the target object.

[0052] For example, when a user needs to log into a certain application software after face verification, the user terminal can collect the user's face video through a camera device and send it to the server.

[0053] The method of the present application is applicable to white balance liveness detection scenarios. When performing white balance liveness detection, the server sends the target white balance sequence to the user terminal in advance, so that the user terminal sets the white balance of the camera device according to the various white balance parameters in the target white balance sequence during the process of capturing the video of the target object through the camera device. After completing the video capture, the user terminal sends the video to be detected that is captured using the white balance parameters given by the server to the server. In this way, after receiving the video to be detected, the server verifies whether the white balance sequence actually used in the video matches the target white balance sequence. If it matches, it means that the video is not shot in advance by illegally hijacking the camera device, and it contains a living body and is legal.

[0054] For example, when user A transfers money from a bank card over the Internet, the bank's backend server can prompt the user to perform facial video authentication. After user A's user terminal obtains the target white balance sequence sent by the backend server, in the process of capturing user A's facial video through a camera device, the camera device is set to white balance according to the various white balance parameters in the target white balance sequence, and then the recorded user's facial video is sent to the server. After receiving the video, the server verifies whether the recorded white balance sequence actually used therein matches the target white balance sequence. If they match, it indicates that the video is legal and not an attacking video, and the user is allowed to continue with subsequent operations. The present application provides a specific method for verifying whether the white balance sequence actually used in the video to be detected matches the target white balance sequence sent by the server.

[0055] Step S22: extracting a target video frame and a reference video frame of the target video frame from the video to be detected, wherein the reference video frame is a video frame captured before the white balance parameter takes effect, and the target video frame is a video frame in the video to be detected that is located after the reference video frame.

[0056] In this embodiment, the video to be detected is composed of multiple video frames. If the user terminal uses the white balance parameters in the white balance sequence when recording the video, generally, multiple video frames without using the white balance parameters are first collected when starting to record the video, and then the camera device is set using the white balance parameters, and then multiple subsequent video frames after the white balance parameters are set are collected.

[0057] After receiving the video to be detected, the server first decodes the video to be detected into single frames, and then extracts at least one video frame that does not use white balance parameters as a reference video frame. When extracting the reference video frame, it can generally be extracted from multiple video frames that do not use white balance parameters collected when starting to record the video.

[0058] The target video frame is any video frame after the reference video frame. For example, the video frames of the video to be detected include video frame 1, video frame 2, video frame 3 and video frame 4, wherein video frame 1 and video frame 2 are video frames collected without using white balance parameters. If video frame 1 is the reference video frame, then any one of video frame 2, video frame 3 and video frame 4 can be the target video frame. If video frame 1 and video frame 2 are reference video frames, then any one of video frame 3 and video frame 4 can be the target video frame.

[0059] Step S23: Based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame, determine whether the white balance parameters of the video to be detected are effective. The effectiveness of the white balance parameters of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected.

[0060] Specifically, step S23 may include:

[0061] Determining whether a white balance parameter of the target video frame is effective based on a color value of each pixel on the target video frame and a color value of each pixel on the reference video frame;

[0062] Obtaining a detection result of whether the white balance parameter of each target video frame in the video to be detected is effective;

[0063] Whether the white balance parameters of the video to be detected are effective is determined according to the detection results of whether the white balance parameters of each of the target video frames are effective.

[0064] In this embodiment, each target video frame in the video to be detected is independently compared with the reference video frame.

[0065] The white balance parameters of a target video frame take effect, which can be understood as the camera device setting the white balance parameters when recording the target video frame, resulting in a change in the white balance information of the camera device.

[0066] Specifically, step S23 may further include:

[0067] comparing a first color mean of the target video frame with a second color mean of the reference video frame;

[0068] When the difference between the first color mean of the target video frame and the second color mean of the reference video frame is greater than the target difference, it is determined that the white balance parameter of the video to be detected is effective.

[0069] Specifically, when the difference between the first color mean of the target video frame and the second color mean of the reference video frame is greater than a target difference, determining that the white balance parameter of the video to be detected is effective includes:

[0070] When a difference between a first color mean value of the target video frame and a second color mean value of the reference video frame is greater than a target difference value, determining that a white balance parameter of the target video frame is effective;

[0071] After obtaining a detection result of whether the white balance parameters of each target video frame in the video to be detected are effective, if there is at least one target video frame in which the white balance parameters are effective, it is determined that the white balance parameters of the video to be detected are effective.

[0072] In various embodiments of the present application, when the white balance parameters of a certain target video frame are detected to be effective, if there are other target video frames that have not been detected, it is not possible to determine that the white balance parameters of the video to be detected are effective. It is necessary to detect whether the white balance parameters of all target video frames are effective, and then determine whether the white balance parameters of the video to be detected are effective based on the detection results of whether the white balance parameters of all target video frames in the video to be detected are effective. Otherwise, if the subsequent liveness detection is entered after only one target video frame is detected to be effective, the video to be detected that should have successfully performed the liveness detection may eventually fail the liveness detection, which will be described in detail below.

[0073] In this embodiment, if there is only one reference video frame, the color value (first color mean) of the target video frame can be directly compared with the color value (second color mean) of the reference video frame. In this embodiment, the color value can be represented by a value in the YUV color domain, which will be described in detail later.

[0074] In one implementation, when there are multiple reference video frames, comparing the first color mean of the target video frame with the second color mean of the reference video frame may specifically include:

[0075] For each reference video frame, obtaining a second color mean value of the reference video frame according to the mean value of the color values ​​of each pixel point on the reference video frame;

[0076] Obtaining a first color mean value of the target video frame according to the mean value of the color values ​​of each pixel point on the target video frame;

[0077] The first color mean of the target video frame is compared with the mean of the second color mean of each reference video frame.

[0078] In this embodiment, for a video frame, the color mean refers to the mean of the color values ​​of each pixel on the video frame, and each pixel has a color value. If there are multiple reference video frames, for each reference video frame, the mean of the color values ​​of each pixel on the reference video frame can be used as the color mean of the reference video frame (i.e., the second color mean), and the mean of the color values ​​of each pixel on the target video frame can be used as the color mean of the target video frame (i.e., the first color mean), and then the first color mean of the target video frame is compared with the mean of the second color means of each reference video frame.

[0079] In a specific implementation, when the difference between the first color mean of the target video frame and the second color mean of the reference video frame is greater than the target difference, determining that the white balance parameter of the video to be detected is effective may include:

[0080] When a difference between a color temperature value corresponding to a first color mean value of the target video frame and a color temperature value corresponding to a second color mean value of the reference video frame is greater than a target temperature difference value, determining that a white balance parameter of the target video frame is effective;

[0081] After obtaining the detection result of whether the white balance parameters of all target video frames in the video to be detected are effective, if there is at least one target video frame in which the white balance parameters are effective, it is determined that the white balance parameters of the video to be detected are effective.

[0082] In this embodiment, the color temperature value corresponding to the first color mean and the color temperature value corresponding to the second color mean can be calculated, and different color mean values ​​correspond to different color temperature values. Different white balance parameters also correspond to different color temperature values. The larger the difference between the color mean values, the larger the gap between the color temperature values, and also the larger the difference between the white balance parameters.

[0083] Therefore, if the difference between the first color mean of the target video frame and the second color mean of the reference video frame is greater than the target difference, it can be determined that the target video frame is captured after the camera device of the user terminal performs white balance setting, that is, the white balance parameters of the target video frame are effective.

[0084] In actual implementation, it is also possible not to calculate the color temperature values ​​corresponding to the first color mean and the second color mean, and directly determine whether the white balance parameter of the target video frame is effective by the difference between the first color mean and the second color mean. Specifically, if the difference between the first color mean of the target video frame and the second color mean of the reference video frame is greater than the target difference, it can be determined that the target video frame is captured after the camera device of the user terminal performs white balance settings. Conversely, if the difference between the first color mean of the target video frame and the second color mean of the reference video frame is not greater than the target difference, it can be determined that the target video frame is captured by the camera device of the user terminal without performing white balance settings.

[0085] In this embodiment, the server may send at least one white balance sequence to the user terminal to prompt the user terminal to set the white balance of the camera device according to any one of the at least one white balance sequence, and record the video of the target object through the camera device after the setting. After receiving the video to be detected sent by the user terminal, the server first determines whether the white balance parameters of each target video frame in the video are effective, that is, detects whether the video to be detected is collected after the camera device has set the white balance.

[0086] For example, the server sends a white balance sequence to the user terminal, prompting the user terminal to set the white balance of the camera device according to each white balance parameter in the white balance sequence, and record the user's face video through the camera device after the setting. After receiving the white balance sequence, the user terminal starts recording the video. For example, the first 10 video frames can be recorded without using the white balance parameters (to facilitate the server to obtain the reference video frame), and then the camera device is set to white balance using the first white balance parameter in the white balance sequence, and the 11th to 15th video frames are collected through the camera device after the setting, and then the camera device is set to white balance using the second white balance parameter in the white balance sequence, and the 16th to 20th video frames are collected through the camera device after the setting, and then the camera device is set to white balance using the third white balance parameter in the white balance sequence, and the 21st to 25th video frames are collected through the camera device after the setting, and so on, until a video of a preset length (or preset number of frames) is collected. After the server obtains the video recorded by the user terminal, if the 1st to 10th video frames are used as reference video frames, then starting from the 11th video frame, the first color mean of each target video frame is compared with the second color mean of the reference video frame to determine whether the white balance parameters of the target video frame are effective and whether the camera device of the user terminal uses the white balance parameters to capture the video. In the same way, the comparison results of each target video frame are obtained respectively.

[0087] Through the video detection method of the present application, the video to be detected is first obtained, and then the target video frame and the reference video frame of the target video frame are extracted from the video to be detected. The reference video frame is the video frame captured before the white balance parameter takes effect, and the target video frame is the video frame in the video to be detected that is located after the reference video frame. Next, based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame, it is determined whether the white balance parameters of the video to be detected are effective. The effectiveness of the white balance parameters of the video to be detected indicates that the white balance information of the camera device has changed during the process of recording at least one target video frame of the video to be detected. The video detection method of the present application has the following multiple technical effects:

[0088] 1. By detecting whether the white balance parameters of each video frame in the video to be detected are effective, it can be detected whether the white balance parameters of the video to be detected are effective (whether it is collected after the camera device sets the white balance parameters). If the white balance parameters of all video frames are not effective, it can be determined that the white balance liveness detection has failed (for example, the video to be detected is a suspected attack video), and other steps of the subsequent white balance liveness detection will not be executed, avoiding unnecessary waste of computing resources on the server.

[0089] Second, by detecting whether the white balance parameters of the video to be detected are effective, it provides technical support for further detecting whether the white balance sequence actually used in the video to be detected matches the pre-given target white balance sequence, thereby realizing white balance liveness detection, which can overcome the defects of narrow application range and low detection efficiency of liveness detection methods in related technologies.

[0090] In combination with the above embodiments, in one implementation manner, before determining whether the white balance parameter of the video to be detected is effective based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame, the video detection method of the present application may further include:

[0091] A target area is selected from the target video frame and the reference video frame respectively, and the target area is an area used for living body detection in the video to be detected.

[0092] On this basis, determining whether the white balance parameters of the video to be detected are effective based on the color values ​​of each pixel on the target video frame and the color values ​​of each pixel on the reference video frame may include:

[0093] Based on the color values ​​corresponding to each pixel point on the target area in the target video frame and the color values ​​corresponding to each pixel point on the target area in the reference video frame, it is determined whether the white balance parameters of the video to be detected are effective.

[0094] Specifically, determining whether the white balance parameter of the video to be detected is effective based on the color value corresponding to each pixel point on the target area in the target video frame and the color value corresponding to each pixel point on the target area in the reference video frame includes:

[0095] Determining whether a white balance parameter of the target video frame is effective based on a color value corresponding to each pixel point on the target area in the target video frame and a color value corresponding to each pixel point on the target area in the reference video frame;

[0096] Obtaining a detection result of whether the white balance parameter of each target video frame in the video to be detected is effective;

[0097] Whether the white balance parameters of the video to be detected are effective is determined according to the detection results of whether the white balance parameters of each of the target video frames are effective.

[0098] In this embodiment, key point detection can be performed on the target video frame and the reference video frame respectively, and then the target area can be framed from the target video frame and the reference video frame respectively according to the key point detection results. Next, the color values ​​corresponding to the pixels of the framed target area on the target video frame and the reference video frame are determined, and the color values ​​of the pixels of the target area on the target video frame are compared with the color values ​​of the pixels of the target area on the reference video frame.

[0099] In this embodiment, the key points may be the facial features of the target object, and the target area may be any area of ​​the target object, such as a facial area, an upper body area, or a hand area. This embodiment does not impose any specific restrictions on the target area.

[0100] In one implementation, the target area is usually an area that is sensitive to white balance changes, that is, when the white balance parameters change, the color temperature values ​​of these areas usually change significantly, such as the face area and the palm area.

[0101] The area that is insensitive to white balance changes usually refers to the background area. Specifically, during the process of switching white balance parameters, the color temperature of the highlight area or dark area in the background may not change, which will eventually affect the detection accuracy. Sensitive areas (such as face areas) are usually not highlight areas or dark areas. No matter how the background changes, the color temperature will change significantly with the change of white balance parameters. Therefore, for each video frame, only the color value of the area that is sensitive to white balance changes is used to determine whether the white balance parameters are effective, which can effectively avoid the error caused by highlight areas or dark areas.

[0102] Therefore, in the specific implementation, if the target area is a face area, it is possible to only determine the color value of the face area in the target video frame and the corresponding color value of the face area in the reference video frame, and then compare the color value of the face area on the target video frame with the average color value of each reference video frame, thereby avoiding the impact of background changes on the detection results.

[0103] In specific implementation, any key point detection means and target area recognition means may be used, and this embodiment does not impose any specific limitation on this.

[0104] In one implementation, in addition to extracting the color value of the target area of ​​each video frame as given above to avoid the influence of the highlight area or the dark area on the detection result, the following method can also be used:

[0105] For a video frame, all pixels whose RGB channel values ​​are higher than 245 or lower than 10 are filtered out, and the color value of the video frame is obtained based on the remaining pixels.

[0106] In this embodiment, excluding the influence of pixels whose RGB channel values ​​in the video frame are higher than 245 or lower than 10 on the color value is equivalent to excluding the influence of pixels in the highlight area and dark area of ​​the video frame on the color value, which can effectively improve the accuracy of the detection result.

[0107] In this embodiment, the color value corresponding to the target area in the target video frame is compared with the color value corresponding to the target area in the reference video frame to determine whether the white balance parameter of the target video frame is effective. This can avoid the influence of areas that are insensitive to changes in white balance parameters (such as background areas) and improve the accuracy of the detection results.

[0108] In combination with the above embodiments, in one implementation, determining whether the white balance parameters of the video to be detected are effective based on the color values ​​of each pixel on the target video frame and the color values ​​of each pixel on the reference video frame may specifically include the following steps:

[0109] Determine a target mean value of the first color component and a target mean value of the second color component of each pixel point on the target video frame, and determine a reference mean value of the first color component and a reference mean value of the second color component of each pixel point on the reference video frame;

[0110] The target mean of the first color component is compared with a reference mean of the first color component, and the target mean of the second color component is compared with a reference mean of the second color component.

[0111] In this embodiment, the color value can be represented by a value in the YUV color gamut. In the YUV color gamut, Y represents the gray value of the image, UV represents the color difference, and U and V are two components that constitute color.

[0112] Therefore, the color value (color mean) referred to in the above embodiments includes U value and V value. n Indicates that the target mean value of the second color component of the pixel on the target video frame is V n Indicates that n represents the nth video frame in the video to be detected, and the first color mean mainly includes U n and V n The reference mean value of the first color component of the pixel on the reference video frame is denoted by U base Indicates that the reference mean of the second color component of the pixel on the reference video frame is V base Indicates that the second color mean mainly includes U base and V base .

[0113] Among them, each video frame uniquely corresponds to a U and a V, U is the average of the u values ​​of each pixel point on the video frame (all pixels or pixels in the target area), and V is the average of the v values ​​of each pixel point on the video frame (all pixels or pixels in the target area).

[0114] In the case of multiple reference video frames, U and V corresponding to each reference video frame can be first calculated, and then the average value of U corresponding to each reference video frame is used as U base , the mean value of V corresponding to each reference video frame is taken as V base .

[0115] Next, U n with U base For comparison, V n With V base A comparison is performed, and when the difference between the target mean of the first color component and the reference mean of the first color component is greater than the first target difference, and the difference between the target mean of the second color component and the reference mean of the second color component is greater than the second target difference, it is determined that the white balance parameters of the target video frame are effective, and after obtaining the detection result of whether the white balance parameters of all target video frames in the video to be detected are effective, if there is at least one target video frame with effective white balance parameters, it is determined that the white balance parameters of the video to be detected are effective.

[0116] When the difference between the target mean of the first color component and the reference mean of the first color component is not greater than the first target difference, or when the difference between the target mean of the second color component and the reference mean of the second color component is not greater than the second target difference, it is determined that the white balance parameters of the target video frame are not effective; and after obtaining the detection results of whether the white balance parameters of all target video frames in the video to be detected are effective, if the white balance parameters of all target video frames are not effective, it is determined that the white balance parameters of the video to be detected are not effective.

[0117] Specifically, if U n with U base The difference between them is greater than the first target difference diff1, and V n With V base The difference between them is greater than the second target difference diff2, which indicates that the white balance parameter of the target video frame n is effective and is collected by the camera device after setting the white balance parameter.

[0118] For example, the obtained k reference video frames are recorded as: base ={f1,…,f k}, where f jrepresents the jth video frame of the video to be detected. When k is 1, it means that only the first video frame is taken as the reference video frame. The obtained target video frame is f n (n>=k+1). First calculate f base The U and V values ​​of each video frame in the video are obtained, and U1,…,U k and V1,…,V k , and then calculate their means respectively, and get and Then calculate f n The U value and U value are obtained. n and V n Next, U n with U base For comparison, V n With V base For comparison, if U n with U base The difference between them is greater than the first target difference diff1, and V n With V base If the difference between the two is greater than the second target difference diff2, it can be determined that the white balance parameters of the target video frame n are effective; otherwise, it is determined that the white balance parameters of the target video frame n are not effective.

[0119] Through the above method, it can be determined whether each target video frame in the video to be detected is effective. According to the result of whether each target video frame is effective, it can be determined whether the white balance parameters of the video to be detected are effective, which specifically includes:

[0120] When the white balance parameters of each of the target video frames in the video to be detected are not effective, it is determined that the white balance parameters of the video to be detected are not effective and / or the video to be detected is a suspected attack video.

[0121] In this embodiment, if the white balance parameters of all target video frames are not effective, for example, the difference between the first color mean of all target video frames and the second color mean of the reference video frame is not greater than the target difference, it means that the white balance parameters of the video to be detected are not effective, and the video to be detected is captured by the camera device without setting the white balance parameters. Therefore, the camera device does not capture the video according to the target white balance sequence sent by the server, and the video to be detected is unavailable and is a suspected attack video.

[0122] In other words, in the present application, after obtaining the detection result of whether the white balance parameters of each target video frame in the video to be detected are effective, as long as it is determined that there is a target video frame in the video to be detected whose white balance parameters are effective, it can be determined that the white balance parameters of the video to be detected are effective, and the subsequent liveness detection steps can be continued. The following will describe in detail how to perform liveness detection after the white balance parameters of the video to be detected are effective.

[0123] In this embodiment, whether the white balance parameters of the video to be detected are effective can be determined according to the number of target video frames in which the white balance parameters are effective in the video to be detected, thereby providing technical support for the subsequent implementation of white balance liveness detection.

[0124] In actual implementation, even if each target video frame is captured by the camera device after setting the white balance parameters, it does not mean that the camera device uses the white balance parameters in the target white balance sequence sent in advance by the server (the camera device may also use forged white balance parameters after being hijacked), because in the white balance sequence sent in advance by the server, each white balance parameter has a corresponding color temperature variation law. Only when the color temperature variation law corresponding to the target video frames in which each white balance parameter in the video to be detected is effective is consistent with the color temperature variation law corresponding to the white balance parameters in the target white balance sequence sent in advance, can it be determined that the video to be detected is legal.

[0125] Therefore, after determining that the white balance parameters of the video to be detected are effective, the video detection method of the present application may further include:

[0126] When the white balance parameters of the video to be detected are effective, determining first color temperature change information of each effective target video frame in the video to be detected;

[0127] Matching the first color temperature change information of each effective target video frame with the second color temperature change information corresponding to a target white balance sequence, wherein the target white balance sequence is used to indicate that a white balance parameter of a camera device is adjusted during the recording of the video to be detected;

[0128] According to the matching result, it is checked whether the object in the video to be detected is a living body.

[0129] In one implementation, determining the first color temperature change information of each valid target video frame in the to-be-detected video may include:

[0130] When the target mean of the first color component of each pixel point on a valid target video frame in the video to be detected increases by at least the first target difference compared to the reference mean of the first color component, and the reference mean of the second color component increases by at least the second target difference compared to the target mean of the second color component, it is determined that the first color temperature change information is: a change from a high color temperature to a low color temperature;

[0131] When the reference mean of the first color component of each pixel point on an effective target video frame in the video to be detected increases by at least the first target difference compared to the target mean of the first color component, and the target mean of the second color component increases by at least the second target difference compared to the reference mean of the second color component, the first color temperature change information is determined to be: a change from a low color temperature to a high color temperature.

[0132] In this embodiment, if U n -U base ≥diff1 and V base -V n ≥diff2, indicating f n The white balance parameters are effective, and f n The color temperature change rule is: compared with the reference video frame, it changes from high color temperature to low color temperature.

[0133] In this embodiment, if U base -U n ≥diff1 and V n -V base ≥diff2, then f n The white balance parameters take effect, and the color temperature change rule of the white balance parameters is: compared with the reference video frame, it changes from low color temperature to high color temperature.

[0134] After obtaining the color temperature variation patterns of the target video frames in which each white balance parameter in the video to be detected is effective, these color temperature variation patterns are compared with the color temperature variation patterns of the corresponding white balance parameters in the target white balance sequence in turn. It can be determined whether the video to be detected is a video recorded by the camera device according to the target white balance sequence sent by the server. If the color temperature variation patterns of the two match, it indicates that the object in the video to be detected is a living body and the video to be detected is a legal video.

[0135] In this embodiment, the server can obtain multiple white balance parameters or white balance parameter ranges supported by the camera device of the user terminal in advance, and then generate at least one white balance sequence based on this information, and in each white balance sequence, the difference between the color temperature values ​​corresponding to two adjacent white balance parameters is greater than the target threshold value, so as to avoid the inability to identify whether the video frame has a color temperature change when the color temperature difference is small, which can improve the accuracy of the recognition result. The server sends the generated at least one white balance sequence to the user terminal, and prompts the user terminal to use the white balance parameters in any one of the at least one white balance sequence to set the white balance of the camera device, and record the video through the camera device after the setting. In the at least one white balance sequence, the white balance sequence finally used by the user terminal is the target white balance sequence.

[0136] For example, it is assumed that the color temperature variation rules corresponding to each white balance parameter in the target white balance sequence are shown in Table 1 below:

[0137] Target white balance sequence Color temperature change law White balance parameter 1 Change from low color temperature to high color temperature White balance parameter 2 Change from high color temperature to low color temperature …… …… White balance parameter n Change from high color temperature to low color temperature

[0138] Table 1

[0139] If the camera device of the user terminal collects the 1st to 10th video frames without using white balance parameters, collects the 11th to 15th video frames using white balance parameter 1, collects the 16th to 20th video frames using white balance parameter 2, and collects the 21st to 25th video frames using white balance parameter 3 (the frame interval can be notified to the user terminal by the server, or it can be notified to the server by the user terminal after completing the collection). Then, when the server performs video detection on the 11th video frame, it detects that the 11th video frame is collected by the camera device using white balance parameters. Then, the server further verifies whether the color temperature change pattern of the 11th video frame is a change from low color temperature to high color temperature. If so, it is determined that the 11th video frame is generated using white balance parameter 1 in the target white balance sequence sent by the server. Similarly, the server verifies that the 12th to 15th video frames are also generated using white balance parameter 1 in the white balance sequence sent by the server. Next, the server verifies whether the color temperature change pattern of the 16th video frame is from high color temperature to low color temperature. If so, it determines that the 16th video frame is generated using white balance parameter 2 in the white balance sequence sent by the server. Based on the same principle, starting from the 11th video frame, the server verifies whether each video frame is captured by the camera device using the white balance parameters, and, if it is captured using the white balance parameters, whether the color temperature change pattern is consistent with the color temperature change pattern of the corresponding white balance parameters sent by the server.

[0140] In combination with the above embodiments, in one implementation, checking whether the object in the video to be detected is a living body according to the matching result may specifically include:

[0141] In each valid target video frame of the video to be detected, if there is first color temperature change information corresponding to a preset number of consecutive target video frames, which is consistent with the second color temperature change information corresponding to the target white balance sequence, it is determined that the object in the video to be detected is a living body and / or the video to be detected is a legal video.

[0142] In this embodiment, among the effective target video frames of the video to be detected, if there are a preset number of consecutive target video frames, and the first color temperature change information corresponding to the preset number of consecutive target video frames is consistent with the second color temperature change information corresponding to the target white balance sequence, it can be determined that the object in the video to be detected is a living body, and the video to be detected is a legitimate video. Otherwise, they are all suspected attack videos.

[0143] The present embodiment provides a method for verifying whether an object in a video to be detected is a living body, comprising: when the white balance parameters of the video to be detected are effective, matching the first color temperature change information of the target video frame in which each white balance parameter is effective with the second color temperature change information corresponding to the target white balance sequence to verify whether the color temperature change pattern of the target video frame is consistent with the color temperature change pattern of the white balance parameters corresponding to the target white balance sequence pre-sent by the server. Only when the color temperature change pattern corresponding to a preset number of consecutive target video frames is consistent with the color temperature change pattern of the white balance parameters corresponding to the target white balance sequence, is it determined that the white balance sequence actually used in the video to be detected matches the white balance sequence sent by the server, that is, the object in the video to be detected is a living body and the video to be detected is legal. Based on the above-mentioned matching method of color temperature change information, the server can better implement white balance liveness detection. Specifically, the white balance liveness detection implemented based on the video detection method of the present application has the following effects:

[0144] 1. It can detect whether the video recorded by the camera equipment is a legitimate video, for example, whether it is an attack video shot after the camera equipment was hijacked.

[0145] 2. The video detection method of the present application has a wider application scope. On the one hand, there is no longer a requirement for the intensity of light (white balance has nothing to do with the light intensity), and it can still be effective in an environment with strong light, covering various usage scenarios of users; on the other hand, there is no longer a requirement for the light transmittance of the protective film of the device (white balance has nothing to do with the light transmittance of the film), and it can cover various devices of the user; on the other hand, there is no need to brighten the screen of the device (white balance has nothing to do with the screen brightness), which can avoid glare to the user and optimize the user experience.

[0146] 3. The liveness detection method of the present application has a high detection efficiency and does not require users to spend a long time interacting. At the same time, it reduces the difficulty of use for users, avoids individual users being unable to complete the detection due to excessive difficulty, and improves the overall detection rate.

[0147] In this embodiment, if it is detected that the white balance parameters of each target video frame are not effective, the video to be detected can be determined as a suspected attack video. Alternatively, the server can prompt the user terminal to check whether the camera device has turned on the white balance setting function, and control the camera device to re-capture the video for detection. If after verifying N (N can be set arbitrarily) re-captured videos, it is still detected that the white balance parameters of each target video frame are not effective, then the video to be detected is determined as a suspected attack video.

[0148] In this embodiment, after completing the detection of the video to be detected, the server of this application can output two results:

[0149] 1. Verification passed, indicating that the object in the video to be detected is alive and the video is legal. In each valid target video frame of the video to be detected, there is a color temperature change pattern corresponding to a preset number of consecutive target video frames, which is consistent with the color temperature change pattern of the corresponding white balance parameters in the white balance sequence sent in advance by the server, and the verification is passed.

[0150] 2. Verification failed, the video to be detected is a suspected attack video. Verification failure includes two situations: (i) The white balance parameters of each target video frame in the video to be detected are not effective. The white balance parameters of the video to be detected are not effective. At this time, the video to be detected is determined to be a suspected attack video and the verification fails. (ii) The white balance parameters of the video to be detected are effective, but in each effective target video frame of the video to be detected, there is no color temperature change pattern corresponding to a preset number of consecutive target video frames, which is consistent with the color temperature change pattern of the corresponding white balance parameters in the white balance sequence sent in advance by the server. At this time, the video to be detected is determined to be a suspected attack video and the verification fails.

[0151] Since it is necessary to obtain the color temperature variation law corresponding to a preset number of continuous target video frames in the video to be detected where the white balance parameters are effective, when the white balance parameters of a certain target video frame are detected to be effective, if there are other target video frames that have not been detected, it is not possible to determine that the white balance parameters of the video to be detected are effective (i.e., the step of liveness detection cannot be entered immediately), but it is necessary to detect whether the white balance parameters of all target video frames are effective, and then determine whether the white balance parameters of the video to be detected are effective based on the detection results of whether the white balance parameters of all target video frames in the video to be detected are effective. Otherwise, if the subsequent liveness detection is entered only after the white balance parameters of one target video frame are detected to be effective, the video to be detected that should have successfully undergone liveness detection may eventually obtain the result of failed liveness detection (for example, when the preset number is any value greater than 1, an erroneous result will be obtained).

[0152] Based on the video detection method of the above embodiment, the present application can better implement a live body detection method based on white balance. Figure 3 shown. Figure 3 is a flow chart of a method for detecting a living body according to an embodiment of the present application. Figure 3 , the method may specifically include:

[0153] Step S31: Obtain the video to be detected of the target object.

[0154] Step S32: determining whether the white balance parameter of the video to be detected is effective based on the color value of each pixel on the target video frame in the video to be detected and the color value of each pixel on the reference video frame; the reference video frame is a video frame captured before the white balance parameter is effective, and the target video frame is a video frame in the video to be detected that is located after the reference video frame; the effectiveness of the white balance parameter of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected;

[0155] Step S33: When it is determined that the white balance parameters of the video to be detected are effective, based on the target white balance sequence and the recorded white balance sequence parsed from the video to be detected, verify whether the target object is a living body, and the target white balance sequence is used to indicate that the white balance parameters of the camera device are adjusted during the recording process of the video to be detected.

[0156] Wherein, determining whether the white balance parameter of the video to be detected is effective based on the color value of each pixel on the target video frame in the video to be detected and the color value of each pixel on the reference video frame may include:

[0157] Detecting whether the white balance parameters of each target video frame in the video to be detected are effective;

[0158] After obtaining a detection result of whether the white balance parameters of each target video frame in the video to be detected are effective, if there is at least one target video frame in which the white balance parameters are effective, it is determined that the white balance parameters of the video to be detected are effective.

[0159] The specific implementation process of step S32 can be referred to the above description, and will not be elaborated in detail in this embodiment.

[0160] Wherein, based on the target white balance sequence and the recorded white balance sequence obtained by parsing the video to be detected, verifying whether the target object is a living body may include:

[0161] Determining first color temperature change information corresponding to the recorded white balance sequence according to each white balance parameter in the recorded white balance sequence, wherein each white balance parameter in the recorded white balance sequence is a white balance parameter used when each valid target video frame is recorded;

[0162] Determining second color temperature change information corresponding to the target white balance sequence according to each white balance parameter in the target white balance sequence;

[0163] Matching the first color temperature change information corresponding to the recorded white balance sequence with the second color temperature change information corresponding to the target white balance sequence;

[0164] According to the matching result, it is verified whether the object in the video to be detected is a living body.

[0165] In this embodiment, each white balance parameter in the recorded white balance sequence is the white balance parameter used when recording the target video frame in which each white balance parameter is effective. Therefore, based on each white balance parameter in the recorded white balance sequence, the first color temperature change information corresponding to the recorded white balance sequence can be determined.

[0166] The specific implementation process of step S33 can be referred to the above description, and will not be elaborated in detail in this embodiment.

[0167] The white balance liveness detection method implemented based on the video detection method of this application has the following effects:

[0168] 1. It can detect whether the video recorded by the camera equipment is a legitimate video, for example, whether it is an attack video shot after the camera equipment was hijacked.

[0169] Second, the application scope is wider. There are no requirements for the intensity of light, the light transmittance of the protective film of the device, the need to brighten the screen of the device, and it can cover various devices of the user.

[0170] 3. It has high detection efficiency and does not require users to spend a long time interacting. It also reduces the difficulty of use for users and improves the overall detection rate.

[0171] The video detection method of the present application will be fully described below with a specific embodiment.

[0172] Step 1: Get k reference video frames in the video to be detected, denoted as f base ={f1,…,f k}, and k reference video frames are collected without using white balance parameters, where f j represents the jth video frame of the video to be detected. When k is 1, it means that only the first video frame is taken as the reference video frame.

[0173] Step 2: Starting from the k+1th video frame, use Algorithm 2 to verify whether each target video frame is collected by the camera device using white balance parameters and the corresponding color temperature change law. If it is collected using white balance parameters, and the corresponding color temperature change law is consistent with the color temperature change law of the corresponding white balance parameters in the white balance sequence sent by the server, it means that the current target video frame is collected using the white balance parameters pre-sent by the server, the verification is successful, and continue to verify the next target video frame.

[0174] Step 3: After detecting all the target video frames, if there is at least one target video frame in which the white balance parameters are effective, and in at least one target video frame in which the white balance parameters are effective, there is a color temperature variation pattern corresponding to a preset number of consecutive target video frames, which is consistent with the color temperature variation pattern of the corresponding white balance parameters in the white balance sequence pre-sent by the server, then the verification passes and the video is legal.

[0175] Step 4: If it is detected that the white balance parameters of each target video frame are not effective, the video is collected by the camera device without using the white balance parameters, the verification fails, and the video to be detected is determined as a suspected attack video.

[0176] Alternatively, if there is at least one target video frame in which the white balance parameters are effective, and in at least one target video frame in which the white balance parameters are effective, there is no color temperature variation pattern corresponding to a preset number of consecutive target video frames, which is consistent with the color temperature variation pattern of the corresponding white balance parameters in the white balance sequence sent in advance by the server, it means that the target video frame is not collected by the camera device of the user terminal using the white balance parameters in the white balance sequence sent by the server, the verification fails, and the video to be detected is determined to be a suspected attack video.

[0177] The following is Algorithm 2:

[0178] The U value and V value of each video frame in k video frames are calculated by Algorithm 1, and U1,…,U k and V1,…,V k , and then calculate their means respectively, and get and

[0179] Calculate the fth n The U value and V value are obtained n and V n .

[0180] If U n -U base ≥diff1 and V base -V n ≥diff2 (diff1 and diff2 can be set based on experience), then f n The white balance parameters take effect, and the color temperature changes from high color temperature to low color temperature.

[0181] If U base -U n ≥diff1 and V n -V base ≥diff2, then f n The white balance parameters take effect, and the color temperature changes from low color temperature to high color temperature.

[0182] If neither U n -U base ≥diff1 and V base -V n ≥diff2, and does not satisfy U base -U n ≥diff1 and V n -V base ≥diff2, indicating that the white balance parameters are used but not effective, or the white balance parameters are not used, and the obtained f n The test result is empty.

[0183] The following is Algorithm 1:

[0184] This algorithm is used to calculate f n The U value and V value are obtained n and V n Specifically, f n Convert to YUV color space and get i represents each pixel, Represents the u value of a pixel. Where w and h represent the width and height of the image respectively. The mean of In the same way, f n Convert to YUV color space and get - Where w and h represent the width and height of the image respectively. The mean of

[0185] Through the video detection method of the present application, it is possible to check whether the white balance parameters of each target video frame in the video to be detected are effective, and whether the white balance parameters of the video to be detected are effective, which helps to better realize liveness detection. In other words, based on the video detection method of the present application, the server can better implement the white balance liveness detection method, so that the white balance liveness detection method has a wider range of application scenarios (no longer requiring the intensity of light, can cover various usage scenarios of users, no longer requiring the light transmittance of the device's film, can cover various devices of users, etc.) and faster detection efficiency (no need to spend a long time interacting with users).

[0186] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0187] Based on the same inventive concept, an embodiment of the present application provides a video detection system, including a user terminal and a server;

[0188] The user terminal is used to record the video to be detected of the target object through a camera device, and send the video to be detected to the server;

[0189] The server is used to extract a target video frame and a reference video frame of the target video frame from the video to be detected, and determine whether the white balance parameter of the video to be detected is effective based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame;

[0190] Among them, the effectiveness of the white balance parameters of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected; the reference video frame is: the video frame captured before the white balance parameters take effect, and the target video frame is the video frame in the video to be detected that is located after the reference video frame.

[0191] Based on the same inventive concept, an embodiment of the present application provides a video detection device 400. Figure 4 , Figure 4 FIG. 1 is a structural block diagram of a video detection device shown in an embodiment of the present application. Figure 4 As shown, the video detection device 400 may include:

[0192] The first acquisition module 401 is used to acquire the video to be detected;

[0193] The extraction module 402 is used to extract a target video frame and a reference video frame of the target video frame from the video to be detected, wherein the reference video frame is a video frame captured before the white balance parameter takes effect, and the target video frame is a video frame in the video to be detected that is located after the reference video frame;

[0194] The first determination module 403 is used to determine whether the white balance parameters of the video to be detected are effective based on the color values ​​of each pixel on the target video frame and the color values ​​of each pixel on the reference video frame. The effectiveness of the white balance parameters of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected.

[0195] Optionally, the first determining module 403 includes:

[0196] A first comparison submodule, configured to compare a first color mean of the target video frame with a second color mean of the reference video frame;

[0197] The first determination submodule is used to determine that the white balance parameter of the video to be detected is effective when the difference between the first color mean of the target video frame and the second color mean of the reference video frame is greater than a target difference.

[0198] Optionally, when there are multiple reference video frames, the first comparison submodule includes:

[0199] A first obtaining submodule is used to obtain, for each reference video frame, a second color mean of the reference video frame according to the mean of the color values ​​of each pixel on the reference video frame;

[0200] A second obtaining submodule, configured to obtain a first color mean value of the target video frame according to the mean value of the color values ​​of each pixel point on the target video frame;

[0201] The second comparison submodule is used to compare the first color mean of the target video frame with the average of the second color mean of each reference video frame.

[0202] Optionally, the device 400 further includes:

[0203] A frame selection module, used to frame a target area from the target video frame and the reference video frame respectively, wherein the target area is an area in the video to be detected for living body detection;

[0204] The first determining module 403 includes:

[0205] The second determination submodule is used to determine whether the white balance parameters of the video to be detected are effective based on the color values ​​corresponding to each pixel point on the target area in the target video frame and the color values ​​corresponding to each pixel point on the target area in the reference video frame.

[0206] Optionally, the first determining module 403 includes:

[0207] A third determination submodule is used to determine a target mean value of the first color component and a target mean value of the second color component of each pixel point on the target video frame, and to determine a reference mean value of the first color component and a reference mean value of the second color component of each pixel point on the reference video frame;

[0208] a third comparison submodule, configured to compare a target mean value of the first color component with a reference mean value of the first color component, and to compare a target mean value of the second color component with a reference mean value of the second color component;

[0209] a fourth determination submodule, configured to determine that the white balance parameter of the video to be detected is effective when the difference between the target mean value of the first color component and the reference mean value of the first color component is greater than a first target difference, and the difference between the target mean value of the second color component and the reference mean value of the second color component is greater than a second target difference;

[0210] The fifth determination submodule is used to determine that the white balance parameters of the video to be detected are not effective when the difference between the target mean of the first color component and the reference mean of the first color component is not greater than the first target difference, or when the difference between the target mean of the second color component and the reference mean of the second color component is not greater than the second target difference.

[0211] Optionally, the device 400 further includes:

[0212] The second determination module is used to determine that the white balance parameters of the video to be detected are not effective and / or the video to be detected is a suspected attack video when the white balance parameters of each target video frame in the video to be detected are not effective.

[0213] Optionally, the device 400 further includes:

[0214] A third determination module is used to determine the first color temperature change information of each effective target video frame in the video to be detected when the white balance parameter of the video to be detected is effective;

[0215] A matching module, used for matching the first color temperature change information of each effective target video frame with the second color temperature change information corresponding to the target white balance sequence, wherein the target white balance sequence is used for indicating that the white balance parameters of the camera device are adjusted during the recording process of the video to be detected;

[0216] The first verification module is used to verify whether the object in the video to be detected is a living body according to the matching result.

[0217] Optionally, the third determining module includes:

[0218] a sixth determination submodule, configured to determine that the first color temperature change information is a change from a high color temperature to a low color temperature when an increase in a target mean value of a first color component of each pixel point on a valid target video frame in the video to be detected compared to a reference mean value of the first color component is at least the first target difference, and an increase in a reference mean value of the second color component compared to the target mean value of the second color component is at least the second target difference;

[0219] The seventh determination submodule is used to determine that the first color temperature change information is a change from a low color temperature to a high color temperature when the increase of the reference mean of the first color component of each pixel point on an effective target video frame in the video to be detected is at least the first target difference compared to the target mean of the first color component, and the increase of the target mean of the second color component is at least the second target difference compared to the reference mean of the second color component.

[0220] Optionally, the first verification module includes:

[0221] The eighth determination submodule is used to determine that the object in the video to be detected is a living body and / or the video to be detected is a legal video if there is first color temperature change information corresponding to a preset number of consecutive target video frames in each effective target video frame of the video to be detected, which is consistent with the second color temperature change information corresponding to the target white balance sequence.

[0222] Based on the same inventive concept, an embodiment of the present application provides a living body detection device 500. Figure 5 , Figure 5 FIG. 1 is a structural block diagram of a living body detection device shown in an embodiment of the present application. Figure 5 As shown, the living body detection device 500 may include:

[0223] The second acquisition module 501 is used to acquire a video to be detected of a target object;

[0224] The fourth determination module 502 is used to determine whether the white balance parameter of the video to be detected is effective based on the color value of each pixel on the target video frame in the video to be detected and the color value of each pixel on the reference video frame; the reference video frame is a video frame captured before the white balance parameter is effective, and the target video frame is a video frame in the video to be detected that is located after the reference video frame; the effectiveness of the white balance parameter of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected;

[0225] The second verification module 502 is used to verify whether the target object is a living body based on a target white balance sequence and a recorded white balance sequence parsed from the video to be detected when it is determined that the white balance parameters of the video to be detected are effective, wherein the target white balance sequence is used to indicate that the white balance parameters of the camera device are adjusted during the recording process of the video to be detected.

[0226] Optionally, the fourth determining module 502 includes:

[0227] A detection submodule, used to detect whether the white balance parameters of each target video frame in the video to be detected are effective;

[0228] The ninth determination submodule is used to determine whether the white balance parameters of each target video frame in the video to be detected are effective after obtaining the detection result of whether the white balance parameters of each target video frame in the video to be detected are effective, if there is at least one target video frame in which the white balance parameters are effective.

[0229] Optionally, the verification module 503 includes:

[0230] a tenth determination submodule, configured to determine first color temperature change information corresponding to the recorded white balance sequence according to each white balance parameter in the recorded white balance sequence, wherein each white balance parameter in the recorded white balance sequence is a white balance parameter used by each valid target video frame during recording;

[0231] an eleventh determining submodule, configured to determine second color temperature change information corresponding to the target white balance sequence according to each white balance parameter in the target white balance sequence;

[0232] A matching submodule, used to match the first color temperature change information corresponding to the recorded white balance sequence with the second color temperature change information corresponding to the target white balance sequence;

[0233] The verification submodule is used to verify whether the object in the video to be detected is a living body according to the matching result.

[0234] The present application also provides an electronic device, such as Figure 6 shown. Figure 6 is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. Figure 6 , the electronic device includes a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62, and the memory 63 communicate with each other through the communication bus 64;

[0235] Memory 63, used for storing computer programs;

[0236] The processor 61 is used to execute the program stored in the memory 63 to implement the following steps:

[0237] Get the video to be detected;

[0238] Extracting a target video frame and a reference video frame of the target video frame from the video to be detected, wherein the reference video frame is a video frame captured before the white balance parameter takes effect, and the target video frame is a video frame in the video to be detected that is located after the reference video frame;

[0239] Based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame, it is determined whether the white balance parameters of the video to be detected are effective. The effectiveness of the white balance parameters of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected.

[0240] Alternatively, when the processor 61 executes the program stored in the memory 63 , the steps in the above-mentioned other method embodiments are implemented.

[0241] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0242] The communication interface is used for communication between the above terminal and other devices.

[0243] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0244] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0245] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the video detection method described in any one of the above embodiments, or when the computer is run on a computer, the computer executes the liveness detection method described in any one of the above embodiments.

[0246] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when running on a computer, enables the computer to execute the video detection method described in any one of the above embodiments, or, when running on a computer, enables the computer to execute the liveness detection method described in any one of the above embodiments.

[0247] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0248] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0249] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0250] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A video detection method, characterized in that: The method comprises: Get the video to be detected; Extracting a target video frame and a reference video frame of the target video frame from the video to be detected, wherein the reference video frame is a video frame captured before the white balance parameter takes effect, and the target video frame is a video frame in the video to be detected that is located after the reference video frame; Based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame, determine whether the white balance parameters of the video to be detected are effective, obtain an effectiveness result, and verify whether the object in the video to be detected is a living body according to the effectiveness result in combination with the video to be detected; wherein, the effectiveness result is that the white balance parameters of the video to be detected are effective or the white balance parameters of the video to be detected are not effective; the effectiveness of the white balance parameters of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected.

2. The method according to claim 1, characterized in that Determining whether the white balance parameter of the video to be detected is effective based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame includes: comparing a first color mean of the target video frame with a second color mean of the reference video frame; When the difference between the first color mean of the target video frame and the second color mean of the reference video frame is greater than the target difference, it is determined that the white balance parameter of the video to be detected is effective.

3. The method according to claim 2, characterized in that In the case that the number of the reference video frames is multiple, comparing the first color mean of the target video frame with the second color mean of the reference video frame, comprising: For each reference video frame, obtaining a second color mean value of the reference video frame according to the mean value of the color values ​​of each pixel point on the reference video frame; Obtaining a first color mean value of the target video frame according to the mean value of the color values ​​of each pixel point on the target video frame; The first color mean of the target video frame is compared with the mean of the second color mean of each reference video frame.

4. The method according to any one of claims 1 to 3, characterized in that: Before determining whether the white balance parameter of the video to be detected is effective based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame, the method further includes: Selecting target areas from the target video frame and the reference video frame respectively, wherein the target area is an area in the video to be detected for living body detection; Determining whether the white balance parameter of the video to be detected is effective based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame includes: Based on the color value of each pixel on the target area in the target video frame and the color value of each pixel on the target area in the reference video frame, it is determined whether the white balance parameter of the video to be detected is effective.

5. The method according to any one of claims 1 to 3, characterized in that: Determining whether the white balance parameter of the video to be detected is effective based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame includes: Determine a target mean value of the first color component and a target mean value of the second color component of each pixel point on the target video frame, and determine a reference mean value of the first color component and a reference mean value of the second color component of each pixel point on the reference video frame; comparing a target mean of the first color component with a reference mean of the first color component, and comparing a target mean of the second color component with a reference mean of the second color component; Wherein, when the difference between the target mean of the first color component and the reference mean of the first color component is greater than a first target difference, and the difference between the target mean of the second color component and the reference mean of the second color component is greater than a second target difference, it is determined that the white balance parameter of the video to be detected is effective; When the difference between the target mean of the first color component and the reference mean of the first color component is not greater than the first target difference, or when the difference between the target mean of the second color component and the reference mean of the second color component is not greater than the second target difference, it is determined that the white balance parameters of the video to be detected are not effective.

6. The method according to claim 4, characterized in that Determining whether the white balance parameter of the video to be detected is effective based on the color value of each pixel on the target video frame and the color value of each pixel on the reference video frame includes: Determine a target mean value of the first color component and a target mean value of the second color component of each pixel point on the target video frame, and determine a reference mean value of the first color component and a reference mean value of the second color component of each pixel point on the reference video frame; comparing a target mean of the first color component with a reference mean of the first color component, and comparing a target mean of the second color component with a reference mean of the second color component; Wherein, when the difference between the target mean of the first color component and the reference mean of the first color component is greater than a first target difference, and the difference between the target mean of the second color component and the reference mean of the second color component is greater than a second target difference, it is determined that the white balance parameter of the video to be detected is effective; When the difference between the target mean of the first color component and the reference mean of the first color component is not greater than the first target difference, or when the difference between the target mean of the second color component and the reference mean of the second color component is not greater than the second target difference, it is determined that the white balance parameters of the video to be detected are not effective.

7. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: When the white balance parameters of each of the target video frames in the video to be detected are not effective, it is determined that the white balance parameters of the video to be detected are not effective and / or the video to be detected is a suspected attack video.

8. The method according to claim 4, characterized in that The method further comprises: When the white balance parameters of each of the target video frames in the video to be detected are not effective, it is determined that the white balance parameters of the video to be detected are not effective and / or the video to be detected is a suspected attack video.

9. The method according to claim 5, characterized in that The method further comprises: When the white balance parameters of each of the target video frames in the video to be detected are not effective, it is determined that the white balance parameters of the video to be detected are not effective and / or the video to be detected is a suspected attack video.

10. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: When the white balance parameters of the video to be detected are effective, determining first color temperature change information of each effective target video frame in the video to be detected; Matching the first color temperature change information of each effective target video frame with the second color temperature change information corresponding to a target white balance sequence, wherein the target white balance sequence is used to indicate that a white balance parameter of a camera device is adjusted during the recording of the video to be detected; According to the matching result, it is verified whether the object in the video to be detected is a living body.

11. The method according to claim 4, characterized in that The method further comprises: When the white balance parameters of the video to be detected are effective, determining first color temperature change information of each effective target video frame in the video to be detected; Matching the first color temperature change information of each effective target video frame with the second color temperature change information corresponding to a target white balance sequence, wherein the target white balance sequence is used to indicate that a white balance parameter of a camera device is adjusted during the recording of the video to be detected; According to the matching result, it is verified whether the object in the video to be detected is a living body.

12. The method according to claim 5, characterized in that The method further comprises: When the white balance parameters of the video to be detected are effective, determining first color temperature change information of each effective target video frame in the video to be detected; Matching the first color temperature change information of each effective target video frame with the second color temperature change information corresponding to a target white balance sequence, wherein the target white balance sequence is used to indicate that a white balance parameter of a camera device is adjusted during the recording of the video to be detected; According to the matching result, it is verified whether the object in the video to be detected is a living body.

13. The method according to claim 7, characterized in that The method further comprises: When the white balance parameters of the video to be detected are effective, determining first color temperature change information of each effective target video frame in the video to be detected; Matching the first color temperature change information of each effective target video frame with the second color temperature change information corresponding to a target white balance sequence, wherein the target white balance sequence is used to indicate that a white balance parameter of a camera device is adjusted during the recording of the video to be detected; According to the matching result, it is verified whether the object in the video to be detected is a living body.

14. The method according to claim 12, characterized in that The determining of first color temperature change information of each valid target video frame in the video to be detected includes: When the target mean of the first color component of each pixel point on a valid target video frame in the video to be detected increases by at least the first target difference compared to the reference mean of the first color component, and the reference mean of the second color component increases by at least the second target difference compared to the target mean of the second color component, it is determined that the first color temperature change information is a change from a high color temperature to a low color temperature; When the reference mean of the first color component of each pixel on a valid target video frame in the video to be detected increases by at least the first target difference compared to the target mean of the first color component, and the target mean of the second color component increases by at least the second target difference compared to the reference mean of the second color component, it is determined that the first color temperature change information is a change from a low color temperature to a high color temperature.

15. The method according to claim 10, characterized in that According to the matching result, checking whether the object in the video to be detected is a living body includes: In each valid target video frame of the video to be detected, if there is first color temperature change information corresponding to a preset number of consecutive target video frames, which is consistent with the second color temperature change information corresponding to the target white balance sequence, it is determined that the object in the video to be detected is a living body and / or the video to be detected is a legal video.

16. The method according to claim 14, characterized in that According to the matching result, checking whether the object in the video to be detected is a living body includes: In each valid target video frame of the video to be detected, if there is first color temperature change information corresponding to a preset number of consecutive target video frames, which is consistent with the second color temperature change information corresponding to the target white balance sequence, it is determined that the object in the video to be detected is a living body and / or the video to be detected is a legal video.

17. A method for detecting a living body, characterized in that: The method comprises: Obtain the video to be detected of the target object; Based on the color values ​​of each pixel on the target video frame in the video to be detected and the color values ​​of each pixel on the reference video frame, determining whether the white balance parameter of the video to be detected is effective; the reference video frame is a video frame captured before the white balance parameter is effective, and the target video frame is a video frame in the video to be detected that is located after the reference video frame; the effectiveness of the white balance parameter of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected; When it is determined that the white balance parameters of the video to be detected are effective, it is verified whether the target object is a living body based on a target white balance sequence and a recorded white balance sequence parsed from the video to be detected, wherein the target white balance sequence is used to indicate that the white balance parameters of the camera device are adjusted during the recording process of the video to be detected.

18. The method according to claim 17, characterized in that Determining whether a white balance parameter of the video to be detected is effective based on a color value of each pixel on a target video frame in the video to be detected and a color value of each pixel on a reference video frame includes: Detecting whether the white balance parameters of each target video frame in the video to be detected are effective; After obtaining a detection result of whether the white balance parameters of each target video frame in the video to be detected are effective, if there is at least one target video frame in which the white balance parameters are effective, it is determined that the white balance parameters of the video to be detected are effective.

19. The method according to claim 17, characterized in that Verifying whether the target object is a living body based on the target white balance sequence and the recorded white balance sequence obtained by parsing the video to be detected includes: Determining first color temperature change information corresponding to the recorded white balance sequence according to each white balance parameter in the recorded white balance sequence, wherein each white balance parameter in the recorded white balance sequence is a white balance parameter used when each valid target video frame is recorded; Determining second color temperature change information corresponding to the target white balance sequence according to each white balance parameter in the target white balance sequence; Matching the first color temperature change information corresponding to the recorded white balance sequence with the second color temperature change information corresponding to the target white balance sequence; According to the matching result, it is verified whether the object in the video to be detected is a living body.

20. A video detection system, characterized in that: The system includes a user terminal and a server; The user terminal is used to record the video to be detected of the target object through a camera device, and send the video to be detected to the server; The server is used to extract a target video frame and a reference video frame of the target video frame from the video to be detected, and determine whether the white balance parameters of the video to be detected are effective based on the color values ​​of each pixel on the target video frame and the color values ​​of each pixel on the reference video frame, obtain an effective result, and verify whether the object in the video to be detected is a living body according to the effective result combined with the video to be detected; wherein the effective result is that the white balance parameters of the video to be detected are effective or the white balance parameters of the video to be detected are not effective; Among them, the effectiveness of the white balance parameters of the video to be detected indicates that the white balance information of the camera device changes during the process of recording at least one target video frame of the video to be detected; the reference video frame is: the video frame captured before the white balance parameters take effect, and the target video frame is the video frame in the video to be detected that is located after the reference video frame.

21. An electronic device, characterized in that: It includes a memory, a processor and a computer program stored in the memory, characterized in that the processor executes the computer program to implement the steps in the video detection method described in any one of claims 1-16, or implements the steps in the video detection method described in any one of claims 17-19.

22. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps of the video detection method described in any one of claims 1-16 are implemented, or the steps of the video detection method described in any one of claims 17-19 are implemented.

23. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the video detection method described in any one of claims 1-16 are implemented, or the steps of the video detection method described in any one of claims 17-19 are implemented.

Citation Information

Patent Citations

  • Forgery-deciding imaging device and individual identification device

    JP2007122237A

  • Optical color analysis process

    US4812904A