CN-121170866-B - Eyebrow shielding detection method based on image analysis and color characteristics
Abstract
The invention discloses an eyebrow shielding detection algorithm based on image analysis and color characteristics, which belongs to the technical field of image processing and is mainly used for detecting whether eyebrows in a certificate photo image are shielded or not. The algorithm firstly carries out preprocessing on an input image, and specifically carries out face detection and key point detection operation, so as to obtain a face key point set. And generating a facial mask map based on the set, simultaneously executing portrait analysis to obtain a portrait analysis mask map, and defining an eyebrow shielding judgment value. And then judging whether the intersection exists between the hair and the eyebrow area based on the generated result so as to primarily identify whether the eyebrow is shielded, calculating the circumscribed rectangle of the eyebrow based on the key points, and checking the proportion of the hair pixels so as to judge whether the eyebrow is not shielded at all. If the judgment is not completed, converting the color space, extracting the fine mask through clustering, calculating the color difference between the eyebrows and the peripheral area, and further evaluating the shielding condition of the eyebrows.
Inventors
- CHEN SUQI
- HUANG WANTING
- ZENG FAN
- FAN ZHIHONG
- GU JING
Assignees
- 广州像素数据技术股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20250903
Claims (8)
- 1. An eyebrow shielding detection method based on image analysis and color characteristics is characterized by comprising the following steps: Preprocessing an input image to obtain a face key point set, a face five sense organs mask and a portrait analysis mask, and primarily defining an eyebrow shielding judgment value; Judging whether obvious shielding exists or not based on the facial mask map and the portrait analysis mask map, and if so, determining an eyebrow shielding score; judging whether the eyebrows are completely not shielded or not based on the face key point set and the image analysis mask diagram, and determining an eyebrow shielding score if the eyebrows are completely not shielded; Initializing the eyebrow shielding judgment value to be 0, updating the eyebrow shielding judgment value to be 1 when obvious shielding exists, updating the eyebrow shielding judgment value to be 1 when the eyebrow is judged to be completely not shielded, and converting an input image to a target color space to obtain a processed image if the eyebrow shielding judgment value is unchanged after the judgment; Extracting a fine eyebrow mask on the processed image; Generating an eyebrow peripheral area mask map based on the face key point set, and processing the eyebrow peripheral area mask map to obtain a fine eyebrow peripheral area mask map; The method comprises the steps of determining an effective area of an eyebrow on a processed image based on a fine eyebrow mask, calculating histogram information of the effective area of the eyebrow in three channels of a target color space, calculating average values of the three channels based on the histogram information, combining to form a first color feature vector, determining a peripheral effective area on the processed image based on a fine eyebrow peripheral area mask map, calculating the histogram information of the peripheral effective area in the three channels of the target color space, calculating average values of the three channels based on the histogram information, combining to form a second color feature vector, calculating difference values of the first color feature vector and the second color feature vector by adopting a preset color difference formula to obtain a single-side eyebrow color difference value, executing the same operation on the other side eyebrow to obtain another side eyebrow color difference value, selecting smaller values of the two side eyebrow color difference values, determining the smaller values as the eyebrow shielding score, and quantitatively evaluating whether the eyebrow shielding score meets the use standard; wherein, the processing the mask map of the peripheral area of the eyebrow to obtain the mask map of the peripheral area of the fine eyebrow includes: mask patterns of the peripheral areas of the eyebrows corresponding to the left eyebrow and the right eyebrow are divided into a left sub mask and a right sub mask along the vertical central line of the corresponding mask patterns; extracting effective areas of the left side sub-mask and the right side sub-mask on the processed image, respectively; Calculating the histogram information of the brightness channels of the two effective areas in the target color space; respectively calculating the brightness average value of the two effective areas based on the histogram information; and determining the sub-mask with smaller brightness average value as the mask map of the fine eyebrow peripheral area.
- 2. An eyebrow occlusion detection method based on image analysis and color features as claimed in claim 1, wherein the preprocessing of the input image comprises: performing face detection on the input image to obtain a face detection frame; Based on the face detection frame, face key point detection is carried out on an input image, and the face key point set is obtained; Screening point sets corresponding to five sense organs from the face key point sets, and dividing contour point sets of different positions; drawing corresponding convex polygons based on the contour point sets respectively, giving exclusive labels to different convex polygons, and generating the facial five-sense organ mask; And executing portrait analysis processing on the input image to obtain the portrait analysis mask diagram marking a plurality of semantic categories.
- 3. The method for detecting eyebrow occlusion based on image analysis and color features as claimed in claim 2, wherein the screening the point set of the corresponding five sense organs from the face key point set comprises: extracting point sets corresponding to left and right eyebrows from the face key point set, and determining the point sets as eyebrow outline point sets; and extracting point sets corresponding to other five sense organs, and taking the point sets as outline point sets of the other five sense organs.
- 4. The method for detecting eyebrow occlusion based on image analysis and color features as claimed in claim 1, wherein the determining whether there is a clear occlusion based on the facial mask and the facial mask comprises: extracting an eyebrow area from the facial mask layout; Extracting a hair region from the portrait parsing mask drawing; calculating an intersection of the eyebrow area and the hair area; If the proportion of the intersection area to the total area of the eyebrow area exceeds a first preset threshold, judging that obvious shielding exists; and setting the eyebrow shielding score to 0, and updating the eyebrow shielding judgment value to 1.
- 5. The method for detecting eyebrow occlusion based on image analysis and color features as claimed in claim 1, wherein the determining whether the eyebrow is not occluded at all based on the face key point set and the portrait analysis mask map comprises: determining an external rectangle of the eyebrow area according to the eyebrow outline point set of the face key point set; extracting an eyebrow area analysis mask map of a corresponding area from the portrait analysis mask map based on the circumscribed rectangle; counting the number of pixels belonging to the hair category in the eyebrow area analysis mask diagram; Calculating the proportion of the pixel number to the total pixel number of the eyebrow area analysis mask image; If the ratio does not exceed the second preset threshold, judging that the eyebrows are not shielded completely; and setting the eyebrow shielding score to be 1, and updating the eyebrow shielding judgment value to be 1.
- 6. The method for detecting eyebrow occlusion based on image analysis and color features as claimed in claim 1, wherein the converting the input image to the target color space comprises: The input image is converted from a first color space to a second color space resulting in the processed image.
- 7. An eyebrow occlusion detection method based on image analysis and color features as claimed in claim 1, wherein the extracting of fine eyebrow mask on the processed image comprises: Selecting an eyebrow region on the processed image based on the eyebrow convex polygon in the facial five sense organs mask; extracting color features from all pixel points of the eyebrow area; executing a clustering algorithm on the color features, and dividing the pixel points into two types; respectively calculating the average value of brightness channels of the two types of pixel points in a target color space; determining a class with smaller average value of the brightness channels as a target eyebrow pixel; The fine eyebrow mask is generated based on the positional information of the target eyebrow pixels.
- 8. The method for detecting eyebrow occlusion based on image analysis and color features as claimed in claim 1, wherein the generating an eyebrow peripheral area mask map based on the face key point set comprises: extracting left and right eyebrow outline point sets from the face key point set; respectively calculating center points of the outer contour point sets of the left and right eyebrows; expanding the outer contour point sets of the left and right eyebrows to the outside by a preset distance by taking the central point as a reference; Drawing a peripheral region based on the expanded point set, and generating an initial peripheral region mask; Comparing the initial peripheral area mask with the eyebrow area of the facial mask, and removing the overlapped part; and performing downward expansion operation on the mask after the overlapping part is removed, and obtaining the mask map of the eyebrow peripheral area.
Description
Eyebrow shielding detection method based on image analysis and color characteristics Technical Field The invention relates to the technical field of image processing, in particular to an eyebrow shielding detection method based on image analysis and color characteristics. Background With the continuous progress of image processing technology, its application in fields such as document photography becomes increasingly important. The credentials photo refers to the official photo used on various credentials, such as identity card, passport, driving license, student's card, etc. The related certification department has clear requirements for displaying the face features of individuals, and the eyebrows are one of important features of the faces, so that the accurate detection of whether the eyebrow areas are blocked has a key meaning for taking photos meeting the requirements of certification. The traditional eyebrow shielding detection method has some defects in detection accuracy, efficiency and adaptability, especially when complex scenes or detailed features are processed. Although the color clustering method can primarily distinguish between the hair area and the skin area, the accuracy of color clustering may be affected when facing a complicated background color or a special color (such as dyeing), and the eyebrow and the hair area may not be accurately separated, thereby affecting the accuracy of the occlusion judgment. In addition, the conventional method relies on facial key points for locating and analyzing the eyebrow area. However, when the face shielding is serious or the key point detection is inaccurate, the whole eyebrow shielding detection flow is easily disturbed, resulting in reduced reliability of the detection result. Disclosure of Invention The invention aims to provide an eyebrow shielding detection method based on image analysis and color characteristics, which is used for solving the problem of misjudgment possibly generated when the boundary between eyebrows and hairs is fuzzy or other interference objects are processed by the traditional eyebrow shielding detection algorithm, and reducing the dependence on facial key points. In order to achieve the above purpose, the present invention provides the following technical solutions: In a first aspect, the present invention provides an eyebrow occlusion detection method based on image analysis and color characteristics, including the steps of: Preprocessing an input image to obtain a face key point set, a face five sense organs mask and a portrait analysis mask, and primarily defining an eyebrow shielding judgment value; Judging whether obvious shielding exists or not based on the facial mask map and the portrait analysis mask map, and if so, determining an eyebrow shielding score; judging whether the eyebrows are completely not shielded or not based on the face key point set and the image analysis mask diagram, and determining an eyebrow shielding score if the eyebrows are completely not shielded; If the eyebrow shielding judging value is unchanged after the judgment, converting the input image into a target color space to obtain a processed image; Extracting a fine eyebrow mask on the processed image; Generating an eyebrow peripheral area mask map based on the face key point set, and processing the eyebrow peripheral area mask map to obtain a fine eyebrow peripheral area mask map; Based on the fine eyebrow mask and the fine eyebrow peripheral area mask map, color differences are calculated to determine an eyebrow occlusion score for quantitatively evaluating whether a credential photo meets usage criteria. In one possible implementation, the preprocessing the input image includes: performing face detection on the input image to obtain a face detection frame; Based on the face detection frame, face key point detection is carried out on an input image, and the face key point set is obtained; Screening point sets corresponding to five sense organs from the face key point sets, and dividing contour point sets of different positions; drawing corresponding convex polygons based on the contour point sets respectively, giving exclusive labels to different convex polygons, and generating the facial five-sense organ mask; performing portrait analysis processing on the input image to obtain the portrait analysis mask diagram marking a plurality of semantic categories; initializing the eyebrow occlusion judgment value and setting the value to 0. In one possible implementation manner, the screening the point set corresponding to the five sense organs from the face key point set includes: extracting point sets corresponding to left and right eyebrows from the face key point set, and determining the point sets as eyebrow outline point sets; and extracting point sets corresponding to other five sense organs, and taking the point sets as outline point sets of the other five sense organs. In one possible implementation manner, the determining whether the