A human face cheek light illumination fine detection method
By combining facial landmark localization and sliding frame detection with morphological operations, the illumination status of the cheek area is refined, solving the problems of long processing time and false judgment in existing technologies, and improving the accuracy and speed of facial recognition.
Patent Information
- Application Number
- CN202211334126.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-10-28
AI Technical Summary
Existing face illumination detection methods are time-consuming and prone to misjudgment due to the inherent attributes of different parts of the face, leading to a decrease in face recognition accuracy.
A facial landmark localization algorithm is used to locate the cheek area. Through sliding frame detection and morphological operations, the illumination status of the cheek area is accurately determined. Thresholding and morphological operations are used to distinguish between bright spots and dark spots. Combined with latent noise point processing, the detection accuracy and speed are improved.
It improves the accuracy and speed of face illumination detection, especially in the cheek area, significantly enhancing the real-time performance and detection efficiency of face recognition.
Smart Images

Figure CN116189253B_ABST
Abstract
Description
[Technical Field]
[0001] This invention relates to the field of facial image processing technology, specifically to a method for refined detection of facial cheek illumination. [Background Technology]
[0002] Biometric identification technology uses a person's physiological and behavioral characteristics to identify them. It is currently the most convenient and secure identification technology. Among them, facial recognition is a biometric identification technology that identifies a person based on facial feature information. Due to its non-contact nature, ease of acquisition, and user-friendliness, it has become one of the most active biometric identification technologies.
[0003] Facial recognition typically compares pre-registered facial features with facial features captured in real-time images. Since real-time captured facial images are inevitably affected by lighting conditions, to improve the accuracy of facial recognition, images with acceptable lighting quality can be selected for facial recognition by pre-classifying and classifying the images based on their lighting conditions.
[0004] Current conventional methods for facial illumination detection and analysis first divide the captured face into segments, then extract the brightness value of each segment and compare it with a set threshold, finally classifying the facial illumination based on the comparison results. This method, which analyzes the entire facial area, is not only time-consuming but also prone to misjudgment due to the inherent attributes of different facial features. For example, the eyebrows, which are typically black, are easily classified as too dark; the eyes, where the iris appears darker and the sclera brighter, are easily classified as having uneven lighting; and the mouth, where lip color and the color of the oral cavity when the mouth is open are both darker, are easily classified as too dark. [Summary of the Invention]
[0005] To address the problems mentioned in the background art, this invention proposes a method for refined detection of facial cheek illumination, comprising the following steps:
[0006] Step S01: Obtain a face image in normal pose, use a face key point localization algorithm to locate key points in the obtained face image, then perform face alignment, and obtain the left cheek region and right cheek region based on the aligned face key points;
[0007] Step S02: Traverse all pixels in the left cheek region and the right cheek region to identify potential noise points. Specifically, if the absolute error between the gray value of a certain pixel and the average gray value of its neighboring pixels exceeds M, then the pixel is identified as a potential noise point and its position information is recorded. After the traversal is completed, the potential noise mask map of the left cheek region and the right cheek region is obtained.
[0008] Step S03: Perform sliding frame detection on the acquired potential noise mask image to determine whether the potential noise point is an actual noise point. Specifically, perform N*N sliding frame processing on the potential noise mask image, that is, take the potential noise point as the center of the N*N sliding frame in turn and count the total number of potential noise points hit by the sliding frame in the current time. Calculate the proportion of the current total number of potential noise points to the sliding frame. If the proportion is less than the threshold T0, then the potential noise point is determined to be an actual noise point, and the gray value of the potential noise point is updated to the gray value of its neighboring pixels.
[0009] Step S04: Compare the gray values of the pixels in the cheek region of the face with thresholds T1 and T2. If the gray value of a pixel is greater than or equal to threshold T1, it is judged as a bright spot. If the gray value of a pixel is less than or equal to threshold T2, it is judged as a dark spot. Count the number and location information of bright spots and dark spots in the left and right cheek regions respectively to obtain the bright spot mask and dark spot mask of the left and right cheek regions.
[0010] Step S05: Perform morphological operations on the bright spot mask and dark spot mask obtained in step S04 to obtain the corresponding bright spot area size and dark spot area size.
[0011] Step S06: Determine the proportion of the bright and dark areas of the left and right cheeks obtained in step S05 to their respective cheek areas. Specifically: if the size of the bright area or the dark area is less than the threshold W1, the proportion of the area is determined to be 0; if the size of the bright area or the dark area is greater than or equal to the threshold W1, the proportion of the area is not 0.
[0012] Step S07: Determine the current lighting status of the cheek area based on the proportion of bright and dark areas obtained in Step S06. The determination rules are as follows:
[0013] The lighting conditions in the area are normal: the percentage of bright spots and dark spots in the area are both 0.
[0014] The area is too dark: the proportion of bright areas in the area is 0 and the proportion of dark areas is not 0;
[0015] Area lighting is too bright: The proportion of bright areas in the area is not 0 and the proportion of dark areas is 0;
[0016] Regional illumination status (yin and yang): The proportion of bright spots and dark spots within the region is not zero.
[0017] Step S08: Based on the lighting conditions of the left and right cheek areas obtained in step S07, determine the attributes of the current facial lighting according to the following rules:
[0018] Normal facial lighting: The lighting conditions of both cheek areas are normal;
[0019] The face is too dark: the lighting on both cheek areas is too dark.
[0020] The face is too brightly lit: The lighting on both cheek areas is too bright.
[0021] Facial lighting yin-yang: The lighting conditions of at least one of the left and right cheek areas are yin-yang or the lighting conditions of the left and right cheek areas are different.
[0022] Furthermore, in step S01, the facial landmark localization algorithm is a facial landmark localization algorithm based on the PFLD facial landmark detection method and obtained through model training of 98 facial landmarks.
[0023] Preferably, in step S02, the neighboring pixel is a neighboring 8 pixels; the absolute error threshold M is obtained through dataset debugging, and its value range is [0-60], with a preferred value of 20.
[0024] Preferably, in step S03, the value of N is an odd number greater than 1, with a preferred value of 5; the threshold T0 is obtained through dataset debugging, with a value range of [0-1], and a preferred value of 0.2.
[0025] Preferably, in step S04, the thresholds T1 and T2 are both empirical values, wherein the value range of T1 is [200-255], with a preferred value of 220, and the value range of T2 is [0-70], with a preferred value of 50.
[0026] Preferably, in step S05, the morphological operation is a closing operation.
[0027] Preferably, in step S06, the threshold W1 has a value range of [0-40], with a preferred value of 20.
[0028] The present invention provides a refined method for detecting facial cheek illumination, which analyzes illumination only for the left and right cheeks, which account for a large proportion of the face. While maintaining detection accuracy, it greatly improves detection speed, has good real-time performance, and has good practical application value. [Attached Image Description]
[0029] Figure 1 This is a flowchart illustrating the refined detection method for facial cheek illumination according to the present invention.
[0030] Figure 2 This is a schematic diagram of 98 key points of the human face as described in an embodiment of the present invention.
[0031] Figure 3 This is a schematic diagram of the 8-neighborhood pixels of pixel P.
Detailed Implementation Methods
[0032] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0033] Example 1:
[0034] This invention provides a method for refined detection of facial cheek illumination, comprising the following steps:
[0035] Step S01: Obtain a face image in normal pose. Using the PFLD (Personal Facial Landmark Detection and Recognition) approach, a 98-point face landmark localization algorithm is obtained through model training. The specific 98 face landmarks are as follows: Figure 2 As shown, the region enclosed by the point set [0~10,76,(66.x,52.y),0] is the left cheek region, and the region enclosed by the point set [20~32,(74.x,52.y),82,20] is the right cheek region;
[0036] Step S02: Traverse all pixels in the left and right cheek regions to identify potential noise points. Specifically, if the absolute error between the grayscale value of a pixel and the average grayscale value of its 8 neighboring pixels exceeds 20, then the pixel is identified as a potential noise point. This pixel is marked as 1 and its position information is recorded. After the traversal is completed, the potential noise mask images of the left and right cheek regions are obtained. A schematic diagram of the 8 neighboring pixels of a certain pixel is shown below. Figure 3 As shown.
[0037] Step S03: Perform sliding frame detection on the acquired potential noise mask images to determine whether potential noise points are actual noise points. Specifically, take potential noise points as the center of a 5*5 sliding frame and count the total number of potential noise points hit by the sliding frame. Calculate the proportion of the current total number of potential noise points to the sliding frame. If the proportion is less than the threshold of 0.2, then determine that the potential noise point is an actual noise point and update the gray value of the potential noise point to the gray value of its neighboring pixels.
[0038] Step S04: Compare the gray values of the pixels in the cheek region obtained in the above steps with the empirical threshold. If the gray value of a pixel is greater than or equal to the threshold of 220, it is judged as a bright spot. If the gray value of a pixel is less than or equal to the threshold of 50, it is judged as a dark spot. Count the number and location information of bright spots and dark spots in the left and right cheek regions respectively to obtain the left cheek bright spot mask LL, the left cheek dark spot mask LS, the right cheek bright spot mask RL, and the right cheek dark spot mask RS.
[0039] Step S05: Perform morphological closing operation on each mask image obtained in step S04 to obtain the bright spot area size A1 corresponding to the bright spot mask image LL of the left cheek, the dark spot area size A2 corresponding to the dark spot mask image LS of the left cheek, the bright spot area size A3 corresponding to the bright spot mask image RL of the right cheek, and the dark spot area size A4 corresponding to the dark spot mask image RS of the right cheek.
[0040] Step S06: Determine the proportion of the bright spot areas A1 and A3 and the dark spot areas A2 and A4 to their respective cheek areas, specifically:
[0041] If A1 or A3 is less than the threshold of 20, then the proportion of bright spots in the corresponding cheek area L1 or L3 is determined to be 0; if A1 or A3 is greater than or equal to the threshold of 20, then the proportion of bright spots in the corresponding cheek area L1 or L3 is determined to be not 0.
[0042] If A2 or A4 is less than the threshold of 20, then the proportion of dark spots in the corresponding cheek area L2 or L4 is determined to be 0; if A2 or A4 is greater than or equal to the threshold of 20, then the proportion of dark spots in the corresponding cheek area L2 or L4 is determined to be not 0.
[0043] Step S07: Determine the lighting conditions of the left and right cheek areas based on the proportions of bright and dark areas obtained in Step S06. The specific rules are as follows:
[0044] Left cheek is normal: L1 is 0 and L2 is 0;
[0045] Right cheek is normal: L3 is 0 and L4 is 0;
[0046] The left cheek is too dark: L1 is 0 and L2 is not 0;
[0047] Dark right cheek: L3 is 0 and L4 is not 0;
[0048] The left cheek is too bright: L1 is not 0 and L2 is 0;
[0049] The right cheek is too bright: L3 is not 0 and L4 is 0;
[0050] Yin and Yang of the left cheek: L1 is not 0 and L2 is not 0;
[0051] Yin and Yang of the right cheek: L3 is not 0 and L4 is not 0;
[0052] Step S08: Based on the lighting conditions of the left and right cheek areas obtained in Step S07, determine the attributes of the current facial lighting according to the following rules:
[0053] Normal: The lighting conditions on both cheek areas are normal;
[0054] Too dark: The lighting on both cheek areas is too dark;
[0055] Too bright: The lighting on both cheek areas is too bright;
[0056] Yin-Yang Face: At least one of the left and right cheek areas is yin-yang, or the left cheek is normal but the right cheek is too dark or too bright, or the left cheek is too dark but the right cheek is normal or too bright, or the left cheek is too bright but the right cheek is normal or too dark.
[0057] It should be emphasized that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention shall still fall within the scope of the technical solution of the present invention.
[0058] To verify the performance of the present invention, a test database was constructed using self-acquired images and the open dataset DeepGlint. The specific composition of various images in the dataset is shown in Table 1. Based on the test dataset in Table 1, the experimental results of the conventional method described in the background art and the embodiment of the present invention are shown in Table 2.
[0059] Table 1
[0060] Test dataset normal Too dark Too bright Yin-Yang face total DeepGlint 587 796 605 823 2811 Self-collected 1000 1000 1000 1000 4000
[0061] Table 2
[0062] algorithm normal Too dark Too bright Yin-Yang face average speed conventional methods 95.02% 98.27% 92.15% 82.06% 125ms Example 1 Scheme 98.68% 100% 96.45% 93.75% 32ms
[0063] As can be seen from Table 2, for the same test data, the detection accuracy and processing speed of the solution in this embodiment of the invention are significantly improved compared with conventional methods. It is evident that the performance of the solution in this embodiment of the invention is far superior to that of conventional methods.
Claims
1. A method for refined detection of facial cheek illumination, characterized in that, Includes the following steps: Step S01: Obtain a face image in normal pose, use a face key point localization algorithm to locate key points in the obtained face image, then perform face alignment, and obtain the left cheek region and right cheek region based on the aligned face key points; Step S02: Traverse all pixels in the left cheek region and the right cheek region to identify potential noise points and record their position information. After traversal, obtain the potential noise mask map of the left cheek region and the right cheek region. Step S03: Perform sliding frame detection on the acquired potential noise mask image to determine whether the potential noise point is an actual noise point. If the current potential noise point is determined to be an actual noise point, update the gray value of this potential noise point to the gray value of its neighboring pixels. Step S04: Compare the gray values of the pixels in the cheek region of the face with thresholds T1 and T2. If the gray value of the pixel is greater than or equal to the threshold T1, it is judged as a bright spot. If the gray value of the pixel is less than or equal to the threshold T2, it is judged as a dark spot. Count the number and position information of bright spots and dark spots in the left and right cheek regions respectively to obtain the bright spot mask and dark spot mask of the left and right cheek regions. Step S05: Perform morphological operations on the bright spot mask and dark spot mask obtained in step S04 to obtain the corresponding bright spot region size and dark spot region size; Step S06: Determine the proportion of the bright and dark areas of the left and right cheeks obtained in step S05 to their respective cheek areas. Specifically: if the size of the bright area or the dark area is less than the threshold W1, the proportion of the area is determined to be 0; if the size of the bright area or the dark area is greater than or equal to the threshold W1, the proportion of the area is not 0. Step S07: Determine the current lighting status of the cheek area based on the proportion of bright and dark areas obtained in step S06; Step S08: Determine the attributes of the current facial lighting based on the lighting status of the left and right cheek areas obtained in step S07; The method for determining potential noise points in step S02 is that if the absolute error between the gray value of the current pixel and the average gray value of its neighboring pixels exceeds M, it is determined to be a potential noise point. The specific method for determining the actual noise point in step S03 is to perform N*N sliding box processing on the potential noise mask image, that is, to take the potential noise point as the center of the N*N sliding box in turn and count the total number of potential noise points hit by the sliding box at the current time, calculate the proportion of the current total number of potential noise points to the sliding box, and if the proportion is less than the threshold T0, then the potential noise point is determined to be an actual noise point. The specific rules for determining the lighting status of the current cheek area in step S07 are as follows: Normal: The percentage of bright spots and dark spots within the area is both 0. Too dark: The proportion of bright areas within the region is 0 and the proportion of dark areas is not 0; Too bright: When the proportion of bright areas within the region is not 0 and the proportion of dark areas is 0; Yin and Yang: The proportion of bright spots and dark spots within the area is not zero; The rules for determining the facial lighting attributes in step S08 are as follows: Normal: The lighting conditions on both cheek areas are normal; Too dark: The lighting on both cheek areas is too dark; Too bright: The lighting on both cheek areas is too bright; Yin-Yang: The lighting conditions of at least one of the left and right cheek areas are yin-yang or the lighting conditions of the left and right cheek areas are different.
2. The method for refined detection of facial cheek illumination as described in claim 1, characterized in that, The neighboring pixel is 8 pixels in the neighborhood; the absolute error threshold M is obtained through dataset debugging and has a value range of [0-60].
3. The method for refined detection of facial cheek illumination as described in claim 1 or 2, characterized in that, The preferred value for the absolute error threshold M is 20.
4. The method for refined detection of facial cheek illumination as described in claim 1, characterized in that, The value of N is an odd number greater than 1; the threshold T0 is obtained through dataset debugging and has a value range of [0-1].
5. The method for refined detection of facial cheek illumination as described in claim 1 or 4, characterized in that, The preferred value for N is 5, and the preferred value for the threshold T0 is 0.
2.
6. The method for refined detection of facial cheek illumination as described in claim 1, characterized in that, Both thresholds T1 and T2 are empirical values, with T1 ranging from [200-255] and T2 ranging from [0-70].
7. The method for refined detection of facial cheek illumination as described in claim 1 or 6, characterized in that, The preferred value for the threshold T1 is 220, and the preferred value for T2 is 50.
8. The method for refined detection of facial cheek illumination as described in claim 1, characterized in that, The morphological operation is a closing operation.
9. The method for refined detection of facial cheek illumination as described in claim 1, characterized in that, The threshold W1 has a value range of [0-40].
10. The method for refined detection of facial cheek illumination as described in claim 1 or 9, characterized in that, The preferred value for the threshold W1 is 20.
Citation Information
Patent Citations
Face image quality evaluation method and device
CN112528939A
Human face sensitive area detection method
CN112613459A