Search

CN-113628181-B - Image processing method, device, electronic equipment and storage medium

CN113628181BCN 113628181 BCN113628181 BCN 113628181BCN-113628181-B

Abstract

The application provides an image processing method, an image processing device, electronic equipment, a computer readable storage medium and a computer program product, wherein the method comprises the steps of identifying a face area in an image to be processed, wherein the image to be processed is obtained by image acquisition of a certificate, determining the certificate area in the image to be processed according to the relative position and the proportion between the face area and the certificate area, wherein the certificate area comprises the face area, segmenting the image to be processed according to the certificate area to obtain a certificate image, obtaining characteristics of the certificate image, and performing quality detection processing based on the characteristics of the certificate image to obtain a detection result representing whether the certificate image is qualified or not. The application can accurately extract the qualified certificate image from the acquired image.

Inventors

  • ZHENG LIQUN

Assignees

  • 深圳前海微众银行股份有限公司

Dates

Publication Date
20260512
Application Date
20210802

Claims (10)

  1. 1. An image processing method, the method comprising: Identifying a face area in an image to be processed, wherein the image to be processed is obtained by image acquisition of a certificate; determining the certificate area in the image to be processed according to the relative position and the proportion between the face area and the certificate area, wherein the certificate area comprises the face area; Dividing the image to be processed according to the certificate area to obtain a certificate image; Acquiring characteristics of the certificate image, and performing quality detection processing based on the characteristics of the certificate image to obtain a detection result representing whether the certificate image is qualified or not; Before determining the document region in the image to be processed according to the relative position and the proportion between the face region and the document region, the method further comprises: performing certificate type identification processing on the image to be processed to obtain the type of the certificate in the image to be processed; Inquiring a mapping table according to the types to obtain the relative positions and proportions between the face areas and the certificate areas in the images to be processed, wherein the mapping table comprises the relative positions and proportions between the face areas and the certificate areas in the certificate images of different types; The relative position between the face region and the credential region comprises a relative position between a first center point of the face region and a second center point of the credential region, and the ratio between the face region and the credential region comprises a first ratio of the widths of the face region and the credential region and a second ratio of the heights of the face region and the credential region; The step of determining the certificate area in the image to be processed according to the relative position and the proportion between the face area and the certificate area comprises the following steps: Moving the first center point of the face area to the second center point of the certificate area according to the relative position between the first center point of the face area and the second center point of the certificate area; and extending the width of the face area according to the first proportion by taking the second center point of the certificate area as a reference, and extending the height of the face area according to the second proportion to obtain the certificate area.
  2. 2. The method of claim 1, wherein the quality inspection comprises integrity inspection, wherein the acquiring the characteristics of the document image, and wherein the performing the quality inspection process based on the characteristics of the document image, results in an inspection that characterizes whether the document image is acceptable, comprises: acquiring content characteristics of the certificate image; Carrying out integrity classification processing on the certificate image based on the content characteristics of the certificate image to obtain an integrity classification detection result; when the integrity classification detection result represents that the certificate image is a complete image, determining that the certificate image is a qualified image; and when the integrity classification detection result represents that the certificate image is an incomplete image, determining that the certificate image is an unqualified image.
  3. 3. The method of claim 2, wherein the content characteristics of the document image include a number of keywords, location information, and a document type; the step of carrying out integrity classification processing on the certificate image based on the content characteristics to obtain a classification detection result comprises the following steps: Acquiring a certificate type rule corresponding to the certificate type; And classifying the certificate images according to the certificate type rules and the acquired number and position information of the keywords to obtain classification detection results, wherein the certificate type rules comprise the number and position information of the keywords corresponding to different certificate types.
  4. 4. The method of claim 1, wherein the quality inspection comprises a copy inspection; The obtaining the characteristics of the certificate image, and carrying out quality detection processing based on the characteristics of the certificate image to obtain a detection result representing whether the certificate image is qualified or not, comprising the following steps: acquiring texture characteristics of the certificate image; Invoking a classification model based on the texture features to perform copy classification processing on the certificate image to obtain a copy classification detection result; When the copy classification detection result represents that the certificate image is a non-copy image, determining that the certificate image is a qualified image; and when the copy classification detection result indicates that the certificate image is a copy image, determining that the certificate image is a disqualified image.
  5. 5. The method of claim 1, wherein the quality detection comprises a sharpness detection; The obtaining the characteristics of the certificate image, and carrying out quality detection processing based on the characteristics of the certificate image to obtain a detection result representing whether the certificate image is qualified or not, comprising the following steps: acquiring visual characteristics of the certificate image, wherein the visual characteristics comprise at least one of color information and brightness; Determining a certificate image based on the visual characteristics to perform definition detection to obtain a definition detection result; when the definition detection result represents that the certificate image is a clear image, determining that the certificate image is a qualified image; And when the definition detection result represents that the certificate image is a non-definition image, determining that the certificate image is a disqualified image.
  6. 6. The method of claim 1, wherein prior to identifying the face region in the image to be processed, the method further comprises: carrying out image acquisition processing on the certificate at different angles to obtain a plurality of images to be processed comprising the certificate; acquiring image characteristics of anti-counterfeiting marks in each image to be processed; performing counterfeit certificate classification treatment on the image to be processed according to the image characteristics of the anti-counterfeit mark to obtain a counterfeit certificate classification result; When the forged certificate classification result characterizes that the certificate is not a forged certificate, it is determined that a process of recognizing a face area in any one of the images to be processed is to be performed.
  7. 7. An image processing apparatus for implementing the method of any one of claims 1 to 6, the apparatus comprising: the image recognition module is used for recognizing a face area in an image to be processed, wherein the image to be processed is obtained by image acquisition of a certificate; The image detection module is used for determining the certificate area in the image to be processed according to the relative position and the proportion between the face area and the certificate area, wherein the certificate area comprises the face area; the image segmentation module is used for carrying out segmentation processing on the image to be processed according to the certificate area to obtain a certificate image; And the image quality detection module is used for acquiring the characteristics of the certificate image, and carrying out quality detection processing based on the characteristics of the certificate image to obtain a detection result for representing whether the certificate image is qualified or not.
  8. 8. An electronic device, the electronic device comprising: a memory for storing executable instructions; A processor for implementing the image processing method of any one of claims 1 to 6 when executing executable instructions stored in said memory.
  9. 9. A computer-readable storage medium, characterized in that executable instructions are stored for implementing the image processing method according to any one of claims 1 to 6 when executed by a processor.
  10. 10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the image processing method of any of claims 1 to 6.

Description

Image processing method, device, electronic equipment and storage medium Technical Field The present application relates to image processing technology, and in particular, to an image processing method, an image processing device, an electronic device, and a computer readable storage medium. Background Image recognition technology is an important area of artificial intelligence. It refers to a technique of performing object recognition on an image to recognize objects and objects of various modes. At present, the image recognition technology is mature, and is widely applied to aspects of faces, other objects and the like. In the scenes such as bank account opening, subpoena photos need to be scanned, originals are required to be photographed, at the moment, the mobile phone is provided with front-end guiding detection, whether the mobile phone is located in a photo area or not is judged, whether an identity card is complete or not is judged, and a certificate image meeting the requirements is obtained. In the related art, based on the traditional edge detection algorithm, the background interference of the photo is large, the effect is very unstable, the parameters are difficult to adjust, the certificate type cannot be identified, quality detection is not performed, such as copying, integrity and the like, the efficiency is low due to the fact that an unsuitable certificate image is easily acquired, and the high-fidelity qualified image shot by the high-refresh-rate and high-resolution imaging equipment is still difficult to accurately distinguish. Disclosure of Invention Embodiments of the present application provide an image processing method, apparatus, electronic device, computer-readable storage medium, and computer program product, capable of accurately extracting a qualified document image from an acquired image. The technical scheme of the embodiment of the application is realized as follows: the embodiment of the application provides an image processing method, which comprises the following steps: Identifying a face area in an image to be processed, wherein the image to be processed is obtained by image acquisition of a certificate; determining a certificate area in the image to be processed according to the relative position and the proportion between the face area and the certificate area, wherein the certificate area comprises the face area; Dividing the image to be processed according to the certificate area to obtain a certificate image; And acquiring the characteristics of the certificate image, and performing quality detection processing based on the characteristics of the certificate image to obtain a detection result representing whether the certificate image is qualified or not. An embodiment of the present application provides an image processing apparatus including: the image recognition module is used for recognizing a face area in an image to be processed, wherein the image to be processed is obtained by image acquisition of a certificate; The image detection module is used for determining a certificate area in the image to be processed according to the relative position and the proportion between the face area and a preset certificate area, wherein the certificate area comprises the face area; the image segmentation module is used for carrying out segmentation processing on the image to be processed according to the certificate area to obtain a certificate image; And the image quality detection module is used for acquiring the characteristics of the certificate image, and carrying out quality detection processing based on the characteristics of the certificate image to obtain a detection result for representing whether the certificate image is qualified or not. In the scheme, the device further comprises a certificate type identification module which is used for carrying out certificate type identification processing on the image to be processed to obtain the type of the certificate in the image to be processed, and a mapping table is inquired according to the type to obtain the relative positions and the proportions of the face area and the certificate area in the image to be processed, wherein the mapping table comprises the relative positions and the proportions of the face area and the certificate area in the certificate images of different types. In the above scheme, the relative position between the face area and the certificate area comprises the relative position between a first center point of the face area and a second center point of the certificate area, the ratio between the face area and the certificate area comprises a first ratio of the width of the face area to the width of the certificate area and a second ratio of the height of the face area to the height of the certificate area, and the type identification module is further used for moving the first center point of the face area to the second center point of the certificate area according to the relative position