An identity recognition method and system based on image processing
By using convolutional neural networks and dynamically adjusting the parameters of Retinex and CLAHE algorithms, the problem of facial image recognition under abnormal lighting and local degradation was solved, achieving accurate image enhancement and identity recognition under different lighting conditions.
Patent Information
- Application Number
- CN202511554691.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-10-29
AI Technical Summary
In existing technologies, facial image-based identity recognition methods are ineffective in cases of abnormal lighting and degradation of key local areas. Furthermore, existing lighting compensation methods cannot adapt to different facial structures or semantic differences in scenes, leading to local over-enhancement or loss of detail.
A convolutional neural network is used for lighting anomaly classification. Combined with the distribution of facial regions, the parameters of the Retinex and CLAHE algorithms are dynamically adjusted to perform image enhancement processing for low-light and overexposed scenes, accurately adapting to facial structure and preserving key details.
It achieves accurate adaptation of facial structure under different lighting conditions, preserves key details in lighting restoration, and improves the accuracy and reliability of identity recognition.
Smart Images

Figure CN121033919B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to an identity recognition method and system based on image processing. BACKGROUND
[0002] Traditional identity authentication methods such as passwords, IC cards, etc. have defects such as easy to forget, easy to lose, and easy to copy, while image processing identity recognition based on biological characteristics has become mainstream due to its uniqueness and convenience. Among them, identity recognition based on face image processing is widely used due to its non-contact and easy-to-collect characteristics.
[0003] In the prior art, the pre-screening technology for face images relies on global indicators such as resolution and blur of the entire image, which can easily miss images that are overall qualified but have degraded key areas.
[0004] Meanwhile, when performing identity recognition on face images, abnormal lighting can directly cause subsequent feature extraction to fail. Existing Retinex, CLAHE, and other lighting compensation methods are mostly global or local fixed parameter processing, which cannot adapt to differences in different face structures or indoor warm light / outdoor cold light scene semantics, and are prone to local over-enhancement or detail loss problems. SUMMARY
[0005] To solve the above technical problems, the present application provides an identity recognition method and system based on image processing to solve the problems in the prior art.
[0006] The present application provides an identity recognition method based on image processing, comprising the following steps:
[0007] S1: collecting a face image of a person to be identified;
[0008] S2: performing image pre-screening on the face image to filter out unqualified images;
[0009] S3: performing image enhancement processing on the pre-screened face image;
[0010] S3 is specifically: S3.1: classifying the lighting abnormality type of the face image, the lighting abnormality type being divided into low light scene and overexposure scene; a convolutional neural network model is used to realize the lighting abnormality classification of the face image, the input of the convolutional neural network model being the face image and the output being the lighting abnormality type; S3.2: for different lighting abnormality types, combining the regional distribution of the face image, performing image enhancement processing on the pre-screened face image;
[0011] Specifically, S3.2 involves: for low-light scenes, using the Retinex algorithm guided by face region distribution to enhance the pre-screened face image; for overexposed scenes, adjusting the cliplimit parameter of the CLAHE algorithm by sensing the gradient features of highlight areas and key texture areas to enhance the pre-screened face image; dividing the pre-screened face image into a highlight-sensitive area and a texture-carrying area; the highlight-sensitive area includes a triangular area connecting the tip of the nose to the inner corners of the eyes and a rectangular area from the hairline to the brow bone; the texture-carrying area includes the eye area and the cheek area.
[0012] S4: Input the face image after image enhancement into the identity recognition model to obtain the identity recognition result.
[0013] Preferably, the Retinex algorithm guided by face region distribution is used to perform image enhancement processing on the pre-screened face images; specifically:
[0014] The pre-screened face image is divided into three face regions: the eye region, the cheek region, and the other region.
[0015] Different filter scales are assigned to the eye region and the cheek region, and illumination map estimation is performed;
[0016] Calculate the reflection components of the binocular region and the cheek region separately;
[0017] Perform eye area reflex stretching and cheek area reflex stretching;
[0018] The processed binocular region reflection components are fused with the binocular region illumination map to obtain an enhanced local image of the binocular region; the processed cheek region reflection components are fused with the cheek region illumination map to obtain an enhanced local image of the cheek region.
[0019] The enhanced local images of the eyes and cheeks are seamlessly stitched together with the original images of other regions using Poisson fusion, and the overall color is adjusted using a white balance algorithm.
[0020] Preferably, the image enhancement process for the pre-screened face image is achieved by specifically adjusting the cliplimit parameter of the CLAHE algorithm by sensing the gradient features of the highlight region and the key texture region:
[0021] Dynamic CLAHE parameters were adjusted for the highlight-sensitive area and the texture-bearing area respectively.
[0022] For the high-light sensitive region, the high-light sensitive region is divided into several local blocks. If the local gradient mean G of the local blocks is... meanIf the local gradient mean threshold is less than the threshold, it is determined to be a highlight overflow area. The cliplimit of the CLAHE algorithm is set to the first value. Otherwise, the cliplimit of the CLAHE algorithm is set to the second value. If the first value is greater than the second value, all the local blocks are processed. For local blocks in the highlight sensitive area where the gray level is greater than the gray level threshold, additional brightness remapping processing is used to suppress the overflow.
[0023] For the texture carrying region, the texture carrying region is divided into several local blocks. If the local gradient mean G mean The second local gradient mean threshold is used to determine the region as a detail-carrying area. If the cliplimit of CLAHE is set to the third value, otherwise, the cliplimit of CLAHE is set to the fourth value. If the third value is greater than the fourth value, all the local blocks are processed.
[0024] The processed highlight-sensitive area and texture-bearing area are fused and stitched together to achieve image enhancement processing of the pre-screened face image.
[0025] Preferably, different filtering scales are assigned to the eye region and the cheek region, and illumination map estimation is performed as follows:
[0026] For the eye area, a small-scale Gaussian kernel is used for filtering; for the cheek area, a medium-scale Gaussian kernel is used for filtering.
[0027] The specific formula is as follows: ;
[0028] In the formula, This is a lighting map of both eyes. For the binocular region Gaussian kernel function, The image consists of the double eye regions of the pre-screened face image. This is a lighting diagram of the cheek area. The Gaussian kernel function for the cheek region. The cheek area image is the re-selected face image after pre-screening.
[0029] Preferably, the formula for calculating the reflection components of the binocular region and the cheek region is:
[0030] ;
[0031] ;
[0032] In the formula, For the reflection components of the binocular regions, This represents the reflection component of the cheek area.
[0033] Preferably, S2 specifically comprises:
[0034] S2.1: Divide the face image into several key sub-regions;
[0035] S2.2: For each sub-region, calculate the calculated value of the quality evaluation index for that sub-region;
[0036] S2.3: Set dynamic weights for each quality evaluation indicator according to the application scenario requirements of the identity recognition;
[0037] S2.4: Calculate the processing potential score of each sub-region based on the calculated value of the quality evaluation index and the corresponding weight;
[0038] S2.5: Calculate the processing potential score of the face image based on the processing potential score of each sub-region;
[0039] S2.6: Determine whether the face image is an unqualified image based on its processing potential, and perform a filtering operation on the unqualified image.
[0040] Preferably, in S2.1, the several key sub-regions are: the eye area, the nose area, the mouth area, the forehead area, and the jaw area.
[0041] Preferably, in step S2.2, the quality evaluation indicators of the sub-region include microscopic clarity, texture richness, noise interference, and occlusion risk.
[0042] Preferably, S2.3 specifically includes:
[0043] Establish application scenario requirement vectors;
[0044] A lightweight neural network model is used to map the scenario requirement vector to the weight of each quality evaluation index.
[0045] According to another aspect of the present invention, an image processing-based identity recognition system is provided, the system employing the above-described image processing-based identity recognition method, the system comprising:
[0046] The image acquisition module is used to acquire facial images of the person to be identified;
[0047] The image pre-screening module is used to pre-screen the face images and filter out unqualified images.
[0048] The image enhancement module is used to perform image enhancement processing on the pre-screened face images;
[0049] The identity recognition module is used to input the face image after image enhancement processing into the identity recognition model to obtain the identity recognition result.
[0050] The embodiments of the present invention have the following technical effects:
[0051] This invention performs image illumination compensation on the acquired images during identity recognition, employing a closed-loop process of semantic perception, type classification, and pattern-based compensation fusion. Type classification categorizes images into low-light and overexposed scenes. For low-light scenes, the Retinex algorithm, guided by face region distribution, is used to enhance the pre-screened face images. For overexposed scenes, the cliplimit parameter of the CLAHE algorithm is adjusted specifically by sensing the gradient features of highlight areas and key texture areas to enhance the pre-screened face images. This achieves accurate illumination restoration that adapts to the face structure and preserves key details, overcoming the global shortcomings of existing methods and laying a high-quality image foundation for subsequent occlusion repair and pose correction.
[0052] In low-light scenes, this invention binds the illumination features of the face region to the Gaussian scale of Retinex, solving the problem of the global parameters of the traditional Retinex method not matching the local structure. In overexposed scenes, by sensing the gradient features of the highlight region and the key texture region, the CLAHE algorithm parameters are adjusted in a targeted manner. High gradient regions are enhanced with high cliplimit, and low gradient regions are suppressed with low cliplimit, solving the problem of one-size-fits-all enhancement leading to the deterioration of highlights. Combining face semantics and image gradient features, this solution accurately distinguishes the highlight regions that need to be protected and the texture regions that need to be enhanced, maximizing the preservation of identity-related details while suppressing overexposure. Attached Figure Description
[0053] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0054] Figure 1 This is a flowchart of an image processing-based identity recognition method provided in an embodiment of the present invention;
[0055] Figure 2 This is a flowchart of pre-screening the face image and filtering out unqualified images provided in an embodiment of the present invention. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0057] Figure 1 A flowchart of an image processing-based identity recognition method is shown, such as... Figure 1 As shown, an image processing-based identity recognition method includes the following steps:
[0058] S1: Collect facial images of the person to be identified;
[0059] In this step, a visible light camera is used as the face image acquisition device. The parameters of the visible light camera include: a resolution of 1920×1080 (1080p) or higher to ensure that the details of the face area are clearly distinguishable; and a frame rate of ≥15fps (i.e., acquiring 15 frames of images per second) to ensure that clear, non-blurry frames can be captured in dynamic scenes.
[0060] It is worth emphasizing that the visible light camera can be a built-in visible light camera on a mobile phone.
[0061] S2: Perform image pre-screening on the face images to filter out unqualified images;
[0062] In existing technologies, pre-screening techniques for face images often rely on global indicators such as the resolution and blur of the entire image, which can easily lead to the omission of images that are generally acceptable but have deteriorated local key areas. Therefore, this embodiment proposes a pre-screening scheme that performs multi-dimensional local quality assessment and dynamic weight fusion on the face image. By refining the quality analysis of key sub-regions, it accurately filters images that are superficially acceptable but have insufficient intrinsic quality, improving the reliability of subsequent processes.
[0063] Specifically, such as Figure 2 As shown, S2 specifically refers to:
[0064] S2.1: Divide the face image into several key sub-regions;
[0065] In this step, based on the requirements of facial anatomy and feature extraction, the facial image is divided into 5 key sub-regions, each corresponding to the core feature-bearing area for identity recognition. The 5 key sub-regions are: the eye area, the nose area, the mouth area, the forehead area, and the jaw area. The eye area is a rectangular area enclosed by the line connecting the outer corners of the two eyes. The nose area is a vertical rectangular area from the bridge of the nose to the tip of the nose. The mouth area is a rectangular area enclosed by the closed boundaries of the upper and lower lips. The forehead area is a horizontal rectangular area from the hairline to the brow bone. The jaw area is the contour area from the chin to the root of the ear.
[0066] S2.2: For each sub-region, calculate the calculated value of the quality evaluation index for that sub-region;
[0067] In this step, for each key sub-region, four quality indicators reflecting the processability potential of the face image are calculated, covering the detail sharpness, texture richness, noise interference, and occlusion risk of the face image; specifically, the quality evaluation indicators of the sub-region include microscopic sharpness, texture richness, noise interference, and occlusion risk.
[0068] The micro-resolution method employs an improved Laplacian variance method to calculate the gradient changes of pixels within a sub-region, quantifying the edge sharpness of that sub-region. Insufficient micro-resolution can lead to the loss of details during subsequent feature extraction. The formula for the improved Laplacian variance method is as follows: ;
[0069] In the formula, S is the calculated value of the micro-resolution of the sub-region, N is the total number of pixels in the sub-region, L() represents the grayscale value of the pixels in the sub-region, and x i and y i This is an index variable used to iterate through the pixel coordinates within a sub-region.
[0070] The texture richness of a sub-region is evaluated using the local binary mode entropy value, with the specific formula as follows:
[0071] ;
[0072] In the formula, H is the calculated value of texture richness of the sub-region, and p(i) is the probability of gray value i appearing in the LBP histogram.
[0073] The higher the local binary pattern entropy value of a sub-region, the richer the texture. For example, the distribution of pores and wrinkles on healthy skin will be more obvious. Low-entropy areas caused by reflective or blurred areas will lead to feature homogenization and reduce the distinguishability.
[0074] Among them, the frequency distribution of the sub-region is analyzed based on wavelet transform to calculate the noise interference degree. Specifically, the sub-region image is decomposed into three layers of wavelet decomposition, and the ratio of the total energy of the high-frequency sub-bands (HH1, HL1, LH1) to the total energy of the whole frequency band is used as the calculated value of the noise interference degree of the sub-region. An excessively high proportion of high-frequency energy indicates the presence of sensor noise or compression artifacts, which will interfere with the stability of subsequent feature extraction.
[0075] Specifically, a semantic segmentation model is used to determine whether a sub-region is occluded, thereby outputting the occlusion probability of the sub-region. In particular, a MobileNetV3+U-Net model is used to determine whether a sub-region is occluded. The MobileNetV3+U-Net model is trained on a dataset to perform binary classification of images with no occlusion and partial occlusion, thereby achieving the prediction output of the occlusion probability.
[0076] S2.3: Set dynamic weights for each quality evaluation indicator according to the application scenario requirements of the identity recognition;
[0077] The weighting of quality evaluation indicators such as microscopic clarity, texture richness, noise interference, and occlusion risk directly affects the accuracy of pre-screening results. Existing dynamic weighting methods cannot adapt to the core requirements of different application scenarios. This embodiment addresses these shortcomings by proposing a dynamic weighting generation technique based on scenario requirement encoding. This technique dynamically adjusts indicator weights according to the core requirements of the application scenario, achieving scenario-adaptive pre-screening. Furthermore, it requires minimal computation and meets the technical requirement of low latency in identity recognition.
[0078] Specifically, S2.3 is as follows:
[0079] Establish application scenario requirement vectors;
[0080] Among them, the application scenario requirement vector The expression is:
[0081] ;
[0082] In the formula, Prioritize the image anti-counterfeiting requirements for different application scenarios. Prioritize the image discrimination requirements for different application scenarios. Prioritize the image consistency requirements for different application scenarios;
[0083] For example, for the payment verification scenario, the requirements are high anti-counterfeiting, medium distinguishability, and low consistency. Therefore, the core requirement vector for the payment verification scenario is [0.5, 0.3, 0.2]. For the attendance check-in scenario, the requirements are low anti-counterfeiting, low distinguishability, and high consistency. Therefore, the core requirement vector for the attendance check-in scenario is [0.2, 0.2, 0.6]. For the security deployment scenario, the requirements are medium anti-counterfeiting, high distinguishability, and low consistency. Therefore, the core requirement vector for the security deployment scenario is [0.3, 0.5, 0.2].
[0084] A lightweight neural network model (MLP) is used to map the scenario requirement vector to the weight of each quality evaluation index;
[0085] The lightweight neural network (MLP) structure includes an input layer, a hidden layer, and an output layer; the input layer includes three neurons, corresponding to the scene requirement vector. The three elements; the hidden layer is a two-layer hidden layer structure. The first hidden layer includes 4 neurons with the activation function ReLU, which is used to initially extract high-level features of the scene requirements; the second hidden layer includes 3 neurons with the activation function ReLU, which is used to further compress the feature dimension and focus on key information related to quality indicators; the output layer includes 4 neurons, which correspond to the initial weights of the four quality evaluation indicators respectively, with the activation function Softmax, which is used to convert the initial weights of the four quality evaluation indicators into a probability distribution form to ensure that the sum of all weights is 1.
[0086] S2.4: Calculate the processing potential score of each sub-region based on the calculated value of the quality evaluation index and the corresponding weight;
[0087] Among them, the processing potential score of the sub-region The calculation formula is: ;
[0088] In the formula, As the weight of the micro-clarity index, The normalized value of the calculated micro-resolution S for the sub-region is... As the weight of the texture richness index, The normalized value of H, representing the calculated texture richness of the sub-region. The weights of the noise interference index, The normalized value of NL, representing the calculated noise interference level of the sub-region. To obscure the weighting of the risk level indicator, Calculated value of occlusion risk for sub-regions The value after normalization.
[0089] S2.5: Calculate the processing potential score of the face image based on the processing potential score of each sub-region;
[0090] The formula for calculating the processable potential score (PPS) of the face image is as follows:
[0091] ;
[0092] In the formula, The processability potential score for the k-th sub-region.
[0093] S2.6: Determine whether the face image is an unqualified image based on its processing potential, and perform a filtering operation on the unqualified image;
[0094] Wherein, when the processable potential score (PPS) of the face image is less than a preset threshold When the face image is determined to be an unqualified image, a filtering operation is performed on the unqualified image.
[0095] This embodiment can accurately identify images that are superficially acceptable but have inherent defects by subdividing key sub-regions and evaluating their specific quality, thus avoiding misidentification or rejection due to the loss of local information during subsequent feature extraction. The focus of attention for each sub-region can be adjusted according to the application scenario to improve the flexibility and practicality of the solution.
[0096] S3: Perform image enhancement processing on the pre-screened face images;
[0097] When performing facial image recognition, abnormal lighting can directly lead to the failure of subsequent feature extraction. Existing lighting compensation methods such as Retinex and CLAHE mostly process global or local fixed parameters, which cannot adapt to the differences in facial structure or scene semantics such as indoor warm light / outdoor cool light, and are prone to local over-enhancement or loss of detail. Based on the above shortcomings, this embodiment proposes a scene semantic-guided dynamic multi-mode lighting compensation scheme. By coordinating facial region segmentation and lighting abnormality type classification, the compensation parameters are dynamically adjusted to achieve lighting compensation that accurately adapts to facial structure and preserves key details, thereby realizing image enhancement processing of facial images.
[0098] Specifically, S3 is:
[0099] S3.1: Classify the types of lighting anomalies in the face image, which are divided into low-light scenes and overexposed scenes;
[0100] In this step, a CNN model is used to classify the lighting anomalies in the face image. The input of the CNN model is the face image, and the output is the lighting anomaly type.
[0101] S3.2: For different types of lighting anomalies, and in combination with the regional distribution of the face image, perform image enhancement processing on the pre-screened face image;
[0102] Specifically, S3.2 is as follows:
[0103] For low-light scenes, the Retinex algorithm guided by face region distribution is used to perform image enhancement processing on the pre-screened face images;
[0104] Face images captured in low-light environments often suffer from insufficient overall brightness, blurred details, and amplified noise. While the traditional Retinex algorithm can improve image brightness by separating the reflection and illumination components, it still suffers from inaccurate global illumination estimation and the risk of noise amplification. Therefore, this embodiment proposes using a Retinex algorithm guided by face region distribution to perform image enhancement processing on the pre-screened face images; specifically:
[0105] The pre-screened face image is divided into three face regions: the eye region, the cheek region, and the other region.
[0106] The pupil / iris details in the eye area are the most critical for identity recognition, and the skin texture in the cheek area also carries identity information. In low-light scenes, the details in the eye area and cheek area are not obvious, so they need to be processed in detail.
[0107] The eye area is a rectangular region enclosed by the line connecting the outer corners of the two eyes, accounting for approximately 15% to 20% of the face area; the cheek area is a trapezoidal region from the cheekbone to the corner of the mouth, accounting for approximately 30% to 35% of the face area; other areas are other facial regions besides the two areas mentioned above, and no image enhancement processing is performed in this step.
[0108] Different filter scales are assigned to the eye region and the cheek region, and illumination map estimation is performed;
[0109] Traditional Retinex algorithms estimate illumination components (L) using Gaussian filtering. However, in low-light scenes, a globally uniform Gaussian kernel can oversmooth minute illumination changes in the eye area, leading to loss of detail. This approach employs region-differentiated multi-scale Gaussian filtering, assigning different filtering scales to the binocular and cheek areas. For the binocular areas, a small-scale Gaussian kernel (σ=3~5) is used to smooth only localized minor noise while preserving the brightness differences between the pupil and iris. For the cheek area, a medium-scale Gaussian kernel (σ=15~20) is used to balance the smoothness of ambient light reflection with the preservation of skin texture.
[0110] The specific formula is as follows:
[0111] ;
[0112] In the formula, This is a lighting map of both eyes. For the binocular region Gaussian kernel function, The image consists of the double eye regions of the pre-screened face image. This is a lighting diagram of the cheek area. The Gaussian kernel function for the cheek region. The cheek area image is the re-selected face image after pre-screening.
[0113] Calculate the reflection components of the binocular region and the cheek region separately;
[0114] According to Retinex theory, the reflection component is calculated as the ratio of the original image to the illumination component, using the following formula:
[0115] ;
[0116] ;
[0117] In the formula, For the reflection components of the binocular regions, The reflectance component of the cheek area;
[0118] Perform eye area reflex stretching and cheek area reflex stretching;
[0119] In low-light scenes, the reflected components may exhibit low contrast, requiring dynamic contrast stretching to highlight details; if the original contrast of the eye area is <0.2, then... The grayscale range is linearly mapped to [0.3, 0.7] to enhance the boundary between the pupil and iris; if the contrast of the cheek area is <0.15, then... The grayscale range is mapped to [0.2, 0.6] to preserve the subtle undulations of skin texture.
[0120] The processed binocular reflection components are fused with the binocular illumination map to obtain an enhanced local image of the binocular region; the processed cheek reflection components are fused with the cheek illumination map to obtain an enhanced local image of the cheek region.
[0121] The enhanced local images of the eyes and cheeks are seamlessly stitched together with the original images of other regions using Poisson fusion to avoid boundary artifacts. The overall color is then adjusted using a white balance algorithm to ensure the visual realism of the enhanced image.
[0122] By binding the illumination features of the face region to the Gaussian scale of Retinex, the problem of the global parameters of the traditional Retinex method not fitting the local structure is solved.
[0123] For overexposed scenes, the cliplimit parameter of the CLAHE algorithm is adjusted in a targeted manner by sensing the gradient features of the highlight area and the key texture area, so as to perform image enhancement processing on the pre-screened face image.
[0124] Facial images captured in overexposed environments often exhibit problems such as extremely high brightness in localized areas, highlight clipping, and loss of key textures. While the traditional Contrast-Limited Adaptive Histogram Equalization (CLAHE) algorithm can enhance details in dark areas by limiting local contrast, it can further deteriorate already overexposed areas like the bridge of the nose / forehead, and it cannot distinguish between normal areas that need enhancement and highlight areas that need suppression. This embodiment achieves a balance between highlight suppression and detail preservation by sensing the gradient characteristics of highlight areas and key texture areas and adjusting the cliplimit parameter of the CLAHE algorithm accordingly.
[0125] By selectively adjusting the cliplimit parameter of the CLAHE algorithm based on the gradient features of the highlight region and key texture region, the pre-screened face image is enhanced as follows:
[0126] The pre-screened face image is divided into a highlight-sensitive area and a texture-carrying area;
[0127] The highlight-sensitive area includes a triangular area connecting the tip of the nose to the inner corners of the eyes and a rectangular area from the hairline to the brow bone. These two areas are most prone to highlight overflow under strong light. The texture-bearing area includes the eye area and the cheek area. These two areas need to retain identity-related details such as eye wrinkles and pores under normal brightness.
[0128] Dynamic CLAHE parameters were adjusted for the highlight-sensitive area and the texture-bearing area respectively.
[0129] For the highlight-sensitive region, the highlight-sensitive region is divided into 16×16 pixel local blocks. If the local gradient mean G of the local block is... mean If the value is less than 0.1, it is determined to be a highlight overflow area. The cliplimit parameter of the CLAHE algorithm is set to 1.2 to suppress histogram stretching and prevent further deterioration of the highlights. Otherwise, the cliplimit parameter of the CLAHE algorithm is set to 1.0, and all the local blocks are processed.
[0130] For local blocks in the high-light sensitive area with a gray level greater than 240, additional brightness remapping processing is used to suppress overflow;
[0131] For the texture carrying region, the texture carrying region is divided into 16×16 pixel local blocks. If the local gradient mean G meanIf the value is greater than 0.2, it is determined to be a detail-carrying area. Set the CLAHE cliplimit to 3.5 to enhance local contrast and restore textures that have been obscured by overexposure. Otherwise, set the CLAHE cliplimit to 3.0 and process all the aforementioned local blocks.
[0132] The processed highlight-sensitive area and texture-bearing area are fused and stitched together to achieve image enhancement processing of the pre-screened face image.
[0133] This technical solution adjusts the cliplimit parameter of the CLAHE algorithm by sensing the gradient characteristics of highlight areas and key texture areas. High gradient areas are enhanced with a high cliplimit, while low gradient areas are suppressed with a low cliplimit, thus solving the problem of highlight degradation caused by a one-size-fits-all enhancement. Combining facial semantics and image gradient features, this solution accurately distinguishes between highlight areas that need protection and texture areas that need enhancement, maximizing the preservation of identity-related details while suppressing overexposure.
[0134] The illumination compensation scheme provided in this embodiment achieves accurate illumination restoration that adapts to the face structure and preserves key details through a closed-loop process of semantic perception, type classification, and mode-based compensation fusion. It solves the global defects of existing methods and lays a high-quality image foundation for subsequent occlusion restoration and pose correction.
[0135] S4: Input the face image after image enhancement processing into the identity recognition model to obtain the identity recognition result;
[0136] The identity recognition model is one of FaceNet, ArcFace, or MobileFaceNet.
[0137] Example 2: The present invention also provides an image processing-based identity recognition system, which employs an image processing-based identity recognition method according to Example 1. The system includes:
[0138] The image acquisition module is used to acquire facial images of the person to be identified;
[0139] The image pre-screening module is used to pre-screen the face images and filter out unqualified images.
[0140] The image enhancement module is used to perform image enhancement processing on the pre-screened face images;
[0141] The identity recognition module is used to input the face image after image enhancement processing into the identity recognition model to obtain the identity recognition result.
[0142] Example 3: The present invention also provides an electronic device, including one or more processors and a memory.
[0143] A processor can be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and can control other components in an electronic device to perform desired functions.
[0144] The memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may execute the program instructions to implement the image processing-based identity recognition method described above in any embodiment of this application, and / or other desired functions. Various contents such as initial extrinsic parameters and thresholds may also be stored in the computer-readable storage medium.
[0145] In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to implement the function of an image processing-based identity recognition method provided in any embodiment of this application.
[0146] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0147] Furthermore, embodiments of this application may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to implement an image processing-based identity recognition method provided in any embodiment of this application.
[0148] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.
Claims
1. An identity recognition method based on image processing, characterized in that, Includes the following steps: S1: Collect facial images of the person to be identified; S2: Perform image pre-screening on the face images to filter out unqualified images; S3: Perform image enhancement processing on the pre-screened face images; S3 specifically comprises: S3.1: classifying the illumination anomaly types of the face image, which are divided into low-light scenes and overexposed scenes; using a convolutional neural network model to classify the illumination anomalies of the face image, the input of the CNN model is the face image, and the output is the illumination anomaly type; S3.2: for different illumination anomaly types, combined with the regional distribution of the face image, performing image enhancement processing on the pre-screened face image; Specifically, S3.2 involves: for low-light scenes, using the Retinex algorithm guided by face region distribution to enhance the pre-selected face image; for overexposed scenes, by sensing the gradient features of highlight areas and key texture areas, adjusting the cliplimit parameter of the CLAHE algorithm to enhance the pre-selected face image; the highlight sensitive area includes a triangular area connecting the tip of the nose to the inner corners of the eyes and a rectangular area from the hairline to the brow bone; the texture carrying area includes the eye area and the cheek area; wherein, the Retinex algorithm guided by face region distribution... The method implements image enhancement processing on the pre-screened face image; specifically, it divides the pre-screened face image into three face regions: the eye region, the cheek region, and other regions; it assigns different filtering scales to the eye region and the cheek region and performs illumination map estimation; it calculates the reflection components of the eye region and the cheek region respectively; it performs reflection stretching on the eye region and the cheek region; it fuses the processed reflection components of the eye region with the illumination map of the eye region to obtain an enhanced local image of the eye region; it fuses the processed reflection components of the cheek region with the illumination map of the cheek region to obtain an enhanced local image of the cheek region. The enhanced local images of the eyes and cheeks are seamlessly stitched together with the original images of other regions using Poisson fusion, and the overall color is adjusted using a white balance algorithm. The cliplimit parameter of the CLAHE algorithm is specifically adjusted by perceiving the gradient features of highlight areas and key texture areas. Specifically, the pre-selected face image is divided into a highlight-sensitive area and a texture-bearing area; dynamic CLAHE parameter adjustments are performed on both the highlight-sensitive area and the texture-bearing area; for the highlight-sensitive area, it is divided into several local blocks, and if the local gradient mean G of the local blocks... mean If the local gradient mean threshold is less than the threshold value, it is determined to be a specular overflow area, and the cliplimit of the CLAHE algorithm is set to the first value; otherwise, the cliplimit of the CLAHE algorithm is set to the second value. If the first value is greater than the second value, all the local blocks are processed. For local blocks in the specular sensitive area where the gray level is greater than the gray level threshold, additional brightness remapping processing is used to suppress overflow. For the texture carrying area, the texture carrying area is divided into several local blocks. If the local gradient mean G... mean The second local gradient mean threshold is used to determine the detail-carrying area. The cliplimit of CLAHE is set to the third value. Otherwise, the cliplimit of CLAHE is set to the fourth value. If the third value is greater than the fourth value, all the local blocks are processed. The processed highlight sensitive area and texture-carrying area are fused and stitched together to achieve image enhancement processing of the pre-screened face image. S4: Input the face image after image enhancement into the identity recognition model to obtain the identity recognition result.
2. The image processing-based identity recognition method according to claim 1, characterized in that: Different filter scales are assigned to the binocular region and the cheek region, and illumination map estimation is performed as follows: For the eye area, a small-scale Gaussian kernel is used for filtering; for the cheek area, a medium-scale Gaussian kernel is used for filtering. The specific formula is as follows: ; In the formula, This is a lighting map of both eyes. For the binocular region Gaussian kernel function, The image consists of the double eye regions of the pre-screened face image. This is a lighting diagram of the cheek area. The Gaussian kernel function for the cheek region. The cheek area image is the re-selected face image after pre-screening.
3. The image processing-based identity recognition method according to claim 2, characterized in that: The formulas for calculating the reflection components of the binocular and cheek regions are as follows: ; ; In the formula, For the reflection components of the binocular regions, This represents the reflection component of the cheek area.
4. The image processing-based identity recognition method according to claim 1, characterized in that: Specifically, S2 is: S2.1: Divide the face image into several key sub-regions; S2.2: For each sub-region, calculate the calculated value of the quality evaluation index for that sub-region; S2.3: Set dynamic weights for each quality evaluation indicator according to the application scenario requirements of the identity recognition; S2.4: Calculate the processing potential score of each sub-region based on the calculated value of the quality evaluation index and the corresponding weight; S2.5: Calculate the processing potential score of the face image based on the processing potential score of each sub-region; S2.6: Determine whether the face image is an unqualified image based on its processing potential, and perform a filtering operation on the unqualified image.
5. The image processing-based identity recognition method according to claim 4, characterized in that: In S2.1, the key sub-regions are: the eye area, the nose area, the mouth area, the forehead area, and the jaw area.
6. The image processing-based identity recognition method according to claim 4, characterized in that: In S2.2, the quality evaluation indicators of the sub-region include microscopic clarity, texture richness, noise interference, and occlusion risk.
7. The image processing-based identity recognition method according to claim 4, characterized in that: Specifically, S2.3 is as follows: Establish application scenario requirement vectors; A lightweight neural network model is used to map the scenario requirement vector to the weight of each quality evaluation index.
8. An image processing-based identity recognition system, characterized in that, The system employs an image processing-based identity recognition method as described in any one of claims 1-7, and the system comprises: The image acquisition module is used to acquire facial images of the person to be identified; The image pre-screening module is used to pre-screen the face images and filter out unqualified images. The image enhancement module is used to perform image enhancement processing on the pre-screened face images; The identity recognition module is used to input the face image after image enhancement processing into the identity recognition model to obtain the identity recognition result.
Citation Information
Patent Citations
Mixed face component recognition method based on non-uniform illumination face image enhancement
CN113239823A
Face recognition algorithm adaptive to illumination change
CN119942622A