Face-scanning payment method, device and face-scanning equipment

By cache high-quality first face images in the face-scanning device and replacing the collected low-quality images when necessary, the problem of poor image quality in the offline face-scanning payment system in abnormal environments is solved, and low power consumption is achieved , low latency and high-quality face image acquisition.

CN114358792BActive Publication Date: 2024-12-20ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202210040402.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-14
Publication Date
2024-12-20
Estimated Expiration
2042-01-14

AI Technical Summary

Technical Problem

The existing offline face-scan payment system can easily cause the face image quality to not meet expectations in environments such as abnormal light, crowding and occlusion, which affects the recognition effect.

Method used

By setting up a camera in the face-scanning device, collecting the first frame of images for face detection, cache images with image quality reaching the threshold, and obtaining the second face image after detecting the face-scanning command. If its quality is insufficient, replace it with cache Images, live recognition and identity recognition to perform payment operations to improve image quality.

Benefits of technology

When the image quality is poor during the acquisition stage, use pre-acquisition high-quality image replacement to ensure the image quality of face-scanning payment, reduce power consumption and delay, and improve the recognition success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114358792B_ABST
    Figure CN114358792B_ABST
Patent Text Reader

Abstract

The embodiments of this specification propose a face-scanning payment method, apparatus and face-scanning device, wherein in the above-mentioned face-scanning payment method, the face-scanning device performs face detection on the first frame image captured by the camera. If a face is detected, a first face image whose image quality is greater than or equal to a first quality threshold is cached in the image captured after the first frame image, and a second face image is obtained after a face-scanning instruction is detected; if the image quality is less than the second quality threshold, the first face image is used to replace the second face image, and the first face image is frozen for display. Therefore, when the image quality of the second face image captured in the acquisition stage is poor, the first face image is used to replace the second face image, and the first face image is identified, and then the payment operation is performed based on the recognition result of the first face image, thereby improving the image quality of the face image used for face-scanning payment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of Internet technology, and in particular to a face-scanning payment method, apparatus, and face-scanning device. Background Art

[0002] The common interaction form of offline face payment is that the user clicks the face recognition icon to start face recognition. The camera of the face recognition device finds a good quality picture during the collection process and uploads it to the server for recognition. This process has very demanding requirements on the collection algorithm. It requires that in environments such as abnormal lighting, crowding and / or occlusion, the algorithm selects a good quality image of the user within 1 to 5 seconds and uploads it to the server for comparison. However, abnormal conditions in the above environments can easily trigger the robustness of the algorithm, resulting in the face image uploaded to the server not meeting expectations.

[0003] Therefore, it is necessary to provide a solution to improve the image quality of face images uploaded to the server. Summary of the invention

[0004] The embodiments of this specification provide a face-scanning payment method, apparatus, and face-scanning device to improve the image quality of facial images used for face-scanning payment.

[0005] In a first aspect, an embodiment of the present specification provides a face-scanning payment method, which is applied to a face-scanning device, wherein a camera is provided in the face-scanning device, and the face-scanning payment method comprises: performing face detection on a first frame image captured by the camera; if a face is detected in the first frame image, then caching a first face image whose image quality is greater than or equal to a first quality threshold in an image captured by the camera after the first frame image; after detecting a face-scanning instruction, obtaining a second face image captured by the camera; wherein an identifier of the second face image is the same as an identifier of the first face image; if the image quality of the second face image is less than a second quality threshold, replacing the second face image with the first face image, and freezing the first face image on the screen of the face-scanning device; performing liveness recognition and identity recognition on the first face image, and executing a payment operation based on the recognition result of the first face image.

[0006] In the above-mentioned face-scanning payment method, the face-scanning device performs face detection on the first frame image captured by the camera. If a face is detected in the first frame image, a first face image with an image quality greater than or equal to a first quality threshold is cached in the image captured by the above-mentioned camera after the first frame image. After detecting the face-scanning instruction, a second face image captured by the above-mentioned camera is obtained; if the image quality of the above-mentioned second face image is less than the second quality threshold, the first face image is used to replace the second face image, and the first face image is frozen and displayed on the screen of the face-scanning device, and then liveness recognition and identity recognition are performed on the first face image, and a payment operation is performed based on the recognition result of the first face image. Therefore, when the image quality of the second face image captured in the acquisition stage is poor, the first face image with a higher image quality cached in the pre-acquisition stage is used to replace the second face image, and liveness recognition and identity recognition are performed on the first face image, and then a payment operation is performed based on the recognition result of the first face image, thereby improving the image quality of the face image used for face-scanning payment.

[0007] In one possible implementation, after acquiring the second facial image captured by the camera, the method further includes: if the image quality of the second facial image is greater than or equal to a second quality threshold, performing liveness recognition and identity recognition on the second facial image, and performing a payment operation based on the recognition result of the second facial image.

[0008] In one possible implementation, before the first face image whose cached image quality is greater than or equal to a first quality threshold, the method further includes: if a face is detected in the first frame image, performing face tracking and head and shoulder tracking on the image captured by the camera after the first frame image to obtain a face area in the image; and performing automatic exposure adjustment on the camera based on the face image according to the face frame corresponding to the face area to improve the imaging quality of the camera.

[0009] In one possible implementation, after performing face detection on the first frame image captured by the camera, the method further includes: if no face is detected in the first frame image, stopping face detection, and performing image change detection on a predetermined core area in the image captured by the camera after the first frame image; if the image change in the predetermined core area is greater than a predetermined threshold, performing face detection on the image captured by the camera; if a face is detected, caching the first face image whose image quality is greater than or equal to a first quality threshold in the image captured by the camera after the image where the face is detected.

[0010] In one possible implementation, performing image change detection on a predetermined core area in the image captured by the camera after the first frame of image includes: acquiring at least two frames of image captured by the camera after the first frame of image; calculating pixel difference values ​​for the same pixel points in the core area of ​​the at least two frames of image; and performing image change detection on the core area based on the pixel difference values.

[0011] In a second aspect, an embodiment of the present specification provides a face-scanning payment device, which is arranged in a face-scanning device, in which a camera is arranged, and the face-scanning payment device comprises: a detection module, for performing face detection on a first frame image captured by the camera; a cache module, for caching a first face image whose image quality is greater than or equal to a first quality threshold in an image captured by the camera after the first frame image when a face is detected in the first frame image; an acquisition module, for acquiring a second face image captured by the camera after the detection module detects a face-scanning instruction; wherein an identifier of the second face image is the same as an identifier of the first face image; a replacement module, for replacing the second face image with the first face image when the image quality of the second face image is less than a second quality threshold; a display module, for freezing and displaying the first face image on the screen of the face-scanning device; an identification module, for performing liveness identification and identity identification on the first face image; and a payment module, for executing a payment operation according to the identification result of the first face image.

[0012] In one possible implementation, the recognition module is further used to perform liveness recognition and identity recognition on the second facial image after the acquisition module acquires the second facial image captured by the camera, when the image quality of the second facial image is greater than or equal to a second quality threshold; the payment module is further used to perform a payment operation based on the recognition result of the second facial image.

[0013] In one possible implementation, the device also includes: a tracking module, used to perform face tracking and head and shoulder tracking on an image captured by the camera after the first frame image before the cache module caches the first face image whose image quality is greater than or equal to a first quality threshold, when the detection module detects a face in the first frame image, to obtain a face area in the image; and an adjustment module, used to perform automatic exposure adjustment on the camera based on the face image according to the face frame corresponding to the face area, so as to improve the imaging quality of the camera.

[0014] In one possible implementation, the detection module is further used to, after performing face detection on a first frame image captured by the camera, stop face detection when no face is detected in the first frame image, and perform image change detection on a predetermined core area in the image captured by the camera after the first frame image; if the image change in the predetermined core area is greater than a predetermined threshold, perform face detection on the image captured by the camera; and the cache module is further used to, when the detection module detects a face, cache a first face image whose image quality is greater than or equal to a first quality threshold in the image captured by the camera after the image is detected.

[0015] In one possible implementation, the detection module is specifically used to obtain at least two frames of images captured by the camera after the first frame of image, calculate the pixel difference of the same pixel points in the core area of ​​the at least two frames of image, and perform image change detection on the core area based on the pixel difference.

[0016] In a third aspect, an embodiment of this specification provides a face recognition device, comprising: a camera; at least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method provided in the first aspect.

[0017] In a fourth aspect, an embodiment of the present specification provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method provided in the first aspect.

[0018] It should be understood that the second to fourth aspects of the embodiments of this specification are consistent with the technical solutions of the first aspect of the embodiments of this specification, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A flowchart of a face-scanning payment method provided in one embodiment of this specification;

[0021] Figure 2 A flow chart of a face-scanning payment method provided in another embodiment of this specification;

[0022] Figure 3 A flowchart of a face-scanning payment method provided in yet another embodiment of this specification;

[0023] Figure 4 A schematic diagram of the structure of a face-scanning payment device provided in one embodiment of this specification;

[0024] Figure 5 A schematic diagram of the structure of a face-scanning payment device provided in another embodiment of this specification;

[0025] Figure 6 A schematic diagram of the structure of a face recognition device provided in one embodiment of this specification. DETAILED DESCRIPTION

[0026] In order to better understand the technical solution of this specification, the embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0027] It should be clear that the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0028] The terms used in the embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit this specification. The singular forms "a", "said" and "the" used in the embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0029] In the existing related technologies, offline face-scanning payment usually has the problem that the face image finally uploaded to the server does not meet expectations. In order to solve this problem, the existing related technologies provide a solution of taking a photo to pay. In the solution of taking a photo to pay, the face-scanning device will display the face image that needs to be uploaded to the server to the user. The entire interactive process is like taking a photo. When the user clicks the button of taking a photo to pay, the picture freezes like taking a photo, and the face image of the frame is used for subsequent face recognition. The advantage of the solution of taking a photo to pay is that what the user sees is what he gets, which well guarantees the user's willingness to scan the face. At the same time, the user actively cooperates to adjust the posture required for face scanning, which improves the success rate of subsequent face recognition on the server. The disadvantage is that the camera of the face-scanning device needs to be kept open, the algorithm is always in the state of detecting the face, and the automatic exposure (AE) of the camera is always adjusted, which brings about a large power consumption and a very high heat of the machine. In addition, before the user clicks the photo button, the adjustment process may be very long, which also brings a large delay.

[0030] The embodiments of this specification provide a face-scanning payment method based on the solution of taking a photo to pay. The face-scanning payment method includes three stages: pre-detection, pre-collection and collection. It combines the user's subjective cooperation with passive high-quality algorithm selection to achieve low power consumption, low latency and high-quality facial image collection.

[0031] It should be noted that the collection and use of personal information involved in the face-scanning payment method provided in the embodiments of this specification is legal.

[0032] Figure 1 A flow chart of a face-scanning payment method provided in one embodiment of this specification, wherein the face-scanning payment method is applied to a face-scanning device, wherein the face-scanning device is provided with a camera, such as Figure 1 As shown, the above-mentioned face-swiping payment method may include:

[0033] Step 102: Perform face detection on the first frame image captured by the camera.

[0034] Step 104: If a face is detected in the first frame image, then in the images captured by the camera after the first frame image, a first face image having an image quality greater than or equal to a first quality threshold is cached.

[0035] The first quality threshold may be set according to system performance and / or implementation requirements during specific implementation, and this embodiment does not limit the size of the first quality threshold.

[0036] In a specific implementation, if the face recognition device detects a face in the first frame image, the face recognition device can detect the image captured by the camera after the first frame image to obtain an image including the same face as the first frame image, and then select the first face image whose image quality is greater than or equal to the first quality threshold from the image including the same face as the first frame image, and cache the first face image. In addition, the face recognition device will also set an identifier for the first face image, and the images containing the same face have the same identifier, that is, the images collected by the face recognition device for the same user have the same identifier. Here, a cache frame strategy with the same identifier for the same user is used to prepare for the subsequent freezing of high-quality face images.

[0037] It should be noted that the image captured by the camera after the first frame image may be N frames of images captured by the camera after the first frame image. The N frames of images may be captured continuously or dispersedly, and N is a positive integer. For example, N may be 10. The number of the above-mentioned first face images may be at least one frame. When the number of first face images is 1, it means that the face scanning device caches the first face image with the highest image quality among the images whose image quality is greater than or equal to the first quality threshold.

[0038] Step 106, after detecting the face scanning instruction, obtain the second face image captured by the camera; wherein the identifier of the second face image is the same as the identifier of the first face image. Then, execute step 108 or step 112.

[0039] As mentioned above, images with the same identifier are collected for the same user. That is, after the user clicks the face recognition button displayed on the screen of the face recognition device, the face recognition device detects the face recognition instruction, and in response to the face recognition instruction, the face recognition device obtains the second face image collected by the camera, that is, the image including the face of the user.

[0040] Step 108: If the image quality of the second facial image is less than the second quality threshold, the second facial image is replaced with the first facial image, and the first facial image is frozen and displayed on the screen of the face scanning device.

[0041] The second quality threshold may be set according to implementation requirements and / or system performance during specific implementation, and this embodiment does not limit the size of the second quality threshold.

[0042] Step 110, performing liveness recognition and identity recognition on the first facial image, and executing a payment operation according to the recognition result of the first facial image.

[0043] That is to say, if the face-scanning device determines that the image quality of the second facial image does not meet the conditions (less than the second quality threshold), the face-scanning device will not use the second facial image for recognition, but will use the first facial image to replace the second facial image, freeze-display the first facial image on the screen of the face-scanning device, and perform liveness recognition and identity recognition on the first facial image, and then execute the payment operation based on the recognition result of the first facial image, thereby improving the quality of the facial image used for face-scanning payment.

[0044] Step 112: If the image quality of the second facial image is greater than or equal to the second quality threshold, liveness recognition and identity recognition are performed on the second facial image, and a payment operation is performed based on the recognition result of the second facial image.

[0045] That is to say, if the face scanning device determines that the image quality of the second facial image meets the conditions (greater than or equal to the second quality threshold), the face scanning device uses the second facial image for liveness recognition and identity recognition as usual, and then performs the payment operation based on the recognition result of the second facial image.

[0046] In the above-mentioned face-scanning payment method, step 102 belongs to the pre-detection stage, step 104 belongs to the pre-collection stage, and steps 106 to 112 belong to the collection stage.

[0047] In the above-mentioned face-scanning payment method, the face-scanning device performs face detection on the first frame image captured by the camera. If a face is detected in the first frame image, a first face image with an image quality greater than or equal to a first quality threshold is cached in the image captured by the above-mentioned camera after the first frame image. After detecting the face-scanning instruction, a second face image captured by the above-mentioned camera is obtained; if the image quality of the above-mentioned second face image is less than the second quality threshold, the first face image is used to replace the second face image, and the first face image is frozen and displayed on the screen of the face-scanning device, and then liveness recognition and identity recognition are performed on the first face image, and a payment operation is performed based on the recognition result of the first face image. Therefore, when the image quality of the second face image captured in the acquisition stage is poor, the first face image with a higher image quality cached in the pre-acquisition stage is used to replace the second face image, and liveness recognition and identity recognition are performed on the first face image, and then a payment operation is performed based on the recognition result of the first face image, thereby improving the image quality of the face image used for face-scanning payment.

[0048] Figure 2 A flow chart of a face-scanning payment method provided in another embodiment of this specification is as follows: Figure 2 As shown in this manual Figure 1 In the illustrated embodiment, before step 104, the following may also be included:

[0049] Step 202: If a face is detected in the first frame image, face tracking and head and shoulder tracking are performed on the image captured by the camera after the first frame image to obtain the face area in the image.

[0050] Step 204: According to the face frame corresponding to the face area, the camera is automatically exposed based on the face image to improve the imaging quality of the camera.

[0051] Specifically, steps 202 to 204 also belong to the pre-acquisition stage. In the pre-acquisition stage, the face recognition device uses cascade tracking of the face and head and shoulders to improve tracking efficiency and require computing power that is more than 10 times lower than face detection. Through automatic exposure adjustment based on facial images, the camera imaging parameters can be adjusted in advance to reduce latency.

[0052] Figure 3 A flow chart of a face-scanning payment method provided in another embodiment of this specification is as follows: Figure 3 As shown in this manual Figure 1 In the illustrated embodiment, after step 102, the following may also be included:

[0053] Step 302: If no face is detected in the first frame image, stop face detection and perform image change detection on a predetermined core area in the image captured by the camera after the first frame image.

[0054] The predetermined core area may be an area where the user's facial image is likely to appear.

[0055] Specifically, performing image change detection on a predetermined core area in an image captured by the camera after a first frame of image can be as follows: acquiring at least two frames of image captured by the camera after the first frame of image; calculating pixel difference values ​​for the same pixel points in the core area of ​​the at least two frames of image; and performing image change detection on the core area based on the pixel difference values.

[0056] Step 304: If the image change of the above-predetermined core area is greater than a predetermined threshold, face detection is performed on the image collected by the above-mentioned camera.

[0057] The above-mentioned predetermined threshold value may be set according to system performance and / or implementation requirements during specific implementation, and this embodiment does not limit the size of the above-mentioned predetermined threshold value.

[0058] Specifically, the image change of the predetermined core area being greater than the predetermined threshold may be that: the pixel difference of the same pixel point in the core area of ​​at least two frames of images is greater than the predetermined threshold.

[0059] Step 306: If a human face is detected, then in the images captured by the camera after the image of the human face is detected, a first human face image having an image quality greater than or equal to a first quality threshold is cached.

[0060] Then, step 106 is executed.

[0061] Among them, step 302 to step 306 belong to the pre-detection stage. In this embodiment, in the pre-detection stage, an image change detection algorithm is used for detection. The computing power used by the image change detection algorithm is much lower than that of face detection, which can ensure that the face recognition device runs with low power consumption.

[0062] That is to say, in this embodiment, if no face is detected in the first frame image, the face scanning device stops face detection and instead uses an image change detection algorithm with much lower computing power requirements to perform image change detection on a predetermined core area in the image. If the image change detected in the predetermined core area is greater than a predetermined threshold, it means that there is a high probability that a face appears in the image collected by the face scanning device. At this time, face detection is performed on the image collected by the camera, thereby reducing the power consumption of the face scanning device and ensuring low-power operation of the face scanning device.

[0063] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0064] Figure 4 This is a schematic diagram of the structure of a face-scanning payment device provided in one embodiment of this specification. The face-scanning payment device is set in a face-scanning device, and a camera is set in the face-scanning device. Figure 4 As shown, the above-mentioned face-scanning payment device may include: a detection module 41, a cache module 42, an acquisition module 43, a replacement module 44, a display module 45, an identification module 46 and a payment module 47;

[0065] The detection module 41 is used to perform face detection on the first frame image captured by the camera;

[0066] A cache module 42 is used for caching a first face image whose image quality is greater than or equal to a first quality threshold in the images captured by the camera after the first frame of image when a face is detected in the first frame of image;

[0067] The acquisition module 43 is used to acquire the second face image captured by the camera after the detection module 41 detects the face scanning instruction; wherein the identifier of the second face image is the same as the identifier of the first face image;

[0068] A replacement module 44, configured to replace the second facial image with the first facial image when the image quality of the second facial image is less than a second quality threshold;

[0069] A display module 45, configured to freeze-frame display the first face image on the screen of the face recognition device;

[0070] The recognition module 46 is used to perform living body recognition and identity recognition on the first face image;

[0071] The payment module 47 is used to perform a payment operation according to the recognition result of the first facial image.

[0072] Figure 4 The face-scanning payment device provided in the embodiment shown can be used to implement the present invention. Figure 1 The technical solution of the method embodiment shown, its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.

[0073] Figure 5A schematic diagram of a face-scanning payment device provided in another embodiment of this specification, Figure 4 Compared with the facial payment device shown, Figure 5 In the face-scanning payment device shown, the recognition module 46 is further used to perform liveness recognition and identity recognition on the second face image after the acquisition module 43 acquires the second face image captured by the camera, when the image quality of the second face image is greater than or equal to the second quality threshold;

[0074] The payment module 47 is further configured to execute a payment operation according to the recognition result of the second facial image.

[0075] Furthermore, the above-mentioned face-scanning payment device may also include: a tracking module 48 and an adjustment module 49;

[0076] The tracking module 48 is used for performing face tracking and head-shoulder tracking on the image acquired by the camera after the first frame of image, before the cache module 42 caches the first face image whose image quality is greater than or equal to the first quality threshold, when the detection module 41 detects a face in the first frame of image, to obtain the face area in the image;

[0077] The adjustment module 49 is used to perform automatic exposure adjustment on the camera based on the facial image according to the facial frame corresponding to the facial area, so as to improve the imaging quality of the camera.

[0078] In this embodiment, the detection module 41 is further used to, after performing face detection on the first frame of image captured by the camera, stop face detection when no face is detected in the first frame of image, and perform image change detection on a predetermined core area in the image captured by the camera after the first frame of image; if the image change of the predetermined core area is greater than a predetermined threshold, perform face detection on the image captured by the camera;

[0079] The cache module 42 is also used to cache a first face image whose image quality is greater than or equal to a first quality threshold in the images captured by the above-mentioned camera after the face image is detected when the detection module 41 detects a face.

[0080] In this embodiment, the detection module 41 is specifically used to obtain at least two frames of images captured by the above-mentioned camera after the first frame of image, calculate the pixel difference of the same pixel points in the core area of ​​the above-mentioned at least two frames of image, and perform image change detection on the core area based on the above-mentioned pixel difference.

[0081] Figure 5 The face-scanning payment device provided in the embodiment shown can be used to implement the present invention. Figure 1~Figure 3 The technical solution of the method embodiment shown, its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.

[0082] Figure 6 A schematic diagram of the structure of a face recognition device provided in one embodiment of this specification is shown in FIG. Figure 6 As shown, the face recognition device may include a camera; at least one processor; and at least one memory in communication with the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the instructions of this specification. Figure 1~Figure 3 The illustrated embodiment provides a face-scanning payment method.

[0083] Figure 6 A block diagram of an exemplary face scanning device suitable for implementing the embodiments of the present specification is shown. Figure 6 The face recognition device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of this specification.

[0084] like Figure 6 As shown, the face recognition device is in the form of a general computing device. The components of the face recognition device may include but are not limited to: one or more processors 410, a communication interface 420, a memory 430, a camera 440, and a communication bus 450 connecting different components (including the camera 440, the memory 430, the communication interface 420 and the processing unit 410).

[0085] The communication bus 450 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, or a local bus using any of a variety of bus structures. For example, the communication bus 450 may include, but is not limited to, an industry standard architecture (ISA) bus, a micro channel architecture (MCA) bus, an enhanced ISA bus, a video electronics standards association (VESA) local bus, and a peripheral component interconnection (PCI) bus.

[0086] The face scanning device typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the face scanning device, including volatile and non-volatile media, removable and non-removable media.

[0087] The memory 430 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) and / or a cache memory. The memory 430 may include at least one program product having a set (eg, at least one) of program modules configured to execute the instructions of the present specification. Figure 1~Figure 3 Functionality of the illustrated embodiment.

[0088] A program / utility having a set (at least one) of program modules may be stored in the memory 430, such program modules including - but not limited to - an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include the implementation of a network environment. The program modules generally execute the instructions in this specification. Figure 1~Figure 3 The functions and / or methods in the described embodiments.

[0089] The processor 410 executes various functional applications and data processing by running the programs stored in the memory 430, such as implementing the present specification. Figure 1~Figure 3 The illustrated embodiment provides a face-scanning payment method.

[0090] The embodiment of the present specification provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions enable the computer to execute the present specification. Figure 1~Figure 3 The illustrated embodiment provides a face-scanning payment method.

[0091] The above-mentioned non-transitory computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0092] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0093] The program code embodied on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0094] Computer program code for performing the operations of the present specification may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0095] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0096] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0097] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this specification, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0098] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of this specification includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of this specification belong.

[0099] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0100] It should be noted that the terminals involved in the embodiments of this specification may include but are not limited to personal computers (PCs), personal digital assistants (PDAs), wireless handheld devices, tablet computers, mobile phones, MP3 players, MP4 players, etc.

[0101] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0102] In addition, each functional unit in each embodiment of this specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0103] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0104] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

Claims

1. A face-scanning payment method, applied to a face-scanning device, wherein the face-scanning device is provided with a camera, and the face-scanning payment method comprises: Performing face detection on the first frame image captured by the camera; If a face is detected in the first frame of image, detecting an image captured by the camera after the first frame of image to obtain an image including the same face as the first frame of image, selecting a first face image whose image quality is greater than or equal to a first quality threshold from the images including the same face as the first frame of image, and caching the first face image; After detecting the face scanning instruction, obtaining a second face image captured by the camera; wherein the identifier of the second face image is the same as the identifier of the first face image; If the image quality of the second facial image is less than a second quality threshold, replacing the second facial image with the first facial image, and displaying the first facial image on the screen of the face scanning device in a fixed frame; Performing liveness recognition and identity recognition on the first facial image, and executing a payment operation according to the recognition result of the first facial image; Before caching the first face image, the method further includes: If a face is detected in the first frame of image, performing face tracking and head-shoulder tracking on an image captured by the camera after the first frame of image to obtain a face region in the image; According to the face frame corresponding to the face area, the camera is automatically exposed based on the face image to improve the imaging quality of the camera.

2. The method according to claim 1, wherein: After obtaining the second face image captured by the camera, the method further includes: If the image quality of the second facial image is greater than or equal to a second quality threshold, liveness recognition and identity recognition are performed on the second facial image, and a payment operation is performed based on the recognition result of the second facial image.

3. The method according to claim 1, wherein: After performing face detection on the first frame image captured by the camera, the method further includes: If no face is detected in the first frame of image, stop face detection, and perform image change detection on a predetermined core area in an image captured by the camera after the first frame of image; If the image change of the predetermined core area is greater than a predetermined threshold, performing face detection on the image collected by the camera; If a human face is detected, a first human face image having an image quality greater than or equal to a first quality threshold is cached among images captured by the camera after the image of the human face is detected.

4. The method according to claim 3, wherein: The performing image change detection on a predetermined core area in an image captured by the camera after the first frame of image comprises: Acquire at least two frames of images captured by the camera after the first frame of image; Calculating pixel differences of the same pixel points in the core area of ​​the at least two frames of images; Image change detection is performed on the core area according to the pixel difference.

5. A face-scanning payment device, the face-scanning payment device is arranged in a face-scanning device, the face-scanning device is provided with a camera, and the face-scanning payment device comprises: A detection module, used for performing face detection on the first frame image captured by the camera; a cache module, configured to, when a face is detected in the first frame of image, detect an image acquired by the camera after the first frame of image to obtain an image including the same face as the first frame of image, select a first face image whose image quality is greater than or equal to a first quality threshold from the images including the same face as the first frame of image, and cache the first face image; an acquisition module, configured to acquire a second face image captured by the camera after the detection module detects a face scanning instruction; wherein the identifier of the second face image is the same as the identifier of the first face image; a replacement module, configured to replace the second facial image with the first facial image when the image quality of the second facial image is less than a second quality threshold; A display module, configured to freeze-display the first facial image on the screen of the face scanning device; A recognition module, used for performing liveness recognition and identity recognition on the first face image; A payment module, used to perform a payment operation according to the recognition result of the first facial image; Wherein, the device further comprises: a tracking module, configured to, before the cache module caches a first face image whose image quality is greater than or equal to a first quality threshold, perform face tracking and head-shoulder tracking on an image acquired by the camera after the first frame of image when the detection module detects a face in the first frame of image, so as to obtain a face region in the image; The adjustment module is used to perform automatic exposure adjustment on the camera based on the facial image according to the facial frame corresponding to the facial area, so as to improve the imaging quality of the camera.

6. The device according to claim 5, wherein: The recognition module is further configured to perform liveness recognition and identity recognition on the second facial image after the acquisition module acquires the second facial image captured by the camera, when the image quality of the second facial image is greater than or equal to a second quality threshold; The payment module is further used to perform a payment operation according to the recognition result of the second facial image.

7. The device according to claim 5, wherein: The detection module is further configured to, after performing face detection on a first frame of image captured by the camera, stop face detection when no face is detected in the first frame of image, and perform image change detection on a predetermined core area of ​​an image captured by the camera after the first frame of image; if the image change of the predetermined core area is greater than a predetermined threshold, perform face detection on the image captured by the camera; The cache module is also used to cache a first face image whose image quality is greater than or equal to a first quality threshold in the image captured by the camera after the face image is detected when the detection module detects a face.

8. The device according to claim 7, wherein: The detection module is specifically used to obtain at least two frames of images captured by the camera after the first frame of image, calculate the pixel difference of the same pixel points in the core area of ​​the at least two frames of image, and perform image change detection on the core area based on the pixel difference.

9. A face recognition device, comprising: Camera; at least one processor; as well as at least one memory in communication with the processor, wherein: The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 4 by calling the program instructions. 10 . A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions enable the computer to execute the method according to claim 1 .

Citation Information

Patent Citations

  • Rapid human face detection method

    CN103020580A

  • Face recognition method and device and computer readable storage medium

    CN112396004A

  • Face recognition method and device, equipment and storage medium

    CN112560772A

  • Biological recognition method and device and electronic equipment

    CN112818896A

  • Method and apparatus for capturing moving picture

    US20120176505A1