WO2022199545A1 - 图像处理方法、装置、计算机设备及存储介质 - Google Patents

图像处理方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2022199545A1
WO2022199545A1 PCT/CN2022/082081 CN2022082081W WO2022199545A1 WO 2022199545 A1 WO2022199545 A1 WO 2022199545A1 CN 2022082081 W CN2022082081 W CN 2022082081W WO 2022199545 A1 WO2022199545 A1 WO 2022199545A1
Authority
WO
WIPO (PCT)
Prior art keywords
original image
image
detection
face
shooting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2022/082081
Other languages
English (en)
French (fr)
Inventor
李悦馨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Publication of WO2022199545A1 publication Critical patent/WO2022199545A1/zh
Priority to US17/968,575 priority Critical patent/US12361594B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/60Extraction of image or video features relating to illumination properties, e.g. using a reflectance or lighting model
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Definitions

  • the embodiments of the present application relate to the field of artificial intelligence, and in particular, to an image processing method, apparatus, computer equipment, and storage medium.
  • ID photo is a photo used to prove identity on various documents, such as ID card, driver's license, degree certificate, etc., all need ID photo for identity verification.
  • ID photos are used for identity verification, there are many requirements for ID photos, such as clothing, posture, size, etc., and the requirements for different ID photos are different.
  • due to strict requirements for ID photos users often take photos at specific locations such as photo studios when obtaining the required ID photos, or use self-service shooting machines to shoot.
  • the labor cost of shooting in a specific location is relatively large and the process is cumbersome, and the efficiency of obtaining a certificate photo is low; and if a self-service shooting machine is used for shooting, it needs to be completed in a fixed environment and with a fixed posture, because the self-service shooting is done by the user. If it is done autonomously, it is possible that the obtained images do not meet the required standards for photos, which in turn leads to a low success rate for the verification of the obtained ID photos.
  • Embodiments of the present application provide an image processing method, apparatus, computer device, and storage medium.
  • the technical solution is as follows:
  • an embodiment of the present application provides an image processing method, the method is executed by a computer device, and the method includes:
  • the image shooting defect detection is used to determine whether the original image has shooting defects.
  • the shooting defects refer to the shooting process and cannot be repaired by image processing.
  • the color deviation degree is used to determine whether there is a color cast on the face of the biological body in the original image;
  • the original image passes the image shooting defect detection and fails the color deviation degree detection, performing color correction on the original image
  • a target image is generated based on the color-corrected original image.
  • an embodiment of the present application provides an image processing method, the method is executed by a computer device, and the method includes:
  • the shooting specification prompt information is displayed.
  • the image shooting defect detection is used to determine whether the original image has shooting defects.
  • the shooting defects refer to the shooting process and cannot be For defects repaired through image processing, the shooting specification prompt information includes the shooting defects existing in the original image;
  • the original image after color correction is displayed.
  • an embodiment of the present application provides an image processing apparatus, and the apparatus includes:
  • the acquisition module is used to acquire the original image
  • the detection module is used to perform image shooting defect detection and color deviation detection on the original image, the image shooting defect detection is used to determine whether the original image has shooting defects, and the shooting defects refer to the shooting process and cannot be Defects repaired by image processing, the color deviation detection is used to determine whether the original image has color cast;
  • a correction module configured to perform color correction on the original image when the original image passes the image shooting defect detection and fails the color deviation degree detection
  • a generating module configured to generate a target image based on the color-corrected original image.
  • an embodiment of the present application provides an image processing apparatus, and the apparatus includes:
  • the display module is used to display the shooting interface
  • an acquisition module configured to acquire the original image captured in response to the triggering operation of the capture control in the capture interface
  • the display module is further configured to display shooting specification prompt information when the original image fails the image shooting defect detection, the image shooting defect detection is used to determine whether the original image has shooting defects, and the shooting Defects refer to defects that are caused by the shooting process and cannot be repaired by image processing, and the shooting specification prompt information includes the shooting defects existing in the original image;
  • a correction module configured to perform color correction on the original image when the original image passes the image shooting defect detection and fails the color deviation degree detection, the color deviation degree detection is used to determine the original image Whether the image has color cast;
  • the display module is further configured to display the original image after color correction.
  • an embodiment of the present application provides a computer device, the computer device includes a processor and a memory, the memory stores at least one instruction, at least a piece of program, code set or instruction set, the at least one instruction , The at least one piece of program, the code set or the instruction set is loaded and executed by the processor to implement the image processing method according to the above aspect.
  • a computer-readable storage medium stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, the at least one piece of program, all the The code set or instruction set is loaded and executed by the processor to implement the image processing method described in the above aspects.
  • an embodiment of the present application provides a computer program product, where the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the image processing method provided by the above aspects.
  • image shooting defect detection and color deviation detection are performed on the original image.
  • the image shooting defect detection can detect whether the image has shooting defects that cannot be repaired, and then In the follow-up, users can be guided to shoot in compliance with the detection results; on the other hand, through the detection of color deviation, it can detect whether the original image has color cast, if there is color cast, it can automatically perform color correction, and generate a target based on the corrected original image.
  • FIG. 1 shows a schematic diagram of the principle of an image processing method provided by an embodiment of the present application
  • FIG. 2 shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application
  • FIG. 3 shows a flowchart of an image processing method provided by an exemplary embodiment of the present application
  • FIG. 4 shows a flowchart of an image processing method provided by another exemplary embodiment of the present application.
  • FIG. 5 shows a flowchart of an image processing method provided by another exemplary embodiment of the present application.
  • FIG. 6 is a schematic diagram of an implementation of acquiring a face region shown in an exemplary embodiment
  • FIG. 7 is a schematic diagram of an implementation of dividing a face region according to an exemplary embodiment
  • FIG. 8 is a schematic diagram of another implementation of acquiring a face region shown in an exemplary embodiment
  • FIG. 9 shows a flowchart of a method for generating a certificate photo provided by another exemplary embodiment of the present application.
  • FIG. 10 shows a flowchart of an image processing method provided by another exemplary embodiment of the present application.
  • FIG. 11 is a schematic interface diagram of a certificate photo generation process provided by an exemplary embodiment of the present application.
  • FIG. 12 is a schematic diagram of an interface for failing to generate a certificate photo provided by an exemplary embodiment of the present application.
  • FIG. 13 is a schematic diagram of an interface for obtaining a certificate photo receipt provided by an exemplary embodiment of the present application.
  • FIG. 14 is a structural block diagram of an image processing apparatus provided by an exemplary embodiment of the present application.
  • FIG. 15 is a structural block diagram of an image processing apparatus provided by another exemplary embodiment of the present application.
  • FIG. 16 shows a schematic structural diagram of a computer device provided by an exemplary embodiment of the present application.
  • FIG. 1 shows a schematic diagram of the principle of an image processing method provided by an embodiment of the present application.
  • the computer device performs image shooting defect detection 102 and color deviation detection 103 on the input original image 101 , and when both pass, the target image 105 can be generated directly based on the original image. , and when the color deviation degree detection 103 fails, further color correction 104 is required, and a target image 105 is generated based on the color-corrected original image.
  • the image capturing defect detection 102 fails, the generation of the target image fails. In this case, the original image needs to be re-shot or replaced until the original image can pass the image capturing defect detection 102 .
  • a target image such as a certificate photo
  • a specific shooting requirement it is not necessary to shoot in a specific location such as a photo studio, which can reduce labor costs, and based on the defect detection and color deviation detection through image shooting It can improve the generation quality of the target image, thereby improving the success rate of the target image review, and if the color deviation detection fails, it can also automatically perform color correction, reducing user learning costs and improving Credential photo generation efficiency.
  • the image processing method provided by the embodiments of the present application can be implemented as an independent image generation application program, or applied to an application program that provides a function of photographing a certificate image, and the application program includes but is not limited to instant messaging applications, payment Such applications, file management applications, etc., can be installed in the user's computer equipment for the user to obtain the desired images.
  • the image acquisition scene with specific image shooting requirements may include: a certificate photo acquisition scene, a training sample set acquisition scene (for example, a training sample set for target detection), and the like.
  • the ID photo generation method provided by the embodiment of this application can be implemented as an independent ID photo generation application, or applied to an application that provides a ID photo shooting function
  • applications include but are not limited to instant messaging applications, payment applications, file management applications, etc., which can be installed in the user's computer device for the user to obtain the required ID photo.
  • the user can generate an original image containing the face of the living body by real-time shooting through the ID photo shooting function provided in the application, or upload the completed original image containing the face of the living body to the application, and after obtaining the original image , the computer equipment performs image shooting defect detection and color deviation detection on the original image, and automatically performs color correction when there is a color cast, and finally generates the ID photo required by the user based on the corrected original image, improving the quality of ID photo generation.
  • the method provided by the embodiments of the present application can be implemented as an independent image review application or applied to an application that provides an image review function, and the application can be installed in the computer device of the reviewer for the reviewer to treat Review certificate photos for review.
  • the image review scenarios with specific image shooting requirements may include: a certificate photo review scenario, a training sample set screening scenario (for example, screening a training sample set for target detection), and the like.
  • the method provided by the embodiment of the present application can be implemented as an independent ID photo review application or applied to an application that provides a ID photo review function. It can be installed in the computer equipment of the auditors for the auditors to audit the certificate photos.
  • the reviewer can input the ID photo to be reviewed into the application program, and then the computer equipment can perform image capture defect detection, color deviation detection and color correction on the input ID photo to be reviewed, and realize automatic evaluation and correction. Manual review to improve the efficiency of certificate photo review.
  • the information including but not limited to user equipment information, user personal information, etc.
  • data including but not limited to data for analysis, stored data, displayed data, etc.
  • signals involved in this application All are authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions.
  • the (original) images, captured images, and (original) images containing the face of the living body obtained by the computer device in this application are all obtained with full authorization.
  • FIG. 2 shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application.
  • Computer device 210 and server 220 in this implementation environment.
  • data communication is performed between the computer device 210 and the server 220 through a communication network.
  • the communication network may be a limited network or a wireless network
  • the wireless network may be at least one of a local area network, a metropolitan area network, and a wide area network. kind.
  • the computer device 210 is an electronic device on which an application program providing an image processing function is installed.
  • the computer device 210 includes a camera, which can capture images in real time, and then generate a target image based on the captured images.
  • the electronic device may be a smartphone, tablet, laptop, or desktop computer, among others. This embodiment of the present application does not limit the specific type of the computer device 210 .
  • the server 220 may be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or may provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, Cloud servers for basic cloud computing services such as middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms.
  • the server 220 may receive the original image sent by the computer device 210 .
  • the computer device 210 may input an original image containing the face of the living body, the computer device 210 sends the original image to the server 220 , and the server 220 performs image photographing defects on the original image Detection and color deviation detection, when the color deviation detection fails, color correction can also be performed, and finally a target image is generated based on the corrected original image, and the generated target image is finally fed back to the computer device 210 for display by the computer device 210 .
  • the computer device 210 may also perform image capture defect detection and color deviation detection and correction on the original image, thereby generating the target image, which is not limited in this embodiment.
  • image capture defect detection and color deviation detection and correction on the original image, thereby generating the target image, which is not limited in this embodiment.
  • the following embodiments are described by taking the image processing method being executed by a computer device as an example.
  • FIG. 3 shows a flowchart of an image processing method provided by an exemplary embodiment of the present application. This embodiment is described by taking the method for a computer device as an example, and the method includes the following steps.
  • Step 301 acquiring an original image.
  • the original image may be an image including a biological object, or an image including a landscape or a building, and the embodiment of the present application does not limit the image content specifically included in the original image.
  • the original image may be acquired by real-time shooting, or may be acquired from an image that has been saved locally, or a video frame may be captured from a video, and the video frame image may be used as the original image.
  • the computer device when the user has the requirement to generate a target image that meets specific shooting requirements based on the original image, the computer device performs image processing on the acquired original image to generate the target image.
  • Step 302 Perform image shooting defect detection and color deviation detection on the original image.
  • the image shooting defect detection is used to determine whether the original image has shooting defects.
  • Shooting defects refer to defects caused by the shooting process and cannot be repaired by image processing.
  • Degree detection is used to determine whether the original image has a color cast.
  • the original image Due to the limitations of the acquisition scene and acquisition method of the original image, the original image has some shooting defects. In order to ensure the image quality of the generated target image, in a possible implementation, it is necessary to perform image shooting defects on the original image. Detection and color deviation detection to avoid shooting defects or color defects in the generated target image.
  • Step 303 in the case that the original image passes the image shooting defect detection and fails the color deviation detection, perform color correction on the original image.
  • the shooting defect is a defect caused by the original image shooting process that cannot be repaired by image processing, that is, the original image that has not passed the image shooting defect detection cannot be used to generate the target image; and the color defect can be repaired by color correction, Therefore, in order to avoid performing the subsequent target image generation process (color correction process) on the original image that fails the image capturing defect detection, in a possible implementation, it is only set when the original image passes the image capturing defect detection, and fails to pass the color In the case of deviation detection, color correction is performed on the original image, and the subsequent target image generation process is performed.
  • the subsequent target image generation process can be continued through color correction, which can also prevent the user from re-acquiring the original image and improve the target image generation efficiency.
  • Step 304 generating a target image based on the color-corrected original image.
  • the color-corrected original image does not have shooting defects and color defects, and the color-corrected original image can be determined as the target image.
  • the background in the original image there may be requirements for the background in the original image, and the background of the color-corrected original image can be replaced to generate the target image.
  • the original image is subjected to image shooting defect detection and color deviation detection.
  • the image shooting defect detection can detect whether the image cannot be repaired.
  • the color deviation detection can detect whether there is a color cast in the original image, and if there is a color cast, the color correction can be performed automatically.
  • the original image can be used to generate the target image, which can improve the generation quality of the target image, which in turn helps to improve the success rate of the review of the target image, and the automatic color correction can reduce the user's learning cost and help improve the user's review of images captured in any scene. success rate; in addition, performing color correction on the original image that passed the image shooting defect detection but failed the color deviation detection can avoid the invalid color correction process for the original image that failed the image shooting defect detection, thereby reducing the correction of computer equipment amount of calculation.
  • the image processing method is exemplarily described by taking the ID photo generation scene as an example, wherein, in the ID photo generation scenario, the original image contains the face of a biological body, and the target image is the generated ID photo.
  • FIG. 4 shows a flowchart of an image processing method provided by another exemplary embodiment of the present application. This embodiment is described by taking the method for a computer device as an example, and the method includes the following steps.
  • step 401 an original image is obtained, and the original image includes the face of the living body.
  • the original image refers to an image including the face of a living body.
  • the original image can be obtained by real-time shooting, or can be obtained from an image containing the face of the living body that has been saved locally, or a video frame containing the face of the living body can be intercepted from the video, and the video frame image can be used as the original image. image.
  • the biological face in the original image may be a human face or an animal face.
  • Human ID photos can be generated based on original images containing human faces to meet the needs of ID photos in various scenarios; animal ID photos can also be generated based on original images containing animal faces, such as generating ID photos for cats, dogs and other animals for identity verification. ID photo.
  • the embodiment of the present application does not limit the specific type of the face of the living body.
  • the required ID photo is generated based on the original image.
  • the computer device acquires the original image, it needs to be authorized by the user, and the specific process of user authorization is as follows: before the computer device acquires the original image, a prompt box needs to pop up on the interface of the computer device, and the prompt box contains There are prompt information and operation controls (confirm control and cancel control).
  • the prompt information is used to remind the user that the original image needs to be obtained and the subsequent ID photo generation process is performed.
  • the process of obtaining the original image is determined.
  • the subsequent process of obtaining the original image can be performed.
  • a prompt box needs to pop up to perform the user authorization step before obtaining the original image locally; if the original image is obtained from a local or local If the video is captured from an online video, a prompt box needs to be popped up to perform user authorization steps when performing the video capture operation.
  • Step 402 Perform image shooting defect detection and color deviation detection on the original image.
  • the image shooting defect detection is used to determine whether the original image has shooting defects.
  • Shooting defects refer to defects caused by the shooting process and cannot be repaired by image processing.
  • Degree detection is used to determine whether there is a color cast on the face of the organism in the original image.
  • ID photos Since there are various standard requirements for ID photos, such as clothing, posture, brightness, and hue, etc., in order to generate ID photos that meet the standard requirements, multiple detections of the original image are required. detection, and color-related detection for image brightness, hue, etc., in a possible implementation, when the original image is acquired, it is necessary to perform image shooting defect detection and color deviation detection on the original image to avoid the original image. There are defects that cannot be corrected in the system, which will affect the generation process of subsequent ID photos.
  • image normalization detection refers to flaw detection (ie, shooting defect detection), that is, the detection of uncorrectable defects in the image, such as illumination, head turning and facial organs being blocked during shooting, etc. Such defects cannot be corrected in the future. Therefore, when the image standardization test fails, the ID photo cannot be generated based on the original image, and the original image can be re-shot or replaced.
  • flaw detection ie, shooting defect detection
  • the color deviation detection is to detect whether there is a deviation in the color of the face of the organism in the original image, that is to say, the color of the face of the organism presented in the original image is different from its own color.
  • the color cast problem is mainly affected by the original image acquisition environment. It is caused by external factors such as acquisition equipment; for example, to detect whether there is a color cast problem in the face area in the original image.
  • the defects of image color cast can be further corrected without replacing the original image. Therefore, in a possible implementation, when the color deviation detection fails, the computer device may further perform color correction on the original image, and finally generate a certificate photo based on the color-corrected original image.
  • the image shooting defect detection and the color deviation detection may be performed on the original image at the same time; Color deviation detection; or first perform color deviation detection on the original image, and then perform image shooting defect detection.
  • Step 403 in the case that the original image passes the image shooting defect detection and fails the color deviation detection, perform color correction on the face of the living body in the original image.
  • the color cast can only be known through the perception of professionals or according to the feedback of the failure to generate the ID photo. After knowing the color cast, a professional is required to correct it, which increases the learning cost of the ID photo reviewers. , and the generation efficiency of ID photos is low.
  • the color correction is performed to solve the color cast problem, and then the subsequent ID photo generation problem is continued without re-acquiring the original image or manual correction by professionals to improve the efficiency of ID photo generation.
  • color correction may be performed on the original image based on the biological face image containing qualified colors, so that the corrected color meets the requirements of ID photos.
  • the computer device determines that the original image has not passed the image shooting defect detection, nor the color deviation detection; or the computer device determines that the original image has not passed the image shooting defect detection, but has passed the color deviation detection, it means that the original image cannot be detected.
  • Fixed hard defects if the subsequent ID photo generation process cannot be continued, the user will be notified that the ID photo generation fails, or the ID photo upload fails, to prompt the user to re-obtain the original image.
  • the reason for the failure to generate the ID photo can be fed back to the user, for example, if the image shooting defect detection is not passed, the shooting defects existing in the original image can be fed back.
  • Step 404 generating an ID photo based on the color-corrected original image.
  • the original image may have other format requirements, and if the format and other problems can be corrected, the original image after color correction can be further corrected to generate a certificate photo. Since the ID photo has passed the image shooting defect detection and color deviation detection, that is, it has been tested and adjusted in multiple dimensions to meet various needs. Therefore, it can improve the success rate of ID photo review and avoid re-taking the ID photo.
  • the image shooting defect detection and the color deviation detection are performed on the original image.
  • the image shooting defect detection can detect whether the image is There are shooting defects that cannot be repaired by image processing, and then users can be guided to conduct compliant shooting based on the detection results.
  • Color correction can be performed automatically, and an ID photo is generated based on the corrected original image, which can improve the quality of ID photo generation, which in turn helps to improve the success rate of ID photo review, and automatic color correction can reduce user learning costs and help improve The verification success rate of the ID photo taken by the user in any scene; in addition, color correction for the original image that has passed the image shooting defect detection but failed the color deviation detection can avoid invalidating the original image that failed the image shooting defect detection. color correction process, thereby reducing the amount of correction calculations required to color correct the original image.
  • various aspects including ambient light brightness, facial brightness, facial angle, facial feature status, etc. can be detected to ensure the compliance of ID photos.
  • it can be judged whether there is a color cast problem based on the average pixel value of the pixels in the face area, and the pixel value can be corrected to complete the color cast correction of the original image. Exemplary embodiments will be described below.
  • FIG. 5 shows a flowchart of an image processing method provided by another exemplary embodiment of the present application. This embodiment is described by taking the method for a computer device as an example, and the method includes the following steps.
  • step 501 an original image is obtained, and the original image includes the face of the living body.
  • Step 502 perform facial key point recognition and biological image segmentation on the original image.
  • both image shooting defect detection and color deviation detection are aimed at the biological image or the biological face area in the original image, they have nothing to do with the background area. Therefore, in order to improve the subsequent detection efficiency, the original image is subjected to image shooting defect detection and Before color deviation detection, it is necessary to perform facial key point recognition and biological image segmentation on the original image to ensure that the facial key points and the biological image in the image can be recognized, and avoid subsequent detection due to failure to recognize facial key points or biological images. Detection failure caused by volume image segmentation failure.
  • a fully convolutional neural network can be used to segment the biometric image. If the facial key point recognition fails or the biometric image segmentation fails, the user is prompted that the original image cannot generate a certificate photo, and the image can be imaged. Replace or retake the biological face image until the facial key points are successfully recognized and the biological image segmentation is successful.
  • FCN fully convolutional neural network
  • Step 503 in the case where the facial key points are identified and the biological image is segmented, image capturing defect detection is performed on the original image, and the image capturing defect detection includes brightness detection and facial feature detection.
  • image capture defect detection is used to detect whether there are defects in the original image that cannot be repaired by image processing, and the color deviation is aimed at the correctable color cast in the original image, so in order to avoid invalid color deviation
  • the original image is preferentially subjected to image capture defect detection, and then, according to the image capture defect detection result, it is determined whether to perform subsequent color deviation detection; that is, if the image capture defect detection fails, then Indicates that there are uncorrectable hard defects in the original image, and the generation of the ID photo fails, and there is no need to perform the subsequent color deviation detection process; if the image shooting defect detection passes, the subsequent color deviation detection process can be continued.
  • a facial key point when a facial key point is identified and a valid biological image is obtained by segmentation, it means that there are valid biological images and valid facial areas in the original image, and subsequent detection of image shooting defects on the original image can be performed. step.
  • image shooting defect detection includes brightness detection and facial feature detection, where brightness detection refers to detecting whether the brightness of the original image meets the shooting specifications, that is, whether the brightness of the original image has brightness defects (shooting defects) that cannot be corrected, such as , whether the ambient light intensity and facial brightness meet the requirements when shooting, etc.; facial feature detection is used to determine whether the facial features of the biological face in the original image have uncorrectable facial feature defects (shooting defects).
  • brightness detection refers to detecting whether the brightness of the original image meets the shooting specifications, that is, whether the brightness of the original image has brightness defects (shooting defects) that cannot be corrected, such as , whether the ambient light intensity and facial brightness meet the requirements when shooting, etc.
  • facial feature detection is used to determine whether the facial features of the biological face in the original image have uncorrectable facial feature defects (shooting defects).
  • the process of performing brightness detection on the original image may include the following steps 1 and 2.
  • Step 1 Determine the ambient light brightness and the facial brightness difference corresponding to the original image, and the facial brightness difference is used to represent the brightness difference of different facial sub-regions;
  • when performing brightness detection first obtain the difference between the brightness of the ambient light of the original image and the brightness of different areas of the face in the original image, and then determine whether the original image conforms to the brightness difference between the brightness of the ambient light and the brightness of different areas of the face Specifications for the brightness of ID photos.
  • the ambient light brightness can be obtained from the Exchangeable Image File (EXIF) information of the original image.
  • EXIF Exchangeable Image File
  • the ambient light brightness can also be determined based on the pixel values of the pixels in the background image area in the original image.
  • the average brightness of the background area can be determined based on the pixel value of each pixel, and the calculation method is as follows:
  • Brightness represents the brightness value of the pixel point
  • R is the pixel value of the R channel of the pixel point
  • G is the pixel value of the G channel of the pixel point
  • B is the pixel value of the B channel of the pixel point.
  • the average brightness value of the background area can be obtained by calculating the mean value of the brightness value, which can be used as the ambient light brightness for brightness compliance judgment.
  • the biological face in the original image may be firstly divided into at least two facial sub-regions, and the facial brightness difference is determined based on the brightness of the facial sub-regions.
  • the division can be performed based on the identified facial key points.
  • the face region is first determined based on the position distribution of key points of the face, for example, the face region 602 is obtained according to the boundary median point 601 , and then the face sub-region is obtained by dividing the face region 602 .
  • the face area can be divided in a variety of ways. As shown in FIG. 7 , the vertical division can be performed based on the tip of the nose 701 to obtain the left face sub-region 702 and the right sub-region 703; or the horizontal division can be performed based on the tip of the nose 701, The upper face sub-region 704 and the lower face sub-region 705 are obtained; or the face region can be divided by the nine-square grid method 706 to obtain nine face sub-regions.
  • the face division manner other manners may also be used for division, and the embodiments of the present application are only for schematic description, and the specific face division manner is not limited.
  • the method of determining the facial brightness difference based on the brightness of the sub-regions of the face may include steps A to D:
  • Step A dividing the biological face in the original image into at least two face sub-regions by at least one division method
  • the pixel values of the pixels in each face sub-area are calculated respectively, and the pixel mean value of each face sub-area is obtained, and based on each face sub-area.
  • the pixel mean value of the face sub-region obtains the pixel mean value of the face region, and the pixel mean value is determined as the face brightness difference.
  • the facial brightness difference obtained based on only one division method there may be deviations in the facial brightness difference obtained based on only one division method.
  • the face area can be divided by multiple division methods, and then the facial brightness difference can be obtained based on multiple division methods.
  • the pixel mean of determines the facial brightness difference.
  • Step B determine the sub-region brightness of each face sub-region based on the pixel value of the pixel in the face sub-region;
  • the sub-region brightness of each face sub-region is determined.
  • the brightness value of each pixel in the left-face sub-region can be calculated, and the average value can be obtained to obtain the sub-region face brightness of the left-face sub-region, based on the same method. Determines the sub-region face brightness of the right face sub-region.
  • Step C based on the sub-region brightness of each face sub-region, determine the basic face brightness difference corresponding to different division methods
  • the basic facial brightness difference is determined based on the brightness of the sub-region. For example, when the left and right face division is used for the face, after obtaining the sub-region face brightness of the left face sub-region and the right face sub-region, the average value is obtained to obtain the basic face brightness difference corresponding to the left and right face division method.
  • the obtained basic facial brightness difference may be further normalized to obtain the normalized basic facial brightness difference.
  • Step D Based on the basic facial luminance difference and the weights corresponding to various division methods, the facial luminance difference is obtained by weighted calculation.
  • the facial luminance difference is obtained based on the basic facial luminance difference and the weights corresponding to the various division modes.
  • the facial luminance difference is calculated as follows:
  • R represents the facial brightness difference
  • R leftright refers to the normalized basic facial brightness difference based on the division of the left and right faces
  • W 1 is the corresponding weight of the left and right face division
  • R topbottom refers to the normalized basic facial brightness based on the upper and lower face division.
  • Difference W 2 is the corresponding weight of the upper and lower face division method
  • R ninepart refers to the normalized basic facial brightness difference obtained based on the nine-square grid division
  • W 3 is the corresponding weight of the nine-square grid division method
  • R totalface refers to the normalization based on the overall face area.
  • the basic face brightness is poor
  • W 4 is the overall corresponding weight of the face.
  • the weights corresponding to different division methods can be set based on the specific requirements of the ID photo. If the demand for side light is high, the weights corresponding to the left and right face division methods can be increased, that is, increase W 1 .
  • Step 2 When the ambient light brightness is within the brightness range and the facial brightness difference is less than the brightness difference threshold, it is determined that the original image passes the brightness detection.
  • the brightness detection is passed based on the difference between the brightness of the ambient light and the brightness of the face.
  • the ambient light luminance obtained based on the EXIF information is within the luminance range or when the ambient light luminance indicated by the background area is within the luminance range, it is determined that the ambient light luminance is within the luminance range.
  • the ambient light brightness obtained based on the EXIF information is within the brightness range and the ambient light brightness indicated by the background area is within the brightness range, determine the ambient light brightness. Luminance is within the luminance range.
  • the brightness difference threshold can be set according to the brightness requirements of the certificate.
  • the computer equipment will also perform facial feature detection on the original image, in which the facial features of the original image are detected.
  • the detection process may include the following steps 3 to 5.
  • Step 3 Determine the facial key points of the biological face in the original image
  • the facial key point can be determined. For example, after the facial key point recognition is performed on the human face, the position information of the key points including the eyes, eyebrows, mouth and facial contour can be obtained.
  • Step 4 Determine the facial angle and facial organ state of the biological face in the original image based on the facial key points
  • the face angle refers to the angle between the face key points in the original image and the standard face key points.
  • the computer equipment performs spatial transformation on the face key points in the original image to fit the standard face key points.
  • the face angle can be determined based on the coordinate transformation by fitting the face key point coordinates with the standard face key point coordinates, such as the face pitch angle (the angle at which the face rotates around the X axis), the face yaw Angle (the angle the face rotates around the Y axis) and face roll angle (the angle the face rotates around the Z axis).
  • the state of the facial organs includes the occlusion state of the facial organs, for example, whether the eyes, mouth, face, and eyebrows of the human face are occluded; Including the opening and closing status of facial organs, for example, the opening degree of the eyes, mouth, etc. of the human face.
  • the occlusion status of facial organs may be determined based on the confidence of the key points corresponding to the key points of the face, and the occlusion status is negatively correlated with the confidence, that is, the lower the confidence of the key point, the greater the probability of being occluded.
  • the open and closed states of facial organs may be determined based on the distance between key points of the face.
  • the distance of the key points can be determined according to the coordinates of the upper and lower key points of the eyes, and then the opening degree of the eyes can be judged.
  • Step 5 In the case that the face angle is within the angle range, and the state of the facial organ matches the state of the target organ, it is determined that the original image has passed the facial feature detection.
  • the facial feature detection is passed according to the two.
  • the acquired face angle is within the angle range, that is, when the angle between the biological body face in the original image and the standard biological body face is smaller than the angle threshold, it is determined that the facial angle meets the requirements.
  • different angles can be Corresponding to different angle thresholds, such as face pitch angle, face yaw angle and face roll angle, different angle thresholds can be set correspondingly, and when different angles are smaller than their corresponding angle thresholds, it is determined that the face angle is within the angle range.
  • the facial organ occlusion state indicates that it is not occluded, and the opening and closing degree of the facial organ is within a preset range, it is determined that the facial organ meets the requirements.
  • Step 504 in the case that the original image passes the detection of image shooting defects, perform color deviation detection on the face of the living body in the original image.
  • the original image passes the image shooting defect detection, it indicates that the original image has no uncorrectable defects. Therefore, after passing the image shooting defect detection, continue to perform color deviation detection on the original image. Whether the color of the face of the organism in the original image meets the requirements.
  • the detection of the degree of color deviation may include steps six to eight.
  • Step 6 Determine the target face area of the biological face in the original image
  • the entire face of the living body can be extracted for color detection.
  • the algorithm requires high precision. Therefore, in order to reduce the difficulty and calculation amount of color detection, in a possible implementation , extract the target face area of the biological face in the original image, that is, part of the face area for color deviation detection.
  • the target face area that is, the target face area
  • the distribution determines four median points 801 , and the target face region 802 is determined based on the median points 801 .
  • Step 7 Determine the average pixel value of the target facial area based on the pixel value of the pixel in the target facial area;
  • the average pixel value of the target face area is determined according to the pixel values in the target face area, where the average pixel value includes the average R value, the average G value, and the average B value. Subsequent detection of color deviation is performed based on the average pixel value.
  • Step 8 Detecting the degree of color deviation based on the average pixel value.
  • the average G value when performing color deviation detection based on the average pixel value, when the average R value is greater than the average G value, the average G value is greater than the average B value, and the ratio of the average R value to the average G value is in the first ratio range, the average G value is When the ratio to the average B value is in the second ratio interval, it is determined that the original image passes the color deviation degree detection.
  • Red represents the average R value
  • Green represents the average G value
  • Blue represents the average B value.
  • At least two target face areas of the face of the living body in the original image can be selected, and the at least two target face areas can be color-coded.
  • Deviation degree detection and then comprehensively determine the color deviation degree detection results of the original image according to the color deviation degree detection results of at least two target face areas; that is, if the selected multiple target face areas pass the color deviation degree detection, then determine the original image. Pass the color deviation detection; if there is a target face area in the selected multiple target face areas that fails the color deviation detection, in order to avoid detection errors, you can perform color deviation detection on the entire biological face to ensure that The validity and correctness of color deviation detection results.
  • the original image passes the color deviation degree detection, no subsequent color correction process is required, and a certificate photo can be generated based on the original image; if the original image fails the color deviation degree detection, the biological face in the original image needs to be checked Color correction to avoid the effect of color cast on the subsequent ID photo generation process.
  • Step 505 in the case that the original image fails the detection of the degree of color deviation, perform color correction on the face of the living body in the original image.
  • color correction can be performed on the biological body face in the original image.
  • the process of performing color correction on the original image may include steps 9 to 11.
  • Step 9 Determine the target standard pixel value corresponding to the average pixel value from the standard pixel value space.
  • the standard pixel value in the standard pixel space is the average pixel value of the pixels in the face area corresponding to the standard biological body face. There are biological faces with color deviations;
  • the target standard pixel value P when performing color correction on the facial area of the biological body in the original image, first acquire a plurality of images whose facial area of the biological body meets the standard requirements, and calculate the corresponding facial area of the standard biological body in each image. The average pixel value is recorded, and then a set of standard pixel values is obtained, that is, the standard pixel value space.
  • the target standard pixel value P when the average pixel value of the pixels in the face area corresponding to the face of the living body in the original image is determined, namely P arg (Red, Green, Blue), the target standard pixel value P that matches the average pixel value can be determined in the standard pixel value space.
  • stan Red, Green, Blue
  • the target standard pixel value may be the pixel value point closest to the average pixel value in the standard pixel value space.
  • the target standard pixel value when selecting the target standard pixel value from the standard pixel value space, it is first necessary to select the same average pixel value as the organism in the original image from the standard pixel value space, and then determine the distance from the average pixel value.
  • the target standard pixel value of For example, if the organism in the original image is a "cat", the corresponding average pixel value corresponding to the "cat” needs to be determined in the standard pixel value space, not the average pixel value corresponding to the "dog".
  • Step ten based on the average pixel value and the target standard pixel value, determine the correction parameters corresponding to each color channel;
  • the correction parameters corresponding to each color channel are determined according to the target standard pixel value and the average pixel value as follows:
  • y is the target standard pixel value
  • x is the average pixel value
  • is the correction parameter.
  • Step 11 Use the correction parameters corresponding to each color channel to perform pixel value correction on the pixel values of the pixels in the face region of the living body in the original image.
  • the R value, B value and G value of each pixel in the face area in the original image are corrected respectively to obtain the corrected pixel value, and then the color cast correction of the original image is completed.
  • Step 506 Obtain the background image area in the original image after color correction.
  • ID photos in different scenarios may have different background specifications.
  • a driver's license needs to be white, and a degree certificate needs to be blue
  • the original image may have different background image requirements and ID photo requirements. Therefore, in order to further improve the compliance of the generated ID photo, it is also necessary to perform color correction on the original image after color correction. To judge the compliance of the background image, it is first necessary to obtain the background image area in the original image after color correction.
  • the process of acquiring the background image area may be acquired during the biological image separation process in the early stage.
  • Step 507 in the case that the background image area does not meet the background specification, perform background replacement on the background image area.
  • the biological image in the original image already meets the standard requirements, but there may be a problem that the background area does not meet the background specification.
  • the required background may include blue, red, and white.
  • the background area is separated from the biological image in the image through the segmentation of the biological image, and the background area is replaced to obtain the required background color.
  • Step 508 Crop the original image with the background replaced to generate a certificate photo.
  • the image size is cropped according to the ID photo type or ID photo requirements, and then the ID photo is generated.
  • the ambient light brightness of the original image and the brightness of the face are detected whether there are shooting defects that cannot be repaired by image processing, and facial feature detection is performed to detect the facial angle and facial organ status in the original image. Whether there are any shooting defects that cannot be repaired by image processing, when both the brightness detection and the facial feature detection pass, it is determined that the image shooting defect detection is passed, thereby improving the success rate of the verification of the ID photo.
  • the pixel value of the pixel point in the face area is corrected based on the correction parameters corresponding to each channel to complete the color correction and avoid. If the ID photo does not meet the standard requirements due to color cast, the success rate of the verification of the ID photo is improved, and the automatic color cast correction can reduce labor costs and help improve the efficiency of ID photo generation.
  • the original image is prioritized for image shooting defect detection, and then based on the image shooting defect results to determine whether to perform color deviation detection on the original image, which can avoid the failure of the original image image shooting defect detection.
  • the color deviation degree detection is carried out to reduce the invalid color deviation degree detection process, thereby reducing the detection calculation amount of the computer equipment.
  • the process of generating a certificate photo is shown in FIG. 9 , and the method is performed by a computer device as an example for description.
  • Step 901 input the original image.
  • Step 902 face key point detection.
  • step 903 it is judged whether a face key point is detected, and if not, step 916 is executed.
  • Step 904 portrait segmentation.
  • step 902 is performed synchronously with step 902 .
  • step 905 it is determined whether the portrait segmentation is valid, and if it is invalid, step 916 is executed.
  • the subsequent ambient light brightness detection, face brightness detection, face angle detection, and face organ state detection of the original image need to be completed based on the key points of the face and the segmentation of the portrait and the background area. Therefore, First, it is detected whether the key points of the face can be detected and the portrait can be effectively segmented. When the key points of the face can be detected and the portrait segmentation in this step is valid, the subsequent steps 906 , 907 , 908 and 909 can be performed synchronously.
  • steps 902 to 905 For the implementation of steps 902 to 905, reference may be made to the foregoing step 902, which is not repeated in this embodiment.
  • Step 906 ambient light brightness detection.
  • the ambient light brightness detection is performed on the original image.
  • the ambient light brightness detection may include steps 906a to 906e.
  • Step 906a extract image EXIF information and background area
  • the EXIF information of the image and the background area of the image are obtained separately, wherein the background area of the image can be obtained by segmenting the image.
  • Step 906b judge ambient brightness according to EXIF information
  • Step 906d determine whether the ambient brightness is within the threshold range; if so, determine that the ambient brightness has passed the detection, if not, execute step 916;
  • Step 906c determining the brightness of the image according to the brightness of the background area
  • the brightness of the background area may be determined according to the pixel value of each pixel in the background area.
  • Step 906e the image brightness is within the threshold range; if yes, it is determined that the image brightness passes the detection, if not, step 916 is executed.
  • 906b and 906c are executed synchronously.
  • Step 907 face brightness detection.
  • the detection process may include steps 907a to 907d.
  • Step 907a dividing the face area according to the face key points
  • Step 907b calculating the brightness difference of the basic face
  • the brightness difference of the basic face corresponding to the different division methods is determined based on the brightness of the different face areas obtained by the different division methods.
  • Step 907c weighted calculation of the basic face brightness difference result
  • weighted calculation is performed according to the weights corresponding to the respective division methods to obtain the final face brightness differences.
  • Step 907d determine whether the difference in brightness of the face is less than a specific threshold, if so, it is determined that the detection of the brightness of the human face is passed, and if not, step 916 is executed.
  • the face brightness difference obtained based on the basic face brightness difference is less than a specific threshold, it is determined that the face brightness meets the specification requirements.
  • Step 908 face angle detection.
  • the face angle detection process may include the following steps:
  • Step 908a orthogonally project the standard face key points
  • the angular deviation is determined based on the standard face key points and the face key points in the original image.
  • the standard face key points in the three-dimensional space can be orthogonally projected to obtain position information on the two-dimensional plane, for example, the position information of the standard face key points in the xy plane, the xz plane, and the yz plane can be obtained.
  • Step 908b performing spatial transformation on the current face key points, and fitting projection
  • the standard face key point position information after obtaining the standard face key point position information, perform face key point recognition on the original image to obtain the face key point position information, perform spatial transformation on the face key point position, and fit the standard face key point position.
  • Information such as coordinate fitting in the xy plane, the xz plane, and the yz plane, respectively.
  • Step 908c determine the face angle
  • the face angle is determined according to the coordinate transformation in the process of fitting and projecting the key points of the face.
  • Face yaw angle the angle that the face rotates around the Y axis
  • face roll angle the angle that the face rotates around the Z axis.
  • step 908d it is determined whether the face angle is within the angle range, if yes, it is determined to pass the face angle detection, if not, step 916 is executed.
  • each face angle is within the corresponding preset angle range, and if all are within the preset angle range, it is determined that the face angle conforms to the specification.
  • Step 909 state detection of face organs.
  • the organs in the face may be occluded, such as the ears and eyes being occluded, or the opening and closing of the organs are irregular, such as the eyes are not opened, etc.
  • the detection includes the detection of the occlusion state and the detection of the opening and closing state, and the detection process may include steps 909a to 909e.
  • Step 909a determining the position of the facial organs according to the facial key points
  • Step 909b determining the open and closed state of the organ according to the distance between the key points of the face;
  • step 909d it is determined whether the opening and closing state meets the requirements. If so, it is determined that the opening and closing state of the organ has passed the test. If not, step 916 is executed.
  • Step 909c determining the organ occlusion state according to the confidence of the key points of the face
  • step 909e it is determined whether the occlusion state meets the requirements. If yes, it is determined that the occlusion state of the organ has passed the detection, and if not, step 916 is executed.
  • step 909b and step 909c are executed synchronously.
  • Step 910 extracting local face regions according to face key points.
  • Step 911 whether the color deviation degree detection is passed, if yes, go to Step 913 , if not, go to Step 912 .
  • color deviation detection may be performed according to the extracted average pixel value of the partial face region, wherein, for the color deviation detection method, reference may be made to the foregoing step 904, which is not repeated in this embodiment.
  • Step 912 color correction
  • color correction when the color deviation detection is not passed, color correction may be automatically performed, wherein the correction process may include steps 912a to 912c.
  • Step 912a determining the average pixel value of the local face region
  • Step 912b obtaining correction parameters according to the standard face pixel value and the average pixel value
  • Step 912c performing color cast correction on the face region according to the correction parameters.
  • Step 913 replace the background area.
  • Different ID photos have different background colors.
  • the driver's license needs to be white, and the degree certificate needs to be blue.
  • the shooting scene of the original image may not match the background requirements. Therefore, after the original image passes the above detection and correction, the background area is further checked. Perform detection, and replace the background area if it does not meet the requirements.
  • Step 914 crop correction.
  • Step 915 output the ID photo.
  • a certificate photo that meets the requirements can be obtained, and the computer device outputs the certificate photo and displays it.
  • steps 913 to 915 For the specific implementation process of steps 913 to 915, reference may be made to the above-mentioned steps 907 to 908, which will not be repeated in this embodiment.
  • Step 916 the generation of the ID photo fails and the reason for the failure is displayed.
  • facial key point recognition portrait segmentation, and ambient light brightness, face brightness, face angle, or facial organ state detection process
  • the generation of the ID photo fails, and the computer equipment fails.
  • the corresponding failure reason will be displayed, and the user will be instructed to replace or take the original image that meets the specification, and then generate a certificate photo that meets the specification.
  • FIG. 10 shows a flowchart of an image processing method provided by another exemplary embodiment of the present application. This embodiment is described by taking the method for a computer device as an example, and the method includes the following steps.
  • Step 1001 displaying a shooting interface.
  • the original image may be an image captured in real time.
  • the shooting interface of the computer device can be opened to shoot the original image.
  • the ID photo shooting interface can be opened, and when it is opened, the user can correspondingly select the type of ID photo, such as ID card, driver's license, etc., or can also select the required size , such as one inch, two inches, etc., and then enter the corresponding shooting interface.
  • the user can also select a corresponding template to shoot after entering the ID photo shooting interface.
  • the shooting controls in the shooting interface may be located at the lower left, lower middle, lower right, or upper part of the touch screen, and may be in the form of a circle, a square, or the like. Do limit.
  • a certificate photo shooting interface 1101 is displayed, which includes a shooting control 1102 and a template selection control 1105.
  • a shooting control 1102 controls the shooting interface.
  • the ID photo shooting interface you can also choose to select the original image from the captured images stored in the local album; or, you can intercept the original image from the captured video stored in the local album; correspondingly, the ID photo A control or interface for calling a local photo album or a local gallery is also displayed in the shooting interface.
  • Step 1002 in response to a triggering operation on a photographing control in a photographing interface, acquire a photographed original image.
  • the ID photo shooting interface (shooting interface)
  • the ID photo can be taken by triggering the shooting controls.
  • the triggering operation on the shooting control includes at least one of clicking, long pressing, and sliding.
  • the photographing of a certificate photo may also be triggered by voice, gesture, etc., which is not limited in this embodiment of the present application.
  • the computer device when receiving a triggering operation on the photographing control 1102 , the computer device may acquire the photographed original image 1103 and generate a certificate photo based on the original image 1103 .
  • Step 1003 in the case that the original image fails the image shooting defect detection, display the shooting specification prompt information, the image shooting defect detection is used to determine whether the original image has shooting defects, and the shooting defects refer to the shooting process and cannot be repaired by image processing.
  • the shooting specification prompt information contains shooting defects existing in the original image.
  • the computer equipment After acquiring the captured original image, the computer equipment will perform image shooting defect detection on the original image. When the computer equipment detects that the original image has a shooting defect that cannot be corrected by image processing, it will obtain the reason for failing the detection and make corresponding The display of the shooting specification prompt information.
  • the shooting specification prompt information includes items that do not meet the shooting specifications, that is, items of shooting defects existing in the original image, such as too high or too low brightness, occluded organs, and unsatisfactory posture.
  • the shooting specification prompt information can also contain guidance information to guide the user to take a certificate photo that meets the specification, such as please wear dark clothes, straighten your head, etc.
  • the original image fails the image shooting defect detection, and the computer device displays that the detection fails, and displays the shooting specification prompt message 1201 .
  • the computer device displays that the detection fails, and displays the shooting specification prompt message 1201 .
  • Step 1004 when the original image passes the image shooting defect detection and fails the color deviation detection, perform color correction on the original image, and the color deviation detection is used to determine whether the original image has color cast.
  • color deviation detection is performed on the original image, and if the original image has a color cast problem, color correction is performed on the original image.
  • the detection of color deviation of the biological face in the original image can be focused on. After the original image is generated, the ID photo is generated.
  • the process of performing image capture defect detection and color deviation detection on the original image by the computer device and the process of performing color correction on the face of the biological body in the original image may refer to the above-mentioned embodiments. It is not repeated here.
  • Step 1005 displaying the original image after color correction.
  • the original image after color correction does not have shooting defects and color defects, and the original image after color correction can be displayed in the user interface for the user to view .
  • the ID photo after color correction, if the background area of the original image does not meet the requirements of the ID photo or the size does not meet the requirements, the ID photo can be generated by replacing the background area or performing cropping correction.
  • the ID photo 1104 is obtained and displayed after image shooting defect detection and color correction.
  • a receipt for the ID photo can be further obtained.
  • a data filling interface 1301 can be displayed, where personal data can be filled in to generate a receipt for the certificate photo.
  • the process of performing image capture defect detection and color cast detection on the original image by the computer device and the process of performing color correction on the face of the biological body in the original image may refer to the above-mentioned embodiments. This will not be repeated here.
  • the user can take the ID photo in real time, and after the ID photo is taken, the computer device performs image capture defect detection, color deviation detection and color correction on the captured image.
  • the resulting image generates an ID photo, which improves the success rate of users taking ID photos in any scene, reduces labor costs, and improves ID photo shooting efficiency;
  • Color correction can avoid the ineffective color correction process on the original image that has not passed the image shooting defect detection, thereby reducing the correction calculation amount of the computer equipment.
  • FIG. 14 is a structural block diagram of an image processing apparatus provided by an exemplary embodiment of the present application. As shown in the figure, the apparatus includes:
  • the detection module 1402 is used to perform image capture defect detection and color deviation detection on the original image, and the image capture defect detection is used to determine whether the original image has a capture defect, and the capture defect refers to the defect caused by the capture process and For defects that cannot be repaired by image processing, the color deviation detection is used to determine whether there is a color cast in the original image;
  • a correction module 1403, configured to perform color correction on the original image when the original image passes the image shooting defect detection and fails the color deviation degree detection;
  • the generating module 1404 is configured to generate a target image based on the color-corrected original image.
  • the original image contains a biological face
  • the color deviation detection is used to determine whether the biological face in the original image has a color cast
  • the correction module 1403 is also used for:
  • the generating module 1404 is also used for:
  • An ID photo is generated based on the color-corrected original image.
  • the detection module 1402 is further configured to:
  • the image shooting defect detection is performed on the original image, the image shooting defect detection includes brightness detection and facial feature detection, and the brightness detection is used to determine whether the brightness of the original image has the shooting defect, and the face is detected. Feature detection is used to determine whether the facial features of the biological face in the original image conform to the existence of the shooting defect;
  • the color deviation degree detection is performed on the biological body face in the original image.
  • the detection module 1402 is further configured to:
  • the ambient light brightness is within a brightness range, and the face brightness difference is less than a brightness difference threshold, it is determined that the original image passes the brightness detection.
  • the detection module 1402 is further configured to:
  • the ambient light brightness from the EXIF information of the original image, or determine the ambient light brightness based on pixel values of pixels in the background image area in the original image;
  • the facial luminance difference is determined based on the sub-area luminance for each of the facial sub-areas.
  • the detection module 1402 is further configured to:
  • the determining the facial luminance difference based on the sub-area luminance of each of the facial sub-areas includes:
  • the facial luminance difference is obtained by weighted calculation.
  • the detection module 1402 is further configured to:
  • the facial angle is within the angle range, and the facial organ state matches the target organ state, it is determined that the original image has passed the facial feature detection.
  • the detection module 1402 is further configured to:
  • the facial part occlusion state indicates that the facial part is not occluded
  • the facial part open/close state indicates that the facial part is in the target open/close state
  • the detection module 1402 is further configured to:
  • the color deviation detection is performed based on the average pixel value.
  • the average pixel value includes an average R value, an average G value, and an average B value.
  • the detection module 1402 is further configured to:
  • the ratio of the average R value to the average G value is in a first ratio interval, and the average G value
  • the ratio to the average B value is located in the second ratio interval, it is determined that the original image passes the color deviation degree detection.
  • correction module 1403 is further configured to:
  • the target standard pixel value corresponding to the average pixel value is determined from the standard pixel value space, where the standard pixel value in the standard pixel space is the average pixel value of the pixels in the face area corresponding to the face of the standard biological body, and the standard biological face
  • the part refers to the face of the organism without color deviation
  • pixel value correction is performed on the pixel values of the pixel points in the face region of the living body in the original image.
  • the generating module 1404 is further configured to:
  • the original image with the background replaced is cropped to generate the ID photo.
  • the device further includes:
  • an identification module for performing facial key point recognition and biological image segmentation on the original image
  • the detection module 1402 is further configured to:
  • the original image is subjected to image capture defect detection and color deviation detection.
  • the image capture defect detection can be used to detect the image. Whether there is a shooting defect that cannot be repaired by image processing, and then the user can be guided to take compliance shooting based on the detection results;
  • Color cast can automatically perform color correction, and generate an ID photo based on the corrected original image, which can improve the quality of ID photo generation, which in turn helps to improve the success rate of ID photo review, and automatic color correction can reduce user learning costs and help It is used to improve the success rate of verification of ID photos taken by users in any scene; in addition, color correction is performed on the original images that have passed the defect detection of image shooting but have not passed the detection of color deviation, so as to avoid the original image that has not passed the defect detection of image shooting. Performs an ineffective color correction process, thereby reducing the amount of correction calculations for computer equipment.
  • FIG. 15 is a structural block diagram of an image processing apparatus provided by an exemplary embodiment of the present application. As shown in the figure, the apparatus includes:
  • a display module 1501 used for displaying a shooting interface
  • an acquisition module 1502 configured to acquire the original image captured in response to the triggering operation of the capture control in the capture interface
  • the display module 1501 is further configured to display shooting specification prompt information when the original image fails the image shooting defect detection, the image shooting defect detection is used to determine whether the original image has shooting defects, the Shooting defects refer to defects that are caused by the shooting process and cannot be repaired by image processing, and the shooting specification prompt information includes the shooting defects existing in the original image;
  • a correction module 1503 configured to perform color correction on the original image when the original image passes the image shooting defect detection and fails the color deviation degree detection, and the color deviation degree detection is used to determine the Whether the original image has color cast;
  • the display module 1501 is further configured to display the original image after color correction.
  • the user can take the ID photo in real time, and after the ID photo is taken, the computer device performs image capture defect detection, color deviation detection and color correction on the captured image.
  • the resulting image generates an ID photo, which improves the success rate of users taking ID photos in any scene, reduces labor costs, and improves ID photo shooting efficiency;
  • Color correction can avoid the ineffective color correction process on the original image that has not passed the image shooting defect detection, thereby reducing the correction calculation amount of the computer equipment.
  • the computer device 1600 includes a central processing unit (Central Processing Unit, CPU) 1601, a system memory 1604 including a random access memory 1602 and a read-only memory 1603, and a system connecting the system memory 1604 and the central processing unit 1601 bus 1605.
  • the computer device 1600 also includes a basic input/output system (Input/Output, I/O system) 1606 that facilitates the transfer of information between various devices within the computer, and is used to store the operating system 1613, application programs 1614 and other program modules 1615 mass storage device 1607.
  • I/O system Basic input/output system
  • the basic input/output system 1606 includes a display 1608 for displaying information and input devices 1609 such as a mouse, keyboard, etc., for user input of information.
  • the display 1608 and the input device 1609 are both connected to the central processing unit 1601 through the input and output controller 1610 connected to the system bus 1605.
  • the basic input/output system 1606 may also include an input output controller 1610 for receiving and processing input from a number of other devices such as a keyboard, mouse, or electronic stylus.
  • input output controller 1610 also provides output to a display screen, printer, or other type of output device.
  • the mass storage device 1607 is connected to the central processing unit 1601 through a mass storage controller (not shown) connected to the system bus 1605 .
  • the mass storage device 1607 and its associated computer-readable media provide non-volatile storage for the computer device 1600. That is, the mass storage device 1607 may include a computer-readable medium (not shown) such as a hard disk or a drive.
  • the system memory 1604 and the mass storage device 1607 described above may be collectively referred to as memory.
  • the memory stores one or more programs, the one or more programs are configured to be executed by the one or more central processing units 1601, the one or more programs contain instructions for implementing the above-described methods, and the central processing unit 1601 executes the one or more programs.
  • a plurality of programs implement the methods provided by the above-mentioned respective method embodiments.
  • the computer device 1600 may also be connected to a remote computer on a network through a network such as the Internet to operate. That is, the computer device 1600 can be connected to the network 1612 through the network interface unit 1611 connected to the system bus 1605, or can also use the network interface unit 1611 to connect to other types of networks or remote computer systems (not shown). ).
  • the memory further includes one or more programs, the one or more programs are stored in the memory, and the one or more programs include steps for performing the steps performed by the computer device in the method provided by the embodiment of the present application .
  • Embodiments of the present application further provide a computer-readable storage medium, where at least one instruction, at least one piece of program, code set or instruction set is stored in the readable storage medium, and at least one instruction, at least one piece of program, code set or instruction set is composed of
  • the processor loads and executes to implement the image processing method described in any of the above embodiments.
  • Embodiments of the present application provide a computer program product, where the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the image processing method provided by the above aspects.
  • the medium may be a computer-readable storage medium included in the memory in the above-mentioned embodiments; it may also be a computer-readable storage medium that exists independently and is not assembled into the terminal.
  • the computer-readable storage medium stores at least one instruction, at least one piece of program, code set or instruction set, and the at least one instruction, the at least one piece of program, the code set or the instruction set is loaded and executed by a processor to implement The image processing method described in any of the above method embodiments.
  • the computer-readable storage medium may include: ROM, RAM, Solid State Drives (SSD, Solid State Drives), or an optical disc.
  • the RAM may include Resistive Random Access Memory (ReRAM, Resistance Random Access Memory) and Dynamic Random Access Memory (DRAM, Dynamic Random Access Memory).
  • ReRAM Resistive Random Access Memory
  • DRAM Dynamic Random Access Memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

一种图像处理方法、装置、计算机设备及存储介质,涉及人工智能领域。该方法包括:获取原始图像(301);对原始图像进行图像拍摄缺陷检测以及色彩偏离度检测(302);在原始图像通过图像拍摄缺陷检测,且未通过色彩偏离度检测的情况下,对原始图像进行色彩校正(303);基于色彩校正后的原始图像生成目标图像(304)。采用本申请实施例提供的方法,可以提高图像处理效率。

Description

图像处理方法、装置、计算机设备及存储介质
本申请要求于2021年03月23日提交的申请号为202110309206.2、发明名称为“证件照生成方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及人工智能领域,特别涉及一种图像处理方法、装置、计算机设备及存储介质。
背景技术
证件照是各种证件上用于证明身份的照片,如身份证、驾驶证、学位证等均需证件照用于身份验证。
由于证件照用于身份验证,因此,证件照要求规范较多,比如衣着、姿态、尺寸等,且不同证件照的需求均不相同。相关技术中,由于证件照要求严格,用户获取所需证件照时多在特定地点如照相馆进行拍摄,或采用自助拍摄机器进行拍摄。
然而,在特定地点的拍摄人工成本所需较大且过程较为繁琐,获取证件照效率较低;而若采用自助拍摄机器进行拍摄,需在固定环境且通过固定姿态完成,由于自助拍摄时由用户自主完成,可能存在拍摄所得图像不符合照片所需标准,进而导致拍摄所得证件照审核成功率较低。
发明内容
本申请实施例提供了一种图像处理方法、装置、计算机设备及存储介质。所述技术方案如下:
一方面,本申请实施例提供了一种图像处理方法,所述方法由计算机设备执行,所述方法包括:
获取原始图像;
对所述原始图像进行图像拍摄缺陷检测以及色彩偏离度检测,所述图像拍摄缺陷检测用于确定所述原始图像是否存在拍摄缺陷,所述拍摄缺陷指拍摄过程造成的且无法通过图像处理进行修复的缺陷,所述色彩偏离度用于确定所述原始图像中的所述生物体面部是否存在偏色;
在所述原始图像通过所述图像拍摄缺陷检测,且未通过所述色彩偏离度检测的情况下,对所述原始图像进行色彩校正;
基于色彩校正后的所述原始图像生成目标图像。
另一方面,本申请实施例提供了一种图像处理方法,所述方法由计算机设备执行,所述方法包括:
显示拍摄界面;
响应于对所述拍摄界面中拍摄控件的触发操作,获取拍摄的原始图像;
在所述原始图像未通过图像拍摄缺陷检测的情况下,显示拍摄规范提示信息,所述图像拍摄缺陷检测用于确定所述原始图像是否存在拍摄缺陷,所述拍摄缺陷指拍摄过程造成的且无法通过图像处理进行修复的缺陷,所述拍摄规范提示信息中包含所述原始图像存在的所述拍摄缺陷;
在所述原始图像通过所述图像拍摄缺陷检测,且未通过色彩偏离度检测的情况下,对所述原始图像进行色彩校正,所述色彩偏离度检测用于确定所述原始图像是否存在偏色;
显示经过色彩校正后的所述原始图像。
另一方面,本申请实施例提供了一种图像处理装置,所述装置包括:
获取模块,用于获取原始图像;
检测模块,用于对所述原始图像进行图像拍摄缺陷检测以及色彩偏离度检测,所述图像拍摄缺陷检测用于确定所述原始图像是否存在拍摄缺陷,所述拍摄缺陷指拍摄过程造成的且无法通过图像处理进行修复的缺陷,所述色彩偏离度检测用于确定所述原始图像是否存在偏色;
校正模块,用于在所述原始图像通过所述图像拍摄缺陷检测,且未通过所述色彩偏离度检测的情况下,对所述原始图像进行色彩校正;
生成模块,用于基于色彩校正后的所述原始图像生成目标图像。
另一方面,本申请实施例提供了一种图像处理装置,所述装置包括:
显示模块,用于显示拍摄界面;
获取模块,用于响应于对所述拍摄界面中拍摄控件的触发操作,获取拍摄的原始图像;
所述显示模块,还用于在所述原始图像未通过图像拍摄缺陷检测的情况下,显示拍摄规范提示信息,所述图像拍摄缺陷检测用于确定所述原始图像是否存在拍摄缺陷,所述拍摄缺陷指拍摄过程造成的且无法通过图像处理进行修复的缺陷,所述拍摄规范提示信息中包含所述原始图像存在的所述拍摄缺陷;
校正模块,用于在所述原始图像通过所述图像拍摄缺陷检测,且未通过色彩偏离度检测的情况下,对所述原始图像进行色彩校正,所述色彩偏离度检测用于确定所述原始图像是否存在偏色;
所述显示模块,还用于显示经过色彩校正后的所述原始图像。
另一方面,本申请实施例提供了一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如上述方面所述的图像处理方法。
另一方面,提供了一种计算机可读存储介质,所述可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如上述方面所述的图像处理方法。
另一方面,本申请实施例提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面提供的图像处理方法。
本申请实施例提供的技术方案带来的有益效果至少包括:
本申请实施例中,在获取原始图像后,将对该原始图像进行图像拍摄缺陷检测与色彩偏离度检测,一方面,通过图像拍摄缺陷检测可检测该图像是否存在无法进行修复的拍摄缺陷,进而后续可基于检测结果指导用户进行合规拍摄;另一方面,通过色彩偏离度检测可检测该原始图像是否存在偏色,若存在偏色则可自动进行色彩校正,基于校正后的原始图像生成目标图像,可提高目标图像的生成质量,进而有助于提高目标图像的审核成功率,且自动色彩校正可降低用户学习成本,有助于提高用户在任意场景拍摄所得图像的审核成功率;此外,对于通过图像拍摄缺陷检测而未通过色彩偏离度检测的原始图像进行色彩校正,可以避免对未通过图像拍摄缺陷检测的原始图像进行无效的色彩校正过程,从而减少计算机设备的校正计算量。
附图说明
图1示出了本申请实施例提供的图像处理方法的原理示意图;
图2示出了本申请一个示例性实施例提供的实施环境的示意图;
图3示出了本申请一个示例性实施例提供的图像处理方法的流程图;
图4示出了本申请另一个示例性实施例提供的图像处理方法的流程图;
图5示出了本申请另一个示例性实施例提供的图像处理方法的流程图;
图6是一个示例性实施例示出的获取人脸区域的实施示意图;
图7是一个示例性实施例示出的划分人脸区域的实施示意图;
图8是一个示例性实施例示出的另一种获取人脸区域的实施示意图;
图9示出了本申请另一个示例性实施例提供的证件照生成方法的流程图;
图10示出了本申请另一个示例性实施例提供的图像处理方法的流程图;
图11是本申请一个示例性实施例提供的证件照生成过程的界面示意图;
图12是本申请一个示例性实施例提供的证件照生成失败的界面示意图;
图13是本申请一个示例性实施例提供的获取证件照回执的界面示意图;
图14是本申请一个示例性实施例提供的图像处理装置的结构框图;
图15是本申请另一个示例性实施例提供的图像处理装置的结构框图;
图16示出了本申请一个示例性实施例提供的计算机设备的结构示意图。
具体实施方式
本申请实施例提供的图像处理方法,即人工智能技术中计算机视觉技术方面的应用。图1示出了本申请实施例提供的图像处理方法的原理示意图。
如图1所示,在图像处理过程中,计算机设备对输入的原始图像101进行图像拍摄缺陷检测102以及色彩偏离度检测103,当二者均通过时,则可直接基于原始图像生成目标图像105,而当色彩偏离度检测103未通过时,则需进一步进行色彩校正104,进而基于色彩校正后的原始图像生成目标图像105。而当图像拍摄缺陷检测102未通过时则生成目标图像失败,此时,需重新拍摄或替换原始图像,直至原始图像可通过图像拍摄缺陷检测102为止。
采用本申请实施例提供的方法,对于特定拍摄需求的目标图像(比如证件照),无需在特定地点如照相馆进行拍摄,可降低人工成本,且基于通过图像拍摄缺陷检测以及色彩偏离度检测后的图像生成特定拍摄需求的目标图像,可提高目标图像的生成质量,进而提高目标图像的审核成功率,而若色彩偏离度检测未通过时,还可自动进行色彩校正,降低用户学习成本,提高证件照生成效率。
下面对本申请实施例提供的图像处理方法的应用场景进行示意性说明。
1、应用于具备特定图像拍摄需求的图像获取场景
该应用场景下,本申请实施例提供的图像处理方法可以实现成为独立的图像生成应用程序,或应用于提供证图像拍摄功能的应用程序中,应用程序包括但不限于即时通信类应用程序、支付类应用程序、文件管理类应用程序等,该应用程序可安装于用户的计算机设备中,以供用户获取所需图像。
可选的,具备特定图像拍摄需求的图像获取场景可以包括:证件照获取场景、训练样本集获取场景(比如:用于目标检测的训练样本集)等。
以图像获取场景为用户获取证件照场景为例,该应用场景下,本申请实施例提供的证件照生成方法可以实现成为独立的证件照生成应用程序,或应用于提供证件照拍摄功能的应用程序中,应用程序包括但不限于即时通信类应用程序、支付类应用程序、文件管理类应用程序等,该应用程序可安装于用户的计算机设备中,以供用户获取所需证件照。
在应用阶段,用户可通过应用程序中提供的证件照拍摄功能实时拍摄生成包含生物体面部的原始图像,或上传已拍摄完成的包含生物体面部的原始图像至应用程序中,在获取原始图像后,计算机设备对该原始图像进行图像拍摄缺陷检测以及色彩偏离度检测,并在存在偏色时,自动进行色彩校正,最终基于校正后的原始图像生成用户所需证件照,提高证件照生成质量。
2、应用于具备特定图像拍摄需求的图像审核场景
在该场景下,本申请实施例提供的方法可以实现成为独立的图像审核应用程序或应用于提供图像审核功能的应用程序中,该应用程序可安装在审核人员的计算机设备中,供审核人员对待审核证件照进行审核。
可选的,具备特定图像拍摄需求的图像审核场景可以包括:证件照审核场景、训练样本集筛选场景(比如,筛选用于目标检测的训练样本集)等。
以图像审核场景为证件照审核场景为例,在该场景下,本申请实施例提供的方法可以实现成为独立的证件照审核应用程序或应用于提供证件照审核功能的应用程序中,该应用程序可安装在审核人员的计算机设备中,供审核人员对待审核证件照进行审核。
在应用阶段,审核人员可将待审核证件照输入至应用程序中,进而计算机设备可对输入的待审核证件照进行图像拍摄缺陷检测、色彩偏离度检测以及色彩校正,实现自动评测与校正,避免人工审核,提高证件照审核效率。
上述仅以几种常见的应用场景为例进行示意性说明,本申请实施例提供的方法还可以应用于其他图像处理的场景,本申请实施例并不对实际应用场景构成限定。
需要说明的是,本申请所涉及的信息(包括但不限于用户设备信息、用户个人信息等)、数据(包括但不限于用于分析的数据、存储的数据、展示的数据等)以及信号,均为经用户授权或者经过各方充分授权的,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。例如,本申请中计算机设备获取的(原始)图像、拍摄图像、包含生物体面部的(原始)图像都是在充分授权的情况下获取的。
请参考图2,其示出了本申请一个示例性实施例提供的实施环境的示意图。该实施环境中计算机设备210以及服务器220。其中,计算机设备210以及服务器220之间通过通信网络进行数据通信,可选的,通信网络可以是有限网络也可以是无线网络,且该无线网络可以是局域网、城域网以及广域网中的至少一种。
计算机设备210是安装有提供图像处理功能的应用程序的电子设备。且计算机设备210中包含摄像头,可实时拍摄获取图像,进而基于拍摄得到的图像生成目标图像。该电子设备可以为智能手机、平板电脑、膝上型便携计算机或台式计算机等等。本申请实施例并不对计算机设备210的具体类型进行限定。
服务器220可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络、以及大数据和人工智能平台等基础云计算服务的云服务器。本申请实施例中,服务器220可接收计算机设备210发送的原始图像。
在一种可能的实施方式中,如图2所示,可在计算机设备210中输入包含生物体面部的原始图像,计算机设备210将原始图像发送至服务器220,服务器220对原始图像进行图像拍摄缺陷检测以及色彩偏离度检测,在色彩偏离度检测未通过时还可进行色彩校正,最终基于校正后的原始图像生成目标图像,最终将生成的目标图像反馈至计算机设备210,供计算机设备210进行显示。
在其他可能的实施方式中,也可由计算机设备210对原始图像进行图像拍摄缺陷检测以及色彩偏离度检测与校正,进而生成目标图像,本实施例对此不作限定。为了方便表述,下述各个实施例以图像处理方法由计算机设备执行为例进行说明。
请参考图3,其示出了本申请一个示例性实施例提供的图像处理方法的流程图。本实施例以该方法用于计算机设备为例进行说明,该方法包括如下步骤。
步骤301,获取原始图像。
其中,原始图像可以是包含生物体对象的图像,也可以是包含风景、建筑物的图像,本申请实施例对原始图像中具体包含的图像内容不构成限定。
可选的,该原始图像可通过实时拍摄获取,或可在已保存至本地的图像中获取,也可在视频中截取视频帧,将视频帧图像作为原始图像。
在一种可能的实施方式中,当用户具备基于原始图像生成满足特定拍摄需求的目标图像的需求时,由计算机设备对获取到的原始图像进行图像处理,以生成该目标图像。
步骤302,对原始图像进行图像拍摄缺陷检测以及色彩偏离度检测,图像拍摄缺陷检测用于确定原始图像是否存在拍摄缺陷,拍摄缺陷指拍摄过程造成的且无法通过图像处理进行修复的缺陷,色彩偏离度检测用于确定原始图像是否存在偏色。
由于原始图像的获取场景、获取方式的限制,使得原始图像存在某些拍摄缺陷,为了保证生成的目标图像的图像质量,因此,在一种可能的实施方式中,需要对原始图像进行图像拍摄缺陷检测以及色彩偏离度检测,从而避免生成的目标图像中存在拍摄缺陷或者色彩缺陷。
步骤303,在原始图像通过图像拍摄缺陷检测,且未通过色彩偏离度检测的情况下,对原始图像进行色彩校正。
由于拍摄缺陷是原始图像拍摄过程中造成的无法通过图像处理所修复的缺陷,也即未通过图像拍摄缺陷检测的原始图像无法用于生成目标图像;而色彩缺陷是可以通过色彩校正而修复的,因此,为了避免对未通过图像拍摄缺陷检测的原始图像进行后续目标图像生成过程(色彩校正过程),在一种可能的实施方式中,仅设置在原始图像通过图像拍摄缺陷检测,且未通过色彩偏离度检测的情况下,对原始图像进行色彩校正,并进行后续目标图像生成过程。
可选的,对于通过图像拍摄缺陷检测的原始图像,但是未通过色彩偏离度检测,通过色彩校正来继续执行后续目标图像生成过程,也可以避免用户重新获取原始图像,提高目标图像生成效率。
步骤304,基于色彩校正后的原始图像生成目标图像。
在一种可能的实施方式中,当原始图像进行色彩校正后,表示色彩校正后的原始图像不存在拍摄缺陷和色彩缺陷,可以将色彩校正后的原始图像确定为目标图像。
可选的,在某些场景下,比如,证件照生成场景下,可能对于原始图像中的背景存在要求,则可以对色彩校正后的原始图像进行背景替换,从而生成目标图像。
综上所述,本申请实施例中,在获取原始图像后,将对该原始图像进行图像拍摄缺陷检测与色彩偏离度检测,一方面,通过图像拍摄缺陷检测可检测该图像是否存在无法进行修复的拍摄缺陷,进而后续可基于检测结果指导用户进行合规拍摄;另一方面,通过色彩偏离度检测可检测该原始图像是否存在偏色,若存在偏色则可自动进行色彩校正,基于校正后的原始图像生成目标图像,可提高目标图像的生成质量,进而有助于提高目标图像的审核成功率,且自动色彩校正可降低用户学习成本,有助于提高用户在任意场景拍摄所得图像的审核成功率;此外,对于通过图像拍摄缺陷检测而未通过色彩偏离度检测的原始图像进行色彩校正,可以避免对未通过图像拍摄缺陷检测的原始图像进行无效的色彩校正过程,从而减少计算机设备的校正计算量。
下文实施例中以证件照生成场景为例对图像处理方法进行示例性说明,其中,证件照生成场景下,原始图像中包含有生物体面部,目标图像为生成的证件照。
请参考图4,其示出了本申请另一个示例性实施例提供的图像处理方法的流程图。本实施例以该方法用于计算机设备为例进行说明,该方法包括如下步骤。
步骤401,获取原始图像,原始图像中包含生物体面部。
本申请实施例中,原始图像指包含生物体面部的图像。可选的,该原始图像可通过实时拍摄获取,或可在已保存至本地的包含生物体面部的图像中获取,也可在视频中截取包含生物体面部的视频帧,将视频帧图像作为原始图像。
可选的,本申请实施例中,原始图像中的生物体面部可为人类面部,也可为动物面部。即可基于包含人脸的原始图像生成人类证件照,满足各种场景的证件照需求;也可基于包含动物面部的原始图像生成动物证件照,如为猫、狗等动物生成用于验证身份的证件照。本申请实施例对生物体面部的具体类型不做限定。
在一种可能的实施方式中,获取到包含生物体面部的原始图像后,基于该原始图像生成所需证件照。
需要说明的是,当计算机设备获取原始图像时,需要经过用户授权,具体进行用户授权的过程为:当计算机设备在获取原始图像之前,需要在计算机设备的界面弹出提示框,该提示框中包含有提示信息和操作控件(确认控件和取消控件),提示信息用于提醒用户需要获取且原始图像进行后续证件照生成过程,当接收到用户对确认控件的触发操作时,确定原始图像的获取经过用户授权,可以执行后续获取原始图像的过程。
可选的,针对本申请中原始图像的来源的差异,则具体进行用户授权的时机也存在差异,比如,若原始图像是计算机设备通过摄像头实时拍摄获取到的,则在计算机设备启动摄像头进行拍摄时,即需要弹出提示框进行用户授权步骤;若原始图像是从本地保存的图像中获取到的,则需要在从本地获取原始图像之前弹出提示框进行用户授权步骤;若原始图像是由本地或在线视频中截取到的,则在执行视频截取操作时需要弹出提示框进行用户授权步骤等。
步骤402,对原始图像进行图像拍摄缺陷检测以及色彩偏离度检测,图像拍摄缺陷检测用于确定原始图像是否存在拍摄缺陷,拍摄缺陷指拍摄过程造成的且无法通过图像处理进行修复的缺陷,色彩偏离度检测用于确定原始图像中的生物体面部是否存在偏色。
由于证件照存在多种规范要求,如衣着、姿态、亮度以及色调等多方面需求,因此,为生成满足规范要求的证件照,需对原始图像进行多重检测,比如,针对衣着、姿态等规范性检测,以及针对图像亮度、色调等色彩相关检测等,在一种可能的实施方式中,当获取到原始图像后,需要对原始图像进行图像拍摄缺陷检测与色彩偏离度检测,以避免由于原始图像中存在无法修正的缺陷而影响后续证件照的生成过程。
其中,图像规范度检测指硬伤检测(即拍摄缺陷检测),即检测图像中无法修正的缺陷,如拍摄时光照、头部转向以及面部器官被遮挡等等,该类缺陷后续无法进行修正,因此,在图像规范度检测未通过时,无法基于该原始图像生成证件照,可重新拍摄或替换该原始图像。
而色彩偏离度检测是对原始图像中生物体面部色彩是否存在偏离进行检测,也就是说原始图像中所呈现的生物体面部色彩与其本身色彩存在差异,该偏色问题主要是受原始图像采集环境、采集设备等外部因素影响所导致的;比如,检测原始图像中的人脸面部区域是否存在偏色问题。对于图像偏色问题的缺陷可进一步进行修正,无需再更换原始图像。因此,在一种可能的实施方式中,在色彩偏离度检测未通过时,计算机设备可对原始图像进一步进行色彩校正,最终基于色彩校正后的原始图像生成证件照。
可选的,在对原始图像进行图像拍摄缺陷检测以及色彩偏离度检测中,可以同时对原始图像进行图像拍摄缺陷检测和色彩偏离度检测;也可以先对原始图像进行图像拍摄缺陷检测,再进行色彩偏离度检测;或先对原始图像进行色彩偏离度检测,再进行图像拍摄缺陷检测。
步骤403,在原始图像通过图像拍摄缺陷检测,且未通过色彩偏离度检测的情况下,对原始图像中的生物体面部进行色彩校正。
相关技术中对于偏色问题,仅能通过专业人员感知或根据证件照生成失败的反馈得知存在偏色,在得知存在偏色后,需专业人员进行校正,增加证件照审核人员的学习成本,且证件照的生成效率较低。而本申请实施例中,当原始图像通过图像拍摄缺陷检测,但是未通过色彩偏离度检测,表示原始图像不存在某些无法修正的拍摄缺陷,可能存在一些可修正的偏色问题,则无需直接反馈证件照生成失败,而是对色彩进行校正,解决偏色问题,再继续进行后续证件照生成问题,而无需重新获取原始图像,或由专业人员进行人工修正,以提高证件照生成效率。
可选的,在进行色彩偏离度检测与色彩校正时,可基于包含合格色彩的生物体面部图像对原始图像进行色彩校正,使校正后的色彩满足证件照需求。
可选的,若计算机设备确定原始图像未通过图像拍摄缺陷检测,也未通过色彩偏离度检测;或计算机设备确定原始图像未通过图像拍摄缺陷检测,通过色彩偏离度检测,则表示原始图像存在无法修正的硬性缺陷,无法继续执行后续证件照生成过程,则向用户反馈证件照生成失败,或证件照上传失败,以提示重新获取原始图像。
可选的,当证件照生成失败后,可以向用户反馈证件照生成失败的原因,比如,未通过图像拍摄缺陷检测的情况下,可以反馈原始图像中所存在的拍摄缺陷等。
步骤404,基于色彩校正后的原始图像生成证件照。
可选的,进行色彩校正后,原始图像还可能存在其他格式需求问题,而格式等问题均可以进行修正,则可进一步对色彩校正后的原始图像进行修正,并生成证件照。由于该证件照已通过图像拍摄缺陷检测以及色彩偏离度检测,即已在多维度进行检测与调整,使其符合多方面需求,因此,可提高证件照审核成功率,避免重新拍摄证件照。
综上所述,本申请实施例中,在获取包含生物体面部的原始图像后,对该原始图像进行图像拍摄缺陷检测与色彩偏离度检测,一方面,通过图像拍摄缺陷检测可检测该图像是否存在无法通过图像处理进行修复的拍摄缺陷,进而后续可基于检测结果指导用户进行合规拍摄;另一方面,通过色彩偏离度检测可检测该图像中生物体面部是否存在偏色,若存在偏色则可自动进行色彩校正,基于校正后的原始图像生成证件照,可提高证件照的生成质量,进而有助于提高证件照审核成功率,且自动色彩校正可降低用户学习成本,有助于提高用户在任意场景拍摄所的证件照的审核成功率;此外,对于通过图像拍摄缺陷检测而未通过色彩偏离度检测的原始图像进行色彩校正,可以避免对未通过图像拍摄缺陷检测的原始图像进行无效的色彩校正过程,从而减少对原始图像进行色彩校正的校正计算量。
在一种可能的实施方式中,在进行图像拍摄缺陷检测时,可检测包括环境光照亮度、面部亮度、面部角度、五官状态等多方面,确保证件照的合规性。且在进行色彩偏离度检测时,可基于面部区域中像素点的平均像素值判断是否存在偏色问题,并对像素值进行修正,完成对原始图像的偏色校正。下面将以示例性实施例进行说明。
请参考图5,其示出了本申请另一个示例性实施例提供的图像处理方法的流程图。本实施例以该方法用于计算机设备为例进行说明,该方法包括如下步骤。
步骤501,获取原始图像,原始图像中包含生物体面部。
本步骤实施方式可参考上述步骤401,本实施例不再赘述。
步骤502,对原始图像进行面部关键点识别以及生物体影像分割。
由于图像拍摄缺陷检测与色彩偏离度检测均是针对原始图像中的生物体影像,或生物体面部区域,与背景区域无关,因此,为了提高后续检测效率,在对原始图像进行图像拍摄缺陷检测与色彩偏离度检测之前,首先需要对原始图像进行面部关键点识别以及生物体影像分割,确保可识别得到面部关键点以及图像中生物体影像,避免后续进行检测时,由于识别面部关键点失败或生物体影像分割失败造成的检测失败。
可选的,可采用全卷积神经网络(Fully Convolutional Network,FCN)进行生物体影像分割,若面部关键点识别失败或生物体影像分割失败,则提示用户原始图像无法生成证件照,可进行图像更换或重新拍摄生物体面部图像,直至面部关键点识别成功且生物体影像分割成功为止。
步骤503,在识别出面部关键点且分割出生物体影像的情况下,对原始图像进行图像拍摄缺陷检测,图像拍摄缺陷检测包括亮度检测和面部特征检测。
由于图像拍摄缺陷检测是用于检测原始图像中是否存在无法通过图像处理进行修复的缺陷,而色彩偏离度针对的是原始图像中可校正的偏色问题,因此,为了避免进行无效的色彩偏离度检测过程,在一种可能的实施方式中,优先对原始图像进行图像拍摄缺陷检测,进而根据图像拍摄缺陷检测结果确定是否进行后续的色彩偏离度检测;也即若图像拍摄缺陷检测未通过,则表示原始图像中存在无法修正的硬性缺陷,证件照生成失败,无需进行后续色彩偏离度检测过程;若图像拍摄缺陷检测通过,则可以继续执行后续色彩偏离度检测过程。
在一种可能的实施方式中,当识别出面部关键点且分割得到有效生物体影像时,表示原始图像中存在有效生物体影像以及有效面部区域,可以执行后续对原始图像进行图像拍摄缺陷检测的步骤。
其中,图像拍摄缺陷检测包括亮度检测和面部特征检测,其中,亮度检测指用于检测原始图像亮度是否符合拍摄规范,也即检测原始图像的亮度是否存在无法修正的亮度缺陷(拍摄缺陷),如,拍摄时环境光照强度以及面部亮度等是否符合要求等;面部特征检测用于确定原始图像中生物体面部的面部特征是否存在无法修正的面部特征缺陷(拍摄缺陷)。
其中,对原始图像进行亮度检测的过程可以包括以下步骤一和步骤二。
步骤一、确定原始图像对应的环境光亮度以及面部亮度差,面部亮度差用于表征不同面部子区域的亮度差;
在一种可能的实施方式中,进行亮度检测时,首先获取原始图像的环境光亮度与原始图像中面部不同区域的亮度差,进而根据环境光亮度与面部不同区域的亮度差判断原始图像是否符合证件照亮度方面的规范。
可选的,环境光亮度可从原始图像的可交换图像文件(Exchangeable Image File,EXIF)信息中获取。当原始图像的EXIF信息丢失或不存在EXIF信息时还可基于原始图像中背景图像区域内像素点的像素值确定环境光亮度。
其中,基于背景区域中像素点的像素值确定环境光亮度时,可基于每个像素点的像素值确定背景区域的亮度均值,计算方式如下:
Brightness=0.3*R+0.6*G+0.1*B
其中,Brightness表示像素点的亮度值,R即为该像素点R通道的像素值,G即为该像素点G通道的像素值,B即为该像素点B通道的像素值。
在得到背景区域每个像素点的亮度值后,计算亮度值均值即可得到背景区域的亮度均值,可将其作为环境光亮度进行亮度合规判断。
可选的,获取面部亮度差时,可首先将原始图像中的生物体面部划分为至少两个面部子区域,基于面部子区域的亮度确定面部亮度差。在进行面部划分时,可基于识别得到的面部关键点进行划分。为了方便说明,下述实施例将以生物体面部为人脸进行示例性说明。
示意性的,如图6所示,首先基于人脸关键点位置分布确定人脸区域,如根据边界中值点601得到人脸区域602,再对人脸区域602进行划分得到人脸子区域。
其中,可通过多种划分方式对人脸区域进行划分,如图7所示,可基于鼻尖点701进行垂直划分,得到左脸子区域702与右脸子区域703;或基于鼻尖点701进行水平划分,得到上脸子区域704与下脸子区域705;或还可采用九宫格方式706对人脸区域进行划分,得到九个人脸子区域。对于人脸划分方式,还可采用其他方式进行划分,本申请实施例仅进行示意性说明,对具体人脸划分方式不做限定。
可选的,基于面部子区域的亮度确定面部亮度差方式可包括步骤A~步骤D:
步骤A、通过至少一种划分方式,将原始图像中的生物体面部划分为至少两个面部子区域;
可选的,在进行划分时,可通过任意一种划分方式得到至少两个面部子区域,分别计算各个面部子区域中像素点的像素值,并得到各个面部子区域的像素均值,并基于各个面部子区域的像素均值得到面部区域的像素均值,将该像素均值确定为面部亮度差。
而在另一种可能的实施方式中,仅基于一种划分方式得到的面部亮度差可能存在偏差,为提高准确性,可通过多种划分方式对面部区域进行划分,进而基于多种划分方式得到的像素均值确定面部亮度差。
步骤B、基于面部子区域内像素点的像素值,确定各个面部子区域的子区域亮度;
在进行生物体面部划分后,确定各个面部子区域的子区域亮度。示意性的,当对人脸划分得到左右脸子区域时,对于左脸子区域,可计算左脸子区域内各个像素点的亮度值,并取均值得到左脸子区域的子区域人脸亮度,基于同样方式确定右脸子区域的子区域人脸亮度。
步骤C、基于各个面部子区域的子区域亮度,确定不同划分方式对应的基础面部亮度差;
在一种可能的实施方式中,确定子区域亮度后,再基于子区域亮度确定基础面部亮度差。 如,当对人脸采用左右脸划分时,在得到左脸子区域以及右脸子区域的子区域人脸亮度后,取均值得到左右脸划分方式对应的基础面部亮度差。
为提高判断准确性,可进一步将获取得到的基础面部亮度差进行归一化处理,得到归一化后的基础面部亮度差。
步骤D、基于基础面部亮度差,以及各种划分方式对应的权重,加权计算得到面部亮度差。
当获得各个划分方式对应的基础面部亮度差后,基于基础面部亮度差以及各种划分方式对应的权重得到面部亮度差。示意性的,当对人脸区域采用左右脸划分、上下脸划分以及九宫格划分后,并得到各自对应的基础面部亮度差后,面部亮度差计算方式如下:
R=W 1R leftright+W 2R topbottom+W 3R ninepart+W 4R totalface
其中,R表示面部亮度差,R leftright指基于左右脸划分得到的归一化基础面部亮度差,W 1为左右脸划分方式对应权重,R topbottom指基于上下脸划分得到的归一化基础面部亮度差,W 2为上下脸划分方式对应权重,R ninepart指基于九宫格划分得到的归一化基础面部亮度差,W 3为九宫格划分方式对应权重,R totalface指基于人脸区域整体所得的归一化基础面部亮度差,W 4为人脸整体对应权重。
可选的,对于不同划分方式所对应权重可基于证件照具体需求进行设置,如对侧光需求较高,则可提高左右脸划分方式对应的权重,即提高W 1
步骤二、在环境光亮度位于亮度范围,且面部亮度差小于亮度差阈值的情况下,确定原始图像通过亮度检测。
获取环境光亮度与面部亮度差后,基于环境光亮度与面部亮度差判断是否通过亮度检测。在一种可能的实施方式中,当基于EXIF信息获取的环境光亮度在亮度范围内或当背景区域指示的环境光亮度在亮度范围内时,确定环境光亮度位于亮度范围。而在另一种可能的实施方式中,为确保环境光亮度检测准确率,当基于EXIF信息获取的环境光亮度在亮度范围内且当背景区域指示的环境光亮度在亮度范围内时,确定环境光亮度位于亮度范围内。
当环境光亮度位于亮度范围内且面部亮度差小于亮度差阈值时,确定原始图像通过亮度合规检测,其中,亮度差阈值可根据证件照亮度需求进行设置。
可选的,除上述进行亮度检测外,证件照对于图像中面部角度转向以及面部器官状态等均存在一定要求,因此,计算机设备还会对原始图像进行面部特征检测,其中对原始图像进行面部特征检测的过程可以包括以下步骤三~步骤五。
步骤三、确定原始图像中生物体面部的面部关键点;
对原始图像进行面部关键点识别后,即可确定面部关键点,如对人脸进行人脸关键点识别后,可得到包括眼睛、眉毛、嘴巴以及面部轮廓等关键点的位置信息。
步骤四、基于面部关键点,确定原始图像中生物体面部的面部角度以及面部器官状态;
其中,面部角度是指原始图像中面部关键点与标准面部关键点间角度。以确定人脸角度为例,在一种可能的实施方式中,在确定人脸关键点后,计算机设备将原始图像中的人脸关键点进行空间变换拟合标准人脸关键点,可选的,可通过将人脸关键点坐标与标准人脸关键点坐标进行拟合,基于坐标变换确定人脸角度,如可确定人脸俯仰角(人脸绕X轴转动的角度)、人脸偏航角(人脸绕Y轴转动的角度)以及人脸翻滚角(人脸绕Z轴转动的角度)。
可选的,根据面部关键点确定面部角度后,还需确定面部器官状态,其中面部器官状态包括面部器官遮挡状态,比如,人脸的眼部、嘴部、面部及眉毛等是否被遮挡;还包括面部器官开闭状态,比如,人脸的眼部、嘴部等张开程度。
可选的,可基于面部关键点对应的关键点置信度,确定面部器官遮挡状态,遮挡状态与置信度呈负相关关系,即关键点置信度越低,被遮挡的概率越大。
可选的,可基于面部关键点之间的关键点距离,确定面部器官开闭状态。比如,对于眼部开闭状态的判断可根据眼睛上下关键点的坐标确定关键点距离,进而判断眼睛的张开程度。
步骤五、在面部角度位于角度范围,且面部器官状态与目标器官状态匹配的情况下,确定原始图像通过面部特征检测。
获取面部角度以及面部器官状态后,根据二者判断是否通过面部特征检测。在一种可能的实施方式中,当获取的面部角度位于角度范围,即原始图像中生物体面部与标准生物体面部间角度小于角度阈值时,确定面部角度符合要求,可选的,不同角度可对应不同角度阈值,如,人脸俯仰角、人脸偏航角以及人脸翻滚角可各自对应设置不同的角度阈值,在不同角度均小于各自对应的角度阈值时,确定面部角度位于角度范围。
当获取的面部器官状态与目标器官状态匹配时,即面部器官遮挡状态指示未被遮挡,且面部器官的开闭程度在预设范围内时,确定面部器官符合要求。
步骤504,在原始图像通过图像拍摄缺陷检测的情况下,对原始图像中的生物体面部进行色彩偏离度检测。
在一种可能的实施方式中,在原始图像通过图像拍摄缺陷检测后,表明原始图像不存在无法修正的缺陷,因而,在通过图像拍摄缺陷检测后,继续对原始图像进行色彩偏离度检测,检测原始图像中生物体面部色彩是否符合要求。
在一种可能的实施方式中,色彩偏离度检测可包括步骤六~步骤八。
步骤六、确定原始图像中生物体面部的目标面部区域;
在进行色彩偏离度检测时,可提取整个生物体面部进行色彩检测,然而,提取整个面部时算法所需精度较高,因此,为降低色彩检测的难度与计算量,在一种可能的实施方式中,提取原始图像中生物体面部的目标面部区域,即部分面部区域进行色彩偏离度检测。
以人脸为例,在一种可能的实施方式中,目标面部区域即目标人脸区域,可基于识别到的人脸关键点位置确定,如图8所示,可根据人脸关键点的位置分布确定四个中值点801,基于中值点801确定目标人脸区域802。
步骤七、基于目标面部区域内像素点的像素值,确定目标面部区域平均像素值;
确定目标面部区域后,根据目标面部区域内的像素值确定目标面部区域的平均像素值即RGB均值,其中,平均像素值包括平均R值、平均G值以及平均B值。后续基于平均像素值进行色彩偏离度检测。
步骤八、基于平均像素值进行色彩偏离度检测。
可选的,基于平均像素值进行色彩偏离度检测时,在平均R值大于平均G值,平均G值大于平均B值,平均R值与平均G值的比值位于第一比值区间,平均G值与平均B值的比值位于第二比值区间的情况下,确定原始图像通过色彩偏离度检测。
示意性的,当平均像素值满足如下条件时,确定通过色彩偏离度检测。
Figure PCTCN2022082081-appb-000001
其中,Red即表示平均R值,Green即表示平均G值,Blue即表示平均B值,α 1、β 1、α 2、β 2为设定的区间参数,且均在1-2范围内。
可选的,为了提高色彩偏离度的检测准确性,在一种可能的实施方式中,可以选择原始图像中生物体面部的至少两个目标面部区域,并对该至少两个目标面部区域进行色彩偏离度检测,进而根据至少两个目标面部区域的色彩偏离度检测结果,综合确定原始图像的色彩偏离度检测结果;即若选择的多个目标面部区域均通过色彩偏离度检测,则确定原始图像通过色彩偏离度检测;若选择的多个目标面部区域中,存在某个目标面部区域未通过色彩偏离度检测,为了避免检测有误,可以通过对整个生物体面部进行色彩偏离度检测,以保证色彩偏离度检测结果的有效性和正确性。
可选的,当原始图像通过色彩偏离度检测,则无需进行后续色彩校正过程,可以根据原 始图像生成证件照;若原始图像未通过色彩偏离度检测,则需要对原始图像中的生物体面部进行色彩校正,以避免偏色问题对后续证件照生成过程的影响。
步骤505,在原始图像未通过色彩偏离度检测的情况下,对原始图像中的生物体面部进行色彩校正。
在根据平均像素值判断原始图像中生物体面部未通过色彩偏离度检测后,可对原始图像中生物体面部进行色彩校正,在一种可能的实施方式中,通过拟合平均像素值与标准生物体面部像素值得到修正曲线,进而基于修正区域对原始图像中生物体面部色彩进行修正,可选的,对原始图像进行色彩校正的过程可以包括步骤九~步骤十一。
步骤九、从标准像素值空间中确定平均像素值对应的目标标准像素值,标准像素空间中的标准像素值是标准生物体面部对应面部区域内像素点的平均像素值,标准生物体面部指不存在色彩偏离的生物体面部;
在一种可能的实施方式中,当对原始图像中的生物体面部区域进行色彩校正时,首先获取多张生物体面部区域符合标准需求的图像,计算每张图像中标准生物体对应面部区域的平均像素值并记录,进而得到标准像素值的集合即标准像素值空间。当确定原始图像中生物体面部对应面部区域内像素点的平均像素值即P arg(Red,Green,Blue)后,即可以在标准像素值空间中确定与平均像素值匹配的目标标准像素值P stan(Red,Green,Blue),该目标标准像素值可为在标准像素值空间中与平均像素值距离最近的像素值点。
可选的,在从标准像素值空间中选择目标标准像素值时,首先需要从标准像素值空间中选择与原始图像中生物体相同的平均像素值,进而从该平均像素值中确定出距离最近的目标标准像素值。比如,若原始图像中的生物体为“猫”,则对应需要在标准像素值空间中确定“猫”所对应的平均像素值,而不是“狗”所对应的平均像素值。
步骤十、基于平均像素值和目标标准像素值,确定各个颜色通道对应的修正参数;
根据确定目标标准像素值以及平均像素值确定各个颜色通道对应的修正参数方式如下:
y=δ(x 2-x)+x
其中,y即为目标标准像素值,x即为平均像素值,δ即为修正参数,输入P arg(Red,Green,Blue)以及P stan(Red,Green,Blue)后,即可得到R通道对应的修正参数δ 1,G通道对应的修正参数δ 2以及B通道对应的修正参数δ 3
步骤十一、利用各个颜色通道对应的修正参数,对原始图像中生物体面部区域内像素点的像素值进行像素值修正。
在得到各个通道对应的修正参数后,分别对原始图像中面部区域内的各个像素点的R值、B值以及G值进行修正,得到修正后的像素值,进而完成对原始图像的偏色修正。
步骤506,获取色彩校正后原始图像中的背景图像区域。
由于在证件照生成过程中,除了原始图像中的生物体面部区域需要符合一定的证件照规范,不同场景下的证件照可能具备不同的背景规范需求,比如,驾驶证需白色、学位证需蓝色,而原始图像由于拍摄场地限制,可能导致其对应的背景图像要求与证件照要求存在差异,因此,为了进一步提高生成的证件照的合规性,还需要对经过色彩校正后的原始图像进行背景图像合规性的判断,则首先需要获取到色彩校正后原始图像中的背景图像区域。
其中,获取背景图像区域的过程可以是在前期进行生物体影像分离过程中获取到的。
步骤507,在背景图像区域不符合背景规范的情况下,对背景图像区域进行背景替换。
可选的,在进行色彩校正后,原始图像中生物体影像已符合标准需求,但可能存在背景区域不符合背景规范问题,如,可能所需背景包括蓝色、红色以及白色等,在检测到背景区域颜色与需求颜色不符时,通过生物体影像分割将背景区域与图像中生物体影像分离,并对背景区域进行替换得到符合需求的背景颜色。
步骤508,对背景替换后的原始图像进行裁剪,生成证件照。
可选的,进行背景替换后,还需对图像尺寸进行检测,判断是否满足要求,如:身份证 照片(22mm×32mm)、驾驶证照片(21mm×26mm)、彩色小一寸(27mm×38mm)等等,根据证件照类型或证件照需求对原始图像进行裁剪,进而生成证件照。
本实施例中,通过对原始图像进行亮度检测,检测原始图像的环境光亮度以及面部亮度是否存在无法通过图像处理修复的拍摄缺陷,并进行面部特征检测,检测原始图像中面部角度以及面部器官状态是否存在无法通过图像处理修复的拍摄缺陷范,在亮度检测与面部特征检测均通过时,确定通过图像拍摄缺陷检测,进而提高生成证件照的审核成功率。
且本实施例中,还基于面部区域的平均像素值判断是否存在色彩偏离,在存在偏色问题时,基于各通道对应的修正参数对面部区域像素点的像素值进行修正,完成色彩校正,避免因偏色导致证件照不符规范需求,提高生成证件照的审核成功率,且自动进行偏色修正可降低人工成本,有助于提高证件照生成效率。
此外,在对原始图像进行合规检测过程中,优先对原始图像进行图像拍摄缺陷检测,再基于图像拍摄缺陷结果确定是否对原始图像进行色彩偏离度检测,可以避免在原始图像图像拍摄缺陷检测未通过时对其进行色彩偏离度检测,减少无效的色彩偏离度检测过程,进而减少计算机设备的检测计算量。
结合上述各个实施例,以生物体面部为人脸为例,证件照生成流程如图9所示,以该方法由计算机设备执行为例进行说明。
步骤901,输入原始图像。
本步骤实施方式可参考上述步骤301,本实施例不再赘述。
步骤902,人脸关键点检测。
步骤903,判断是否检测到人脸关键点,若未检测到,则执行步骤916。
步骤904,人像分割。
需要说明的是,本步骤与步骤902同步执行。
步骤905,判断人像分割是否有效,若无效,则执行步骤916。
在一种可能的实施方式中,后续对原始图像的环境光亮度检测、人脸亮度检测、人脸角度检测以及人脸器官状态检测需基于人脸关键点以及分割人像与背景区域完成,因此,首先检测是否可检测到人脸关键点并有效分割人像,当能够检测到人脸关键点且本步骤中人像分割有效时,才可同步执行后续步骤906,步骤907,步骤908以及步骤909。
当检测人脸关键点失败或人像分割失败时无法进行后续检测,即无法基于原始图像生成证件照。
其中,步骤902至905实施方式可参考上述步骤902,本实施例不再赘述。
步骤906,环境光亮度检测。
由于拍摄时可能存在环境光照等影响,使图像亮度存在偏差,而当亮度过低或过高时均对证件照质量产生影响,因此,对原始图像进行环境光亮度检测。在一种可能的实施方式中,环境光亮度检测可包括步骤906a~步骤906e。
步骤906a,提取图像EXIF信息和背景区域;
可选的,分别获取图像的EXIF信息与图像的背景区域,其中,图像的背景区域可基于人像分割得到。
步骤906b,根据EXIF信息判断环境亮度;
步骤906d,判断环境亮度是否在阈值范围内;若是,则确定环境亮度通过检测,若否,则执行步骤916;
步骤906c,根据背景区域亮度确定图像亮度情况;
可选的,可根据背景区域各像素点的像素值确定背景区域亮度。
步骤906e,图像亮度在阈值范围内;若是,则确定图像亮度通过检测,若否,则执行步骤916。
当环境亮度与图像亮度均通过检测时,确定通过环境光亮度检测。而若无法提取得到图 像的EXIF信息,则可仅通过背景区域的亮度判断是否满足环境光亮度。
且需要说明的是,本步骤中906b与906c同步执行。
步骤907,人脸亮度检测。
为进一步判断图像亮度是否符合规范,除对环境光亮度进行检测外,还对图像中人脸亮度进行检测,检测过程可包括步骤907a~步骤907d。
步骤907a,根据人脸关键点划分人脸区域;
步骤907b,计算基础人脸亮度差;
当根据人脸关键点划分人脸区域后,基于不同划分方式所得的不同人脸区域的亮度确定不同划分方式对应的基础人脸亮度差。
步骤907c,对基础人脸亮度差结果加权计算;
可选的,得到不同划分方式对应的基础人脸亮度差后,根据各个划分方式对应的权重进行加权计算,得到最终人脸亮度差。
步骤907d,判断人脸亮度差是否小于特定阈值,若是,则确定通过人脸亮度检测,若否,则执行步骤916。
可选的,基于基础人脸亮度差得到的人脸亮度差小于特定阈值时,确定人脸亮度符合规范需求。
步骤908,人脸角度检测。
由于在拍摄时,可能存在人体头部与证件照预设头部位置存在偏差的情况,比如,人脸偏左侧或右侧、存在低头问题等,因此,通过人脸角度检测确定是否存在角度偏差问题。可选的,人脸角度检测过程可包括如下步骤:
步骤908a,将标准人脸关键点进行正交投影;
在一种可能的实施方式中,基于标准人脸关键点与原始图像中人脸关键点确定角度偏差。可选的,可将三维空间标准人脸关键点进行正交投影,得到二维平面上位置信息,如,得到xy平面、xz平面以及yz平面的标准人脸关键点位置信息。
步骤908b,对当前人脸关键点进行空间变换,拟合投影;
可选的,在得到标准人脸关键点位置信息后,对原始图像进行人脸关键点识别得到人脸关键点位置信息,将人脸关键点位置进行空间变换,拟合标准人脸关键点位置信息,比如,分别在xy平面、xz平面以及yz平面进行坐标拟合。
步骤908c,确定人脸角度;
在一种可能的实施方式中,根据人脸关键点拟合投影过程中坐标变换确定人脸角度,可选的,人脸角度可包括人脸俯仰角(人脸绕X轴转动的角度)、人脸偏航角(人脸绕Y轴转动的角度)以及人脸翻滚角(人脸绕Z轴转动的角度)。
步骤908d,判断人脸角度是否在角度范围内,若是,则确定通过人脸角度检测,若否,则执行步骤916。
在得到人脸角度后,判断各个人脸角度是否在各自对应的预设角度范围内,若均在预设角度范围内,则确定人脸角度符合规范。
步骤909,人脸器官状态检测。
除了可能存在角度偏差问题,人脸中的器官可能存在被遮挡的情况,如耳朵、眼睛被遮挡,或器官开闭不规范的情况,如眼睛未睁开等,因此,对人脸器官状态进行检测,其中,包括遮挡状态检测以及开闭状态检测,检测过程可包括步骤909a~步骤909e。
步骤909a,根据人脸关键点确定人脸器官位置;
步骤909b,根据人脸关键点距离确定器官开闭状态;
步骤909d,判断开闭状态是否符合需求,若是,则确定器官开闭状态通过检测,若否,则执行步骤916。
可选的,可根据各个器官对应的预设开闭程度判断各个器官开闭状态是否符合需求,如 分别为眼睛、嘴巴预设不同的开闭范围,当各个器官开闭状态均满足需求时,确定开闭状态符合需求。
步骤909c,根据人脸关键点置信度确定器官遮挡状态;
步骤909e,判断遮挡状态是否符合需求,若是,则确定器官遮挡状态通过检测,若否,则执行步骤916。
相应的,当确定人脸器官中各个器官均未被遮挡时,确定遮挡状态符合需求。
当器官开闭状态以及遮挡状态通过检测时,确定通过人脸器官状态检测。其中,步骤909b与步骤909c同步执行。
当确定通过环境光亮度检测、人脸亮度检测、人脸角度检测以及人脸器官状态检测时,执行下述步骤。
需要说明的是,环境光亮度检测、人脸亮度检测、人脸角度检测以及人脸器官状态检测具体过程可参考上述步骤503,本实施例不再赘述。
步骤910,根据人脸关键点提取局部人脸区域。
步骤911,是否通过色彩偏离度检测,若是,则执行步骤913,若否,则执行步骤912。
由于拍摄时环境或设备参数原因,可能造成人脸区域的图像色彩存在偏色问题,因此,需进行色彩偏离度检测。可选的,可根据提取的局部人脸区域的平均像素值进行色彩偏离度检测,其中,色彩偏离度检测方法可参考上述步骤904,本实施例不再赘述。
步骤912,色彩校正。
本申请实施例中,在未通过色彩偏离度检测时,可自动进行色彩校正,其中,校正过程可包括步骤912a~步骤912c。
步骤912a,确定局部人脸区域的平均像素值;
步骤912b,根据标准人脸像素值与平均像素值得到修正参数;
步骤912c,根据修正参数对人脸区域进行偏色校正。
其中,色彩校正过程可参考上述步骤505,本实施例不再赘述。
步骤913,替换背景区域。
不同证件照存在不同背景颜色的需求,如驾驶证需白色、学位证需蓝色,而原始图像的拍摄场景可能与背景需求不符,因此,在原始图像通过上述检测及校正后,进一步对背景区域进行检测,若不符合需求,则对背景区域进行替换。
步骤914,裁剪校正。
相应的,不同证件照也存在不同尺寸需求,因此,需进一步对背景替换后的证件照进行裁剪校正,使其尺寸符合证件照需求。
步骤915,输出证件照。
可选的,裁剪校正后即可得到符合需求的证件照,计算机设备输出证件照并进行显示。
步骤913至步骤915具体实施过程可参考上述步骤907至908,本实施例不再赘述。
步骤916,生成证件照失败并显示失败原因。
可选的,在上述人脸关键点识别、人像分割以及环境光亮度、人脸亮度、人脸角度或人脸器官状态检测过程中,若任一检测未通过,则生成证件照失败,计算机设备将显示相应的失败原因,指导用户替换或拍摄符合规范的原始图像,进而生成符合规范的证件照。
请参考图10,其示出了本申请另一个示例性实施例提供的图像处理方法的流程图。本实施例以该方法用于计算机设备为例进行说明,该方法包括如下步骤。
步骤1001,显示拍摄界面。
在一种可能的应用场景下,原始图像可以是实时拍摄的图像。当用户存在拍摄需求时,可以打开计算机设备的拍摄界面,进行原始图像的拍摄。
以拍摄证件照为例。在一种可能的实施方式中,当用户需拍摄证件照时,可打开证件照拍摄界面,打开时,用户可相应选择证件照类型,如身份证、驾驶证等,或还可选择所需尺 寸,如一寸、二寸等,进而进入相应的拍摄界面。在另一种可能的实施方式中,用户也可通过进入证件照拍摄界面后,选择相应模板进行拍摄。
可选的,拍摄界面中的拍摄控件可位于触摸显示屏左下方、中下方、右下方或上方等,且可采用圆形、方形等形式,本申请实施例对拍摄控件的显示形式及位置不做限定。
示意性的,如图11所示,打开拍摄界面后,显示证件照拍摄界面1101,该界面中包含拍摄控件1102,且还包含模板选择控件1105,通过对模板选择控件1105的触发操作,可选择更换模板进行拍摄。
可选的,在证件照拍摄界面,也可以选择从本地相册中存储的已拍摄图像中选择原始图像;或,可以从本地相册中存储的已拍摄视频中截取原始图像等;对应的,证件照拍摄界面中还显示有调用本地相册或本地图库的控件或接口。
步骤1002,响应于对拍摄界面中拍摄控件的触发操作,获取拍摄的原始图像。
显示证件照拍摄界面(拍摄界面)后,可通过对拍摄控件的触发操作,进行证件照拍摄。可选的,对拍摄控件的触发操作包括点击、长按、滑动中的至少一种。或者,还可通过语音、手势等触发拍摄证件照,本申请实施例对此不做限定。
示意性的,如图11所示,当接收到对拍摄控件1102的触发操作时,计算机设备可获取拍摄的原始图像1103,并基于该原始图像1103生成证件照。
步骤1003,在原始图像未通过图像拍摄缺陷检测的情况下,显示拍摄规范提示信息,图像拍摄缺陷检测用于确定原始图像是否存在拍摄缺陷,拍摄缺陷指拍摄过程造成的且无法通过图像处理进行修复的缺陷,拍摄规范提示信息中包含原始图像存在的拍摄缺陷。
在获取拍摄的原始图像后,计算机设备将对原始图像进行图像拍摄缺陷检测,当计算机设备检测到原始图像存在无法通过图像处理进行修正的拍摄缺陷时,将获取未通过检测的原因,并进行相应的拍摄规范提示信息的显示。
可选的,拍摄规范提示信息中包含不符合拍摄规范的条目,即原始图像中存在的拍摄缺陷条目,如亮度过高或过低、器官被遮挡、姿态不符合要求等。除此之外,拍摄规范提示信息还可包含指导信息,用于指导用户拍摄符合规范的证件照,如请身着深色衣服、头部摆正等。
示意性的,如图12所示,原始图像未通过图像拍摄缺陷检测,计算机设备显示检测不通过,并显示拍摄规范提示信息1201,此时,用户可通过对重拍控件1202的触发操作,重新返回证件照拍摄界面,再次拍摄证件照。
步骤1004,在原始图像通过图像拍摄缺陷检测,且未通过色彩偏离度检测的情况下,对原始图像进行色彩校正,色彩偏离度检测用于确定原始图像是否存在偏色。
可选的,当原始图像通过图像拍摄缺陷检测后,对原始图像进行色彩偏离度检测,若原始图像存在偏色问题,则对原始图像进行色彩校正。
可选的,在证件照生成场景下,可以着重对原始图像中的生物体面部进行色彩偏离度检测,若该原始图像中生物体面部存在偏色问题,则需进行色彩校正,进而基于色彩校正后的原始图像生成证件照。
需要说明的是,本实施例中,计算机设备对原始图像进行图像拍摄缺陷检测与色彩偏离度检测的过程,以及对原始图像中生物体面部进行色彩校正的过程可以参考上述实施例,本实施例在此不再赘述。
步骤1005,显示经过色彩校正后的原始图像。
在一种可能的实施方式中,当对原始图像进行色彩校正后,色彩校正后的原始图像不存在拍摄缺陷和色彩缺陷,可以将色彩校正后的原始图像显示在用户界面中,以供用户查看。
可选的,在证件照生成场景下,色彩校正后,若原始图像背景区域不符合证件照需求或尺寸不符合需求,则可通过替换背景区域或进行裁剪校正生成证件照。
示意性的,如图11所示,在经过图像拍摄缺陷检测与色彩校正后得到证件照1104并进 行显示。
可选的,生成证件照后,还可进一步获取证件照回执。示意性的,如图13所示,在拍摄成功后,可显示资料填写界面1301,在该界面可进行个人资料填写用于生成证件照回执,在资料填写完成后,可进行提交,相关部门将进行审核,审核完成后即可得到所需的证件照回执1302。
需要说明的是,本实施例中,计算机设备对原始图像进行图像拍摄缺陷检测与偏色检测的过程,以及对原始图像中生物体面部进行色彩校正的过程可以参考上述实施例,本实施例在此不再赘述。
综上所述,本申请实施例中,用户可实时拍摄证件照,并在拍摄证件照后计算机设备对拍摄所得图像进行图像拍摄缺陷检测与色彩偏离度检测及色彩校正,基于通过检测及色彩校正后的图像生成证件照,提高用户在任意场景下拍摄证件照的审核成功率,降低人工成本,提高证件照拍摄效率;此外,对于通过图像拍摄缺陷检测而未通过色彩偏离度检测的原始图像进行色彩校正,可以避免对未通过图像拍摄缺陷检测的原始图像进行无效的色彩校正过程,从而减少计算机设备的校正计算量。
图14是本申请一个示例性实施例提供的图像处理装置的结构框图,如图所示,该装置包括:
获取模块1401,用于获取原始图像;
检测模块1402,用于对所述原始图像进行图像拍摄缺陷检测以及色彩偏离度检测,所述图像拍摄缺陷检测用于确定所述原始图像是否存在拍摄缺陷,所述拍摄缺陷指拍摄过程造成的且无法通过图像处理进行修复的缺陷,所述色彩偏离度检测用于确定所述原始图像是否存在偏色;
校正模块1403,用于在所述原始图像通过所述图像拍摄缺陷检测,且未通过所述色彩偏离度检测的情况下,对所述原始图像进行色彩校正;
生成模块1404,用于基于色彩校正后的所述原始图像生成目标图像。
可选的,所述原始图像中包含生物体面部,所述色彩偏离度检测用于确定所述原始图像中的所述生物体面部是否存在偏色;
所述校正模块1403,还用于:
在所述原始图像通过所述图像拍摄缺陷检测,且未通过所述色彩偏离度检测的情况下,对所述原始图像中的所述生物体面部进行色彩校正;
所述生成模块1404,还用于:
基于色彩校正后的所述原始图像生成证件照。
可选的,所述检测模块1402,还用于:
对所述原始图像进行所述图像拍摄缺陷检测,所述图像拍摄缺陷检测包括亮度检测和面部特征检测,所述亮度检测用于确定所述原始图像的亮度是否存在所述拍摄缺陷,所述面部特征检测用于确定所述原始图像中所述生物体面部的面部特征是否符合存在所述拍摄缺陷;
在所述原始图像通过所述图像拍摄缺陷检测的情况下,对所述原始图像中的所述生物体面部进行所述色彩偏离度检测。
可选的,所述检测模块1402,还用于:
确定所述原始图像对应的环境光亮度以及面部亮度差,所述面部亮度差用于表征不同面部子区域的亮度差;
在所述环境光亮度位于亮度范围,且所述面部亮度差小于亮度差阈值的情况下,确定所述原始图像通过所述亮度检测。
可选的,所述检测模块1402,还用于:
从所述原始图像的EXIF信息中获取所述环境光亮度,或,基于所述原始图像中背景图像区域内像素点的像素值,确定所述环境光亮度;
将所述原始图像中的所述生物体面部划分为至少两个面部子区域;
基于所述面部子区域内像素点的像素值,确定各个所述面部子区域的子区域亮度;
基于各个所述面部子区域的所述子区域亮度,确定所述面部亮度差。
可选的,所述检测模块1402,还用于:
通过至少一种划分方式,将所述原始图像中的所述生物体面部划分为至少两个所述面部子区域;
所述基于各个所述面部子区域的所述子区域亮度,确定所述面部亮度差,包括:
基于各个所述面部子区域的所述子区域亮度,确定不同划分方式对应的基础面部亮度差;
基于所述基础面部亮度差,以及各种所述划分方式对应的权重,加权计算得到所述面部亮度差。
可选的,所述检测模块1402,还用于:
确定所述原始图像中所述生物体面部的面部关键点;
基于所述面部关键点,确定所述原始图像中所述生物体面部的面部角度以及面部器官状态;
在所述面部角度位于角度范围,且所述面部器官状态与目标器官状态匹配的情况下,确定所述原始图像通过所述面部特征检测。
可选的,所述检测模块1402,还用于:
基于所述面部关键点对应的关键点置信度,确定面部器官遮挡状态;
基于所述面部关键点之间的关键点距离,确定面部器官开闭状态;
将所述面部器官遮挡状态和所述面部器官开闭状态确定为所述面部器官状态;
其中,当所述面部器官状态与所述目标器官状态匹配时,所述面部器官遮挡状态指示面部器官未被遮挡,且所述面部器官开闭状态指示面部器官处于目标开闭状态。
可选的,所述检测模块1402,还用于:
确定所述原始图像中所述生物体面部的目标面部区域;
基于所述目标面部区域内像素点的像素值,确定所述目标面部区域的平均像素值;
基于所述平均像素值进行所述色彩偏离度检测。
可选的,所述平均像素值包括平均R值、平均G值和平均B值。
可选的,所述检测模块1402,还用于:
在所述平均R值大于所述平均G值,所述平均G值大于所述平均B值,所述平均R值与所述平均G值的比值位于第一比值区间,且所述平均G值与所述平均B值的比值位于第二比值区间的情况下,确定所述原始图像通过所述色彩偏离度检测。
可选的,所述校正模块1403,还用于:
从标准像素值空间中确定所述平均像素值对应的目标标准像素值,所述标准像素空间中的标准像素值是标准生物体面部对应面部区域内像素点的平均像素值,所述标准生物体面部指不存在色彩偏离的生物体面部;
基于所述平均像素值和所述目标标准像素值,确定各个颜色通道对应的修正参数;
利用各个颜色通道对应的所述修正参数,对所述原始图像中所述生物体面部区域内像素点的像素值进行像素值修正。
可选的,所述生成模块1404,还用于:
获取色彩校正后所述原始图像中的背景图像区域;
在所述背景图像区域不符合背景规范的情况下,对所述背景图像区域进行背景替换;
对背景替换后的所述原始图像进行裁剪,生成所述证件照。
可选的,所述装置还包括:
识别模块,用于对所述原始图像进行面部关键点识别以及生物体影像分割;
可选的,所述检测模块1402,还用于:
在识别出面部关键点且分割出生物体影像的情况下,对所述原始图像进行图像拍摄缺陷检测以及色彩偏离度检测。
综上所述,本申请实施例中,在获取包含生物体面部的原始图像后,将对该原始图像进行图像拍摄缺陷检测与色彩偏离度检测,一方面,通过图像拍摄缺陷检测可检测该图像是否存在无法通过图像处理进行修复的拍摄缺陷,进而后续可基于检测结果指导用户进行合规拍摄;另一方面,通过色彩偏离度检测可检测该原始图像中生物体面部是否存在偏色,若存在偏色则可自动进行色彩校正,基于校正后的原始图像生成证件照,可提高证件照的生成质量,进而有助于提高证件照审核成功率,且自动色彩校正可降低用户学习成本,有助于提高用户在任意场景拍摄所的证件照的审核成功率;此外,对于通过图像拍摄缺陷检测而未通过色彩偏离度检测的原始图像进行色彩校正,可以避免对未通过图像拍摄缺陷检测的原始图像进行无效的色彩校正过程,从而减少计算机设备的校正计算量。
图15是本申请一个示例性实施例提供的图像处理装置的结构框图,如图所示,该装置包括:
显示模块1501,用于显示拍摄界面;
获取模块1502,用于响应于对所述拍摄界面中拍摄控件的触发操作,获取拍摄的原始图像;
所述显示模块1501,还用于在所述原始图像未通过图像拍摄缺陷检测的情况下,显示拍摄规范提示信息,所述图像拍摄缺陷检测用于确定所述原始图像是否存在拍摄缺陷,所述拍摄缺陷指拍摄过程造成的且无法通过图像处理进行修复的缺陷,所述拍摄规范提示信息中包含所述原始图像存在的所述拍摄缺陷;
校正模块1503,用于在所述原始图像通过所述图像拍摄缺陷检测,且未通过色彩偏离度检测的情况下,对所述原始图像进行色彩校正,所述色彩偏离度检测用于确定所述原始图像是否存在偏色;
所述显示模块1501,还用于显示经过色彩校正后的所述原始图像。
综上所述,本申请实施例中,用户可实时拍摄证件照,并在拍摄证件照后计算机设备对拍摄所得图像进行图像拍摄缺陷检测与色彩偏离度检测及色彩校正,基于通过检测及色彩校正后的图像生成证件照,提高用户在任意场景下拍摄证件照的审核成功率,降低人工成本,提高证件照拍摄效率;此外,对于通过图像拍摄缺陷检测而未通过色彩偏离度检测的原始图像进行色彩校正,可以避免对未通过图像拍摄缺陷检测的原始图像进行无效的色彩校正过程,从而减少计算机设备的校正计算量。
请参考图16,其示出了本申请一个示例性实施例提供的计算机设备的结构示意图。具体来讲:所述计算机设备1600包括中央处理单元(Central Processing Unit,CPU)1601、包括随机存取存储器1602和只读存储器1603的系统存储器1604,以及连接系统存储器1604和中央处理单元1601的系统总线1605。所述计算机设备1600还包括帮助计算机内的各个器件之间传输信息的基本输入/输出系统(Input/Output,I/O系统)1606,和用于存储操作系统1613、应用程序1614和其他程序模块1615的大容量存储设备1607。
所述基本输入/输出系统1606包括有用于显示信息的显示器1608和用于用户输入信息的诸如鼠标、键盘之类的输入设备1609。其中所述显示器1608和输入设备1609都通过连接到系统总线1605的输入输出控制器1610连接到中央处理单元1601。所述基本输入/输出系统1606还可以包括输入输出控制器1610以用于接收和处理来自键盘、鼠标、或电子触控笔等多个其他设备的输入。类似地,输入输出控制器1610还提供输出到显示屏、打印机或其他类型的输出设备。
所述大容量存储设备1607通过连接到系统总线1605的大容量存储控制器(未示出)连接到中央处理单元1601。所述大容量存储设备1607及其相关联的计算机可读介质为计算机设备1600提供非易失性存储。也就是说,所述大容量存储设备1607可以包括诸如硬盘或者 驱动器之类的计算机可读介质(未示出)。
上述的系统存储器1604和大容量存储设备1607可以统称为存储器。
存储器存储有一个或多个程序,一个或多个程序被配置成由一个或多个中央处理单元1601执行,一个或多个程序包含用于实现上述方法的指令,中央处理单元1601执行该一个或多个程序实现上述各个方法实施例提供的方法。
根据本申请的各种实施例,所述计算机设备1600还可以通过诸如因特网等网络连接到网络上的远程计算机运行。也即计算机设备1600可以通过连接在所述系统总线1605上的网络接口单元1611连接到网络1612,或者说,也可以使用网络接口单元1611来连接到其他类型的网络或远程计算机系统(未示出)。
所述存储器还包括一个或者一个以上的程序,所述一个或者一个以上程序存储于存储器中,所述一个或者一个以上程序包含用于进行本申请实施例提供的方法中由计算机设备所执行的步骤。
本申请实施例还提供一种计算机可读存储介质,该可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,至少一条指令、至少一段程序、代码集或指令集由处理器加载并执行以实现上述任一实施例所述的图像处理方法。
本申请实施例提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面提供的图像处理方法。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,该计算机可读存储介质可以是上述实施例中的存储器中所包含的计算机可读存储介质;也可以是单独存在,未装配入终端中的计算机可读存储介质。该计算机可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现上述任一方法实施例所述的图像处理方法。
可选地,该计算机可读存储介质可以包括:ROM、RAM、固态硬盘(SSD,Solid State Drives)或光盘等。其中,RAM可以包括电阻式随机存取记忆体(ReRAM,Resistance Random Access Memory)和动态随机存取存储器(DRAM,Dynamic Random Access Memory)。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的可选的实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (19)

  1. 一种图像处理方法,所述方法由计算机设备执行,所述方法包括:
    获取原始图像;
    对所述原始图像进行图像拍摄缺陷检测以及色彩偏离度检测,所述图像拍摄缺陷检测用于确定所述原始图像是否存在拍摄缺陷,所述拍摄缺陷指拍摄过程造成的且无法通过图像处理进行修复的缺陷,所述色彩偏离度检测用于确定所述原始图像是否存在偏色;
    在所述原始图像通过所述图像拍摄缺陷检测,且未通过所述色彩偏离度检测的情况下,对所述原始图像进行色彩校正;
    基于色彩校正后的所述原始图像生成目标图像。
  2. 根据权利要求1所述的方法,其中,所述原始图像中包含生物体面部,所述色彩偏离度检测用于确定所述原始图像中的所述生物体面部是否存在偏色;
    所述在所述原始图像通过所述图像拍摄缺陷检测,且未通过所述色彩偏离度检测的情况下,对所述原始图像进行色彩校正,包括:
    在所述原始图像通过所述图像拍摄缺陷检测,且未通过所述色彩偏离度检测的情况下,对所述原始图像中的所述生物体面部进行色彩校正;
    所述基于色彩校正后的所述原始图像生成目标图像,包括:
    基于色彩校正后的所述原始图像生成证件照。
  3. 根据权利要求2所述的方法,其中,所述对所述原始图像进行图像拍摄缺陷检测以及色彩偏离度检测,包括:
    对所述原始图像进行所述图像拍摄缺陷检测,所述图像拍摄缺陷检测包括亮度检测和面部特征检测,所述亮度检测用于确定所述原始图像的亮度是否存在所述拍摄缺陷,所述面部特征检测用于确定所述原始图像中所述生物体面部的面部特征是否存在所述拍摄缺陷;
    在所述原始图像通过所述图像拍摄缺陷检测的情况下,对所述原始图像中的所述生物体面部进行所述色彩偏离度检测。
  4. 根据权利要求3所述的方法,其中,所述对所述原始图像进行所述亮度检测,包括:
    确定所述原始图像对应的环境光亮度以及面部亮度差,所述面部亮度差用于表征不同面部子区域的亮度差;
    在所述环境光亮度位于亮度范围,且所述面部亮度差小于亮度差阈值的情况下,确定所述原始图像通过所述亮度检测。
  5. 根据权利要求4所述的方法,其中,所述确定所述原始图像对应的环境光亮度以及面部亮度差,包括:
    从所述原始图像的EXIF信息中获取所述环境光亮度,或,基于所述原始图像中背景图像区域内像素点的像素值,确定所述环境光亮度;
    将所述原始图像中的所述生物体面部划分为至少两个面部子区域;
    基于所述面部子区域内像素点的像素值,确定各个所述面部子区域的子区域亮度;
    基于各个所述面部子区域的所述子区域亮度,确定所述面部亮度差。
  6. 根据权利要求5所述的方法,其中,所述将所述原始图像中的所述生物体面部划分为至少两个面部子区域,包括:
    通过至少一种划分方式,将所述原始图像中的所述生物体面部划分为至少两个所述面部子区域;
    所述基于各个所述面部子区域的所述子区域亮度,确定所述面部亮度差,包括:
    基于各个所述面部子区域的所述子区域亮度,确定不同划分方式对应的基础面部亮度差;
    基于所述基础面部亮度差,以及各种所述划分方式对应的权重,加权计算得到所述面部亮度差。
  7. 根据权利要求3所述的方法,其中,所述对所述原始图像进行所述面部特征检测,包括:
    确定所述原始图像中所述生物体面部的面部关键点;
    基于所述面部关键点,确定所述原始图像中所述生物体面部的面部角度以及面部器官状态;
    在所述面部角度位于角度范围,且所述面部器官状态与目标器官状态匹配的情况下,确定所述原始图像通过所述面部特征检测。
  8. 根据权利要求7所述的方法,其中,所述基于所述面部关键点,确定所述原始图像中所述生物体面部的面部器官状态,包括:
    基于所述面部关键点对应的关键点置信度,确定面部器官遮挡状态;
    基于所述面部关键点之间的关键点距离,确定面部器官开闭状态;
    将所述面部器官遮挡状态和所述面部器官开闭状态确定为所述面部器官状态;
    其中,当所述面部器官状态与所述目标器官状态匹配时,所述面部器官遮挡状态指示面部器官未被遮挡,且所述面部器官开闭状态指示面部器官处于目标开闭状态。
  9. 根据权利要求2至8任一所述的方法,其中,所述对所述原始图像中的所述生物体面部进行所述色彩偏离度检测,包括:
    确定所述原始图像中所述生物体面部的目标面部区域;
    基于所述目标面部区域内像素点的像素值,确定所述目标面部区域的平均像素值;
    基于所述平均像素值进行所述色彩偏离度检测。
  10. 根据权利要求9所述的方法,其中,所述平均像素值包括平均R值、平均G值和平均B值;
    所述基于所述平均像素值进行所述色彩偏离度检测,包括:
    在所述平均R值大于所述平均G值,所述平均G值大于所述平均B值,所述平均R值与所述平均G值的比值位于第一比值区间,且所述平均G值与所述平均B值的比值位于第二比值区间的情况下,确定所述原始图像通过所述色彩偏离度检测。
  11. 根据权利要求9所述的方法,其中,所述对所述原始图像中的所述生物体面部进行色彩校正,包括:
    从标准像素值空间中确定所述平均像素值对应的目标标准像素值,所述标准像素空间中的标准像素值是标准生物体面部对应面部区域内像素点的平均像素值,所述标准生物体面部指不存在色彩偏离的生物体面部;
    基于所述平均像素值和所述目标标准像素值,确定各个颜色通道对应的修正参数;
    利用各个颜色通道对应的所述修正参数,对所述原始图像中所述生物体面部区域内像素点的像素值进行像素值修正。
  12. 根据权利要求2至8任一所述的方法,其中,所述基于色彩校正后的所述原始图像生成证件照,包括:
    获取色彩校正后所述原始图像中的背景图像区域;
    在所述背景图像区域不符合背景规范的情况下,对所述背景图像区域进行背景替换;
    对背景替换后的所述原始图像进行裁剪,生成所述证件照。
  13. 根据权利要求2至8任一所述的方法,其中,所述对所述原始图像进行图像拍摄缺陷检测以及色彩偏离度检测之前,所述方法还包括:
    对所述原始图像进行面部关键点识别以及生物体影像分割;
    所述对所述原始图像进行图像拍摄缺陷检测以及色彩偏离度检测,包括:
    在识别出面部关键点且分割出生物体影像的情况下,对所述原始图像进行所述图像拍摄缺陷检测以及色彩偏离度检测。
  14. 一种图像处理方法,所述方法由计算机设备执行,所述方法包括:
    显示拍摄界面;
    响应于对所述拍摄界面中拍摄控件的触发操作,获取拍摄的原始图像;
    在所述原始图像未通过图像拍摄缺陷检测的情况下,显示拍摄规范提示信息,所述图像拍摄缺陷检测用于确定所述原始图像是否存在拍摄缺陷,所述拍摄缺陷指拍摄过程造成的且无法通过图像处理进行修复的缺陷,所述拍摄规范提示信息中包含所述原始图像存在的所述拍摄缺陷;
    在所述原始图像通过所述图像拍摄缺陷检测,且未通过色彩偏离度检测的情况下,对所述原始图像进行色彩校正,所述色彩偏离度检测用于确定所述原始图像是否存在偏色;
    显示经过色彩校正后的所述原始图像。
  15. 一种图像处理装置,所述装置包括:
    获取模块,用于获取原始图像;
    检测模块,用于对所述原始图像进行图像拍摄缺陷检测以及色彩偏离度检测,所述图像拍摄缺陷检测用于确定所述原始图像是否存在拍摄缺陷,所述拍摄缺陷指拍摄过程造成的且无法通过图像处理进行修复的缺陷,所述色彩偏离度检测用于确定所述原始图像是否存在偏色;
    校正模块,用于在所述原始图像通过所述图像拍摄缺陷检测,且未通过所述色彩偏离度检测的情况下,对所述原始图像进行色彩校正;
    生成模块,用于基于色彩校正后的所述原始图像生成目标图像。
  16. 一种图像处理装置,所述装置包括:
    显示模块,用于显示拍摄界面;
    获取模块,用于响应于对所述拍摄界面中拍摄控件的触发操作,获取拍摄的原始图像;
    所述显示模块,还用于在所述原始图像未通过图像拍摄缺陷检测的情况下,显示拍摄规范提示信息,所述图像拍摄缺陷检测用于确定所述原始图像是否存在拍摄缺陷,所述拍摄缺陷指拍摄过程造成的且无法通过图像处理进行修复的缺陷,所述拍摄规范提示信息中包含所述原始图像存在的所述拍摄缺陷;
    校正模块,用于在所述原始图像通过所述图像拍摄缺陷检测,且未通过色彩偏离度检测的情况下,对所述原始图像进行色彩校正,所述色彩偏离度检测用于确定所述原始图像是否存在偏色;
    所述显示模块,还用于显示经过色彩校正后的所述原始图像。
  17. 一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如权利要求1至13任一所述的图像处理方法,或,实现如权利要求14所述的图像处理方法。
  18. 一种计算机可读存储介质,所述可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如权利要求1至13任一所述的图像处理方法,或,实现如权利要求14所述的图像处理方法。
  19. 一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,计算机设备的处理器从所述计算机可读存储介质读取所述计算机指令,所述处理器执行所述计算机指令以实现如权利要求1至13任一所述的图像处理方法,或,实现如权利要求14所述的图像处理方法。
PCT/CN2022/082081 2021-03-23 2022-03-21 图像处理方法、装置、计算机设备及存储介质 Ceased WO2022199545A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/968,575 US12361594B2 (en) 2021-03-23 2022-10-18 Image processing method and apparatus, computer device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110309206.2 2021-03-23
CN202110309206.2A CN115115504A (zh) 2021-03-23 2021-03-23 证件照生成方法、装置、计算机设备及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/968,575 Continuation US12361594B2 (en) 2021-03-23 2022-10-18 Image processing method and apparatus, computer device and storage medium

Publications (1)

Publication Number Publication Date
WO2022199545A1 true WO2022199545A1 (zh) 2022-09-29

Family

ID=83323069

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/082081 Ceased WO2022199545A1 (zh) 2021-03-23 2022-03-21 图像处理方法、装置、计算机设备及存储介质

Country Status (3)

Country Link
US (1) US12361594B2 (zh)
CN (1) CN115115504A (zh)
WO (1) WO2022199545A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115861318A (zh) * 2023-02-27 2023-03-28 金乡县利顺祥棉业有限公司 一种棉花加工生产质量检测方法
CN116630203A (zh) * 2023-07-19 2023-08-22 科大乾延科技有限公司 集成成像三维显示质量提升方法
CN116818664A (zh) * 2023-06-16 2023-09-29 山东福特尔地毯有限公司 一种基于视觉检测的地毯缺陷检测方法及系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117412158B (zh) * 2023-10-09 2024-09-03 广州翼拍联盟网络技术有限公司 拍摄原图处理成多种证件照的方法、装置、设备及介质
CN120726518B (zh) * 2025-08-18 2025-11-07 山东省水利勘测设计院有限公司 一种基于无人机的水库容量动态监测方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609500A (zh) * 2008-12-01 2009-12-23 公安部第一研究所 出入境数字人像相片质量评估方法
US20150186373A1 (en) * 2013-12-27 2015-07-02 Thomson Licensing Method for sorting a group of images of a database and method for color correcting an image, corresponding devices, computer program and non-transitory computer readable medium
CN111241895A (zh) * 2019-01-16 2020-06-05 余海军 基于脸部识别的控制机构
CN111814569A (zh) * 2020-06-12 2020-10-23 深圳禾思众成科技有限公司 一种人脸遮挡区域的检测方法及系统
CN112507923A (zh) * 2020-12-16 2021-03-16 平安银行股份有限公司 证件翻拍检测方法、装置、电子设备及介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7738673B2 (en) * 2000-04-19 2010-06-15 Digimarc Corporation Low visible digital watermarks
US7315630B2 (en) * 2003-06-26 2008-01-01 Fotonation Vision Limited Perfecting of digital image rendering parameters within rendering devices using face detection
US8989453B2 (en) * 2003-06-26 2015-03-24 Fotonation Limited Digital image processing using face detection information
US20100028619A1 (en) * 2006-09-11 2010-02-04 3M Innovative Properties Company Card with a tearable security laminate
JP4906627B2 (ja) * 2007-07-31 2012-03-28 キヤノン株式会社 画像処理装置、画像処理方法、コンピュータプログラム及び記憶媒体
TW201222432A (en) * 2010-11-26 2012-06-01 Inst Information Industry System, device, method, and computer program product for facial defect analysis using angular facial image
JP7039183B2 (ja) * 2017-05-31 2022-03-22 キヤノン株式会社 画像処理装置、画像処理方法、及びプログラム

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609500A (zh) * 2008-12-01 2009-12-23 公安部第一研究所 出入境数字人像相片质量评估方法
US20150186373A1 (en) * 2013-12-27 2015-07-02 Thomson Licensing Method for sorting a group of images of a database and method for color correcting an image, corresponding devices, computer program and non-transitory computer readable medium
CN111241895A (zh) * 2019-01-16 2020-06-05 余海军 基于脸部识别的控制机构
CN111814569A (zh) * 2020-06-12 2020-10-23 深圳禾思众成科技有限公司 一种人脸遮挡区域的检测方法及系统
CN112507923A (zh) * 2020-12-16 2021-03-16 平安银行股份有限公司 证件翻拍检测方法、装置、电子设备及介质

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115861318A (zh) * 2023-02-27 2023-03-28 金乡县利顺祥棉业有限公司 一种棉花加工生产质量检测方法
CN116818664A (zh) * 2023-06-16 2023-09-29 山东福特尔地毯有限公司 一种基于视觉检测的地毯缺陷检测方法及系统
CN116818664B (zh) * 2023-06-16 2024-03-12 山东福特尔地毯有限公司 一种基于视觉检测的地毯缺陷检测方法及系统
CN116630203A (zh) * 2023-07-19 2023-08-22 科大乾延科技有限公司 集成成像三维显示质量提升方法
CN116630203B (zh) * 2023-07-19 2023-11-07 科大乾延科技有限公司 集成成像三维显示质量提升方法

Also Published As

Publication number Publication date
US20230041573A1 (en) 2023-02-09
CN115115504A (zh) 2022-09-27
US12361594B2 (en) 2025-07-15

Similar Documents

Publication Publication Date Title
WO2022199545A1 (zh) 图像处理方法、装置、计算机设备及存储介质
CN111191532B (zh) 基于施工区域的人脸识别方法、装置、计算机设备
CN109472208B (zh) 基于人脸识别的办证方法、装置、计算机设备及存储介质
CN110598638A (zh) 模型训练方法、人脸性别预测方法、设备及存储介质
WO2021068322A1 (zh) 活体检测模型的训练方法、装置、计算机设备和存储介质
WO2019096029A1 (zh) 活体识别方法、存储介质和计算机设备
US12014498B2 (en) Image enhancement processing method, device, equipment, and medium based on artificial intelligence
WO2019153739A1 (zh) 基于人脸识别的身份认证方法、装置、设备和存储介质
CN106897658A (zh) 人脸活体的鉴别方法和装置
CN110889355B (zh) 一种人脸识别校验方法、系统及存储介质
WO2020238552A1 (zh) 基于微表情识别的审批指令生成方法、装置和计算机设备
CN106859595A (zh) 舌象获取方法、装置和系统
WO2021000832A1 (zh) 匹配人脸的方法、装置、计算机设备和存储介质
US20250232446A1 (en) Image retention and stitching for minimal-flash eye disease diagnosis
US11315360B2 (en) Live facial recognition system and method
CN113505756B (zh) 人脸活体检测方法及装置
KR102784569B1 (ko) 망막 색소 침착을 기반으로 한 플래시 강도의 동적 조정
CN111860372B (zh) 基于人工智能的表情包生成方法、装置、设备及存储介质
WO2019056492A1 (zh) 一种契约调查的处理方法、存储介质和服务器
CN119741751B (zh) 基于人脸识别技术的考生身份验证方法、设备及系统
WO2020237941A1 (zh) 一种基于眼睑特征信息的人员状态检测方法及装置
CN108009534B (zh) 基于瞳孔灰度的活体检测方法
CN120014718A (zh) 一种人脸异常检测方法、装置、设备及存储介质
CN114937244B (zh) 基于边缘计算的考场智能监控方法
CN118247823A (zh) 一种收银系统人脸识别交易管理方法、系统、设备及介质

Legal Events

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

Ref document number: 22774204

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 01.02.2024)

122 Ep: pct application non-entry in european phase

Ref document number: 22774204

Country of ref document: EP

Kind code of ref document: A1