Face recognition system based on traceless image elimination technology and processing method thereof
By employing illumination estimation, compensation, and reconstruction algorithms based on seamless image removal technology, the impact of illumination variations on face recognition is addressed, thereby improving recognition accuracy and system reliability, reducing costs, and facilitating applications in scenarios such as small access control systems and mobile devices.
Patent Information
- Application Number
- CN202511177740.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-12-09
AI Technical Summary
Existing technologies suffer from low accuracy, introduce noise, damage original image information, and are costly when dealing with changes in lighting, making them difficult to widely promote in practical applications.
Employing a seamless image removal technique, a complete system architecture is constructed through illumination estimation, compensation, and reconstruction algorithms. This architecture includes modules for image acquisition, seamless image removal processing, feature extraction, and recognition. By combining Retinex theory and adaptive illumination compensation, the original image information is preserved, thereby improving recognition accuracy.
It significantly improves recognition accuracy under different lighting conditions, reduces the impact of noise, lowers system costs, facilitates widespread application, and enhances the reliability and practicality of the system.
Smart Images

Figure CN121095992A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of facial recognition technology, and in particular to a facial recognition system and processing method based on seamless image removal technology. Background Technology
[0002] In the widespread application of facial recognition technology, changes in lighting remain a key factor limiting its accuracy and stability. Different intensities, angles, and types of lighting conditions, such as direct sunlight, low-light environments, and side lighting, significantly affect facial images, leading to issues like shadows, highlights, and uneven contrast. These problems pose a significant challenge to traditional facial recognition algorithms in extracting facial features, resulting in recognition errors or even complete failure to recognize faces, severely impacting the practicality and reliability of facial recognition technology.
[0003] Currently, several preprocessing methods have been proposed and applied in practical systems to address the impact of lighting variations on face recognition. However, these methods generally suffer from the following problems and shortcomings: 1. Limited processing effect: While many preprocessing methods can eliminate the effects of lighting, they often cannot fully restore the original features of the image, resulting in limited improvement in recognition accuracy. Especially under extreme lighting conditions, such as strong light or low light environments, the processing effect of these methods is greatly reduced.
[0004] 2. Introducing additional noise: Some preprocessing methods may introduce additional noise or artifacts during the process. This noise cannot be effectively filtered out by subsequent feature extraction and recognition algorithms, and may even interfere with the accuracy of the algorithm, further reducing the recognition performance.
[0005] 3. Destruction of original image information: Some methods may require significant adjustments or transformations to the image to eliminate the effects of lighting, which often leads to the loss or destruction of the original image information. For facial recognition technology that relies on image details for identification, this loss of information is fatal, as it can directly affect the accuracy of the recognition results.
[0006] 4. High cost or complex structure: Although some advanced preprocessing methods can improve the recognition accuracy to a certain extent, they often require complex algorithms or expensive hardware equipment, resulting in high system cost or complex structure, making it difficult to widely promote in practical applications. Summary of the Invention
[0007] The purpose of this invention is to address the shortcomings of existing technologies, such as decreased accuracy in face recognition due to changes in illumination, poor preprocessing effects, introduction of additional noise, destruction of original image information, high cost, or complex structure. This invention proposes a face recognition system and processing method based on seamless image removal technology. It constructs a complete system architecture encompassing multiple modules including image acquisition, seamless image removal processing, feature extraction, face recognition, and storage. Simultaneously, it comprehensively utilizes a series of innovative algorithms such as illumination estimation, adaptive illumination compensation, and image reconstruction to accurately and effectively eliminate illumination interference under different lighting conditions, maximizing the preservation of original image information and avoiding the introduction of additional noise, thereby significantly improving the accuracy and reliability of face recognition. This invention forms a closed loop from image data acquisition to recognition feedback, with each step achieving technical closure through data transfer, algorithm integration, and target collaboration.
[0008] To achieve the above objectives, the present invention adopts the following technical solution: A face recognition system and processing method based on seamless image removal technology includes the following specific steps: S1: Acquire image data containing human faces: The image acquisition module uses devices such as cameras to acquire image data containing human faces. The acquired raw human face image dataset is transmitted to the subsequent processing module through the data transmission interface. S2: Perform seamless image removal processing on the acquired face images; S21: Illumination estimation: Perform illumination estimation on the input face image data, calculate the illumination intensity of each pixel in the image data, and obtain the illumination distribution map; S22: Illumination compensation: Based on the estimated illumination components, the image is illuminated to obtain an illuminated face image; S23: Image reconstruction: The reflection component after illumination compensation and the adjusted illumination component are recombined to obtain the face image after seamless image removal. S3: Feature extraction of the processed face image: Input the face image after the image removal process into the feature extraction module, and use classic feature extraction algorithms such as Local Binary Pattern (LBP) and Principal Component Analysis (PCA) or Convolutional Neural Network (CNN) algorithms in deep learning to extract the feature information of the face image and obtain the face feature vector; S4: Face recognition using extracted features: Input the extracted feature information into the face recognition module, compare it with the features in the face feature database, and obtain the face recognition result; S5: Storage and Feedback: Using the face recognition results obtained in step S4, the recognition results are stored in the storage module of the database, and corresponding feedback information (such as permission to enter, alarm, etc.) is generated based on the recognition results.
[0009] As a further technical solution of the present invention, in S1, the camera can select appropriate parameters such as resolution and frame rate according to actual needs to ensure that clear and usable face images are acquired; the output of the image acquisition module is the original face image dataset (containing face images with different lighting, angles and expressions). The original face image dataset is the input source for subsequent seamless image removal processing, and its quality (such as resolution and noise level) directly affects the accuracy of lighting estimation and compensation.
[0010] As a further technical solution of the present invention, S21 specifically includes: using the original face image dataset obtained in step S1 as the basic data for analyzing lighting conditions to estimate the lighting distribution and intensity in the image; Using a method based on Retinex theory, the image is decomposed into reflection and illumination components. The image is assumed to be... Represented as reflection component and light component The product of, i.e. The illumination components are estimated by solving an optimization problem. The specific algorithm is as follows: S211: Apply Gaussian filtering to the image to obtain a preliminary estimate of the illumination components. Gaussian filtering is a linear smoothing filter suitable for eliminating Gaussian noise. Its formula is: , in: Is the Gaussian function at point... The value at that point represents the weight of that point's contribution to the filtering result; It is the standard deviation of the Gaussian distribution, which controls the smoothness of the filter. The larger the value, the higher the blurriness of the filter and the wider the smoothing range; and It is relative to the center of the filter (usually the origin). The coordinate offset of ). S212: Through an iterative optimization algorithm, the ratio of the reflection component and the illumination component is continuously adjusted so that the decomposed reflection component retains as much of the original image information as possible, while the illumination component accurately reflects the changes in illumination. The objective function of the iterative optimization algorithm is expressed as: , in: This is a regularization parameter used to balance the weights of the data fitting term and the reflection component smoothing term; Represents the reflection component The gradient.
[0011] Step S21 output: Illumination distribution map (describes the illumination intensity and direction of each region in the image); The purpose of step S21 is to provide a quantitative basis for illumination compensation with the illumination distribution map, and its accuracy directly affects the subsequent compensation effect.
[0012] As a further technical solution of the present invention, S22 specifically includes: using the illumination distribution map obtained in step S21, adjusting the brightness and contrast of the image according to the illumination distribution to eliminate the influence of uneven illumination on the face image; An adaptive illumination compensation algorithm is employed to specifically adjust areas with excessively strong or weak illumination. To avoid introducing obvious artifacts, a smooth transition method is used during the adjustment process to ensure the overall naturalness of the image. Specifically, a Gaussian kernel is used for smoothing; the Gaussian kernel formula is the same as the Gaussian filtering formula in step S21. This is achieved by controlling... The values achieve varying degrees of smoothing; S221: For areas with excessively high illumination, an exponential decay function is used to reduce pixel values. The adjustment formula for areas with excessively high illumination is as follows: , in: These are the adjusted pixel values; These are the original pixel values; The attenuation coefficient controls the intensity of the adjustment. The threshold for excessive light intensity; S222: For areas with insufficient lighting, a linear growth function is used to increase pixel values. The adjustment formula for areas with insufficient lighting is as follows: , in: The growth coefficient, This is the threshold for insufficient light.
[0013] Step S22 output result: Face image after illumination compensation (uniform illumination, clearer details); Step S22: To preserve facial texture details while avoiding over-smoothing.
[0014] As a further technical solution of the present invention, S23 specifically includes: using the illumination-compensated face image obtained in step S22 as the basis for reconstructing a high-quality face image, further removing noise and artifacts to improve image quality, the specific formula being: , in: The image of a face after seamless image removal processing. This is the reflected component after illumination compensation adjustment. This is the adjusted light component.
[0015] Step S23 output result: Face image after artifact removal (uniform lighting, clear details, no artifacts); Step S23: The reconstructed image will be used as input for feature extraction.
[0016] As a further technical solution of the present invention, S3 specifically includes: using the face image after the seamless image removal process obtained in step S23, using an algorithm to extract features from the processed face image, providing high-quality, standardized face image input, so as to ensure the accuracy and stability of feature extraction; S31: Taking the Convolutional Neural Network (CNN) algorithm as an example, its basic structure includes convolutional layers, pooling layers, and fully connected layers; S311: The convolutional layer extracts local features by performing convolution operations between the input image and the convolution kernel. The convolution operation formula is as follows: , in: Let be the output of the l-th convolutional layer at position (i,j). Let be the weight of the l-th convolutional kernel at position (m,n). This represents the output of the (l-1)th layer at position (i+m, j+n). represents the bias term of the l-th layer, and M and N are the height and width of the convolutional kernel, respectively; S312: Pooling layers are used to reduce the dimensionality of the feature maps output by convolutional layers. Common pooling methods include max pooling and average pooling. S313: The fully connected layer integrates the features output by the pooling layer and outputs a facial feature vector for recognition.
[0017] As a further technical solution of the present invention, S3 specifically includes: S32: Taking the Local Binary Pattern (LBP) algorithm as an example, LBP is a simple and effective texture description operator. By comparing the gray values of the current pixel with those of the neighboring pixels, the gray values of the neighboring pixels are thresholded with those of the current pixel to obtain a binary number. Then, this binary number is converted into a decimal number as the LBP value of the pixel. S321: Let the current pixel be... Its grayscale value Consider Centered The neighborhood formed by the nth adjacent pixels, the nth pixel in the neighborhood The grayscale value of each pixel is For each neighboring pixel, calculate the sign of the difference between its grayscale value and that of the center pixel. ,in It is a symbolic function, defined as: ; S322: Arrange the sign function values of all neighboring pixels in order to form a binary number. For example, for a given number... The circular neighborhood of n pixels (a neighborhood with a radius of 1) is represented by the binary number 1. (Starting from the center pixel, arrange the binary bits of the neighboring pixels in a clockwise direction), and then convert this binary number to a decimal number, which is the LBP value of the center pixel: , in The number of neighboring pixels represents the number of adjacent pixels surrounding the center pixel, for example... This means that 8 neighboring pixels form a circular neighborhood; if different radii are considered... The neighborhood of a pixel can be used to obtain the pixel value at non-integer coordinates through interpolation methods. The neighborhood radius represents the size of the neighborhood, in pixels, such as... This means taking a ring of adjacent pixels (top, bottom, left, right, and diagonal) around the center pixel.
[0018] Step S3 output: Face feature vector (describes the key features of the face image, such as facial contours, the position of facial features, etc.); Step S3: Obtain the facial feature vector, which will serve as the basis for matching and recognition in subsequent steps.
[0019] As a further technical solution of the present invention, S4 specifically includes: using the facial feature vector obtained in step S3, performing facial recognition using the extracted features, and comparing it with the feature vector in the database as the basis for matching and recognition; Similarity measurement methods, such as Euclidean distance and cosine similarity, are used to calculate the similarity between the input features and the features in the feature library. When the similarity exceeds a preset threshold, the recognition is considered successful and the recognition result is output; otherwise, the recognition is considered unsuccessful. S41: Taking Euclidean distance as an example: The formula for Euclidean distance is... ,in: Let x be the Euclidean distance between two feature vectors x and y. and These are the i components of the feature vectors x and y, respectively, and n is the dimension of the feature vectors; S42: Taking cosine similarity as an example: the formula for cosine similarity is... ,in: Cosine similarity between two feature vectors x and y Let be the angle between the two vectors.
[0020] Step S4 output: Face recognition result (including the identified face identity and matching degree); Step S4: Obtain the face recognition result.
[0021] As a further technical solution of the present invention, in S5, the storage module is used to store relevant data such as the facial feature database, and to provide corresponding feedback and applications based on the recognition results; for example, in an access control system, if the recognition is successful, the access control will be opened; in a monitoring system, if a specific person is identified, an alarm will be issued, etc.
[0022] Step S5 output results: stored face recognition records (including recognition time, face identity, matching degree, etc.) and feedback information (such as operation instructions, prompts, etc.); Step S5 serves the purpose of storing data to provide feedback for subsequent model iterations. This feedback directly guides operations in real-world application scenarios (such as access control, monitoring, and alarms) to ensure the effectiveness and security of the facial recognition system.
[0023] A face recognition system based on seamless image removal technology includes the following modules: Image acquisition module: It acquires raw image data containing human faces through devices such as cameras, providing basic visual information for the face recognition process. It transmits the acquired image data to the subsequent processing module to ensure that the subsequent process can obtain accurate and complete face image information. It is the source of data input for the entire system. The seamless image removal module preprocesses the acquired original face images to remove influencing factors such as lighting, improve image quality, and enhance the accuracy and effectiveness of subsequent feature extraction. The seamless image removal module includes an illumination estimation submodule, an illumination compensation submodule, and an image reconstruction submodule. Illumination estimation submodule: Performs illumination estimation on the input face image data, calculates the illumination intensity of each pixel in the image data, and obtains an illumination distribution map to understand the illumination conditions in different areas of the image. Illumination compensation submodule: Based on the estimated illumination components, the illumination compensation is performed on the image to make the illumination of the image more uniform and reduce the impact of illumination differences on face recognition; Image reconstruction submodule: The reflection component after illumination compensation is recombined with the adjusted illumination component to obtain a face image after seamless image removal. This allows the image to maintain the integrity and clarity of the face while removing the influence of illumination, providing a better image foundation for the effective extraction of facial features. Feature extraction module: Extracts representative and distinguishable facial feature information from the face image after the face image is processed without artifacts, and converts the face image into a feature vector so that the subsequent face recognition module can perform efficient comparison and recognition. Face recognition module: compares the extracted feature information with the features in the face feature database to determine the identity information corresponding to the input face image, thereby realizing the face recognition function; Storage and Feedback Module: Stores and provides feedback on the face recognition results, making it convenient for users to understand the recognition status and also providing support for subsequent data query, statistics and management.
[0024] The beneficial effects of this invention are as follows: 1. Improved light adaptability and recognition accuracy: By using traceless image removal technology, through light estimation, compensation and reconstruction, light interference is effectively eliminated. Under different light conditions (strong light, weak light, etc.), the recognition accuracy is significantly improved compared with traditional methods, and the stability is significantly enhanced. It solves the recognition problem caused by light and improves the reliability of the system in complex lighting environments.
[0025] 2. Preserve image details and reduce noise impact: In the seamless image removal process, the algorithm is deeply optimized. Based on Retinex theory, the image is accurately decomposed to obtain the reflection component and the illumination component. On this basis, an adaptive compensation strategy is adopted to make targeted adjustments for different illumination areas, and combined with smooth transition technology, to effectively avoid processing traces and preserve image details to the greatest extent.
[0026] 3. Reduced cost and complexity, facilitating widespread application: The algorithm is reasonably designed with low computational complexity and low hardware requirements; at the same recognition accuracy, the computational resources and hardware costs are significantly reduced compared to traditional methods, making the system more cost-effective, easy to deploy and maintain, and widely applicable to scenarios such as small access control and mobile terminals, enhancing the practicality and scalability of facial recognition technology. Attached Figure Description
[0027] Figure 1 This is a flowchart of a face recognition processing method based on seamless image removal technology proposed in this invention; Figure 2 Image reconstruction flowchart; Figure 3 Here is a flowchart of the illumination compensation process; Figure 4 Here is a flowchart of the illumination estimation process; Figure 5 This is a schematic diagram illustrating the working principle of the traceless image removal processing module. Detailed Implementation
[0028] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.
[0029] Please see the appendix Figure 1 - Appendix Figure 5A face recognition processing method based on seamless image removal technology includes the following specific steps: S1: Acquire image data containing human faces: The image acquisition module uses devices such as cameras to acquire image data containing human faces. The acquired raw human face image dataset is transmitted to the subsequent processing module through the data transmission interface. The camera can select appropriate parameters such as resolution and frame rate according to actual needs to ensure that clear and usable face images are captured. The output of the image acquisition module is the original face image dataset (containing face images with different lighting, angles and expressions). The original face image dataset is the input source for subsequent seamless image removal processing, and its quality (such as resolution and noise level) directly affects the accuracy of lighting estimation and compensation.
[0030] S2: Perform seamless image removal processing on the acquired face images; S21: Illumination estimation: Perform illumination estimation on the input face image data, calculate the illumination intensity of each pixel in the image data, and obtain the illumination distribution map; The original face image dataset obtained in step S1 is used as the basic data for analyzing lighting conditions to estimate the lighting distribution and intensity in the image; Using a method based on Retinex theory, the image is decomposed into reflection and illumination components. The image is assumed to be... Represented as reflection component and light component The product of, i.e. The illumination components are estimated by solving an optimization problem. The specific algorithm is as follows: S211: Apply Gaussian filtering to the image to obtain a preliminary estimate of the illumination components. Gaussian filtering is a linear smoothing filter suitable for eliminating Gaussian noise. Its formula is: , in: Is the Gaussian function at point... The value at that point represents the weight of that point's contribution to the filtering result; It is the standard deviation of the Gaussian distribution, which controls the smoothness of the filter. The larger the value, the higher the blurriness of the filter and the wider the smoothing range; and It is relative to the center of the filter (usually the origin). The coordinate offset of ). S212: Through an iterative optimization algorithm, the ratio of the reflection component and the illumination component is continuously adjusted so that the decomposed reflection component retains as much of the original image information as possible, while the illumination component accurately reflects the changes in illumination. The objective function of the iterative optimization algorithm is expressed as: , in: This is a regularization parameter used to balance the weights of the data fitting term and the reflection component smoothing term; Represents the reflection component The gradient.
[0031] Step S21 output: Illumination distribution map (describes the illumination intensity and direction of each region in the image); The purpose of step S21 is to provide a quantitative basis for illumination compensation with the illumination distribution map, and its accuracy directly affects the subsequent compensation effect.
[0032] S22: Illumination compensation: Based on the estimated illumination components, the image is illuminated to obtain an illuminated face image; Using the illumination distribution map obtained in step S21, the brightness and contrast of the image are adjusted according to the illumination distribution to eliminate the influence of uneven illumination on the face image. An adaptive illumination compensation algorithm is employed to specifically adjust areas with excessively strong or weak illumination. To avoid introducing obvious artifacts, a smooth transition method is used during the adjustment process to ensure the overall naturalness of the image. Specifically, a Gaussian kernel is used for smoothing; the Gaussian kernel formula is the same as the Gaussian filtering formula in step S21. This is achieved by controlling... The values achieve varying degrees of smoothing; S221: For areas with excessively high illumination, an exponential decay function is used to reduce pixel values. The adjustment formula for areas with excessively high illumination is as follows: , in: These are the adjusted pixel values; These are the original pixel values; The attenuation coefficient controls the intensity of the adjustment. The threshold for excessive light intensity; S222: For areas with insufficient lighting, a linear growth function is used to increase pixel values. The adjustment formula for areas with insufficient lighting is as follows: , in: The growth coefficient, This is the threshold for insufficient light.
[0033] Step S22 output result: Face image after illumination compensation (uniform illumination, clearer details); Step S22: To preserve facial texture details while avoiding over-smoothing.
[0034] S23: Image reconstruction: The reflection component after illumination compensation and the adjusted illumination component are recombined to obtain the face image after seamless image removal. Using the illumination-compensated face image obtained in step S22 as the basis for reconstructing a high-quality face image, noise and artifacts are further removed to improve image quality. The specific formula is as follows: , in: The image of a face after seamless image removal processing. This is the reflected component after illumination compensation adjustment. This is the adjusted light component.
[0035] Step S23 output result: Face image after artifact removal (uniform lighting, clear details, no artifacts); Step S23: The reconstructed image will be used as input for feature extraction.
[0036] S3: Feature extraction of the processed face image: Input the face image after the image removal process into the feature extraction module, and use classic feature extraction algorithms such as Local Binary Pattern (LBP) and Principal Component Analysis (PCA) or Convolutional Neural Network (CNN) algorithms in deep learning to extract the feature information of the face image and obtain the face feature vector; Using the face image obtained in step S23 after seamless image removal, an algorithm is used to extract features from the processed face image, providing high-quality, standardized face image input to ensure the accuracy and stability of feature extraction; S31: Taking the Convolutional Neural Network (CNN) algorithm as an example, its basic structure includes convolutional layers, pooling layers, and fully connected layers; S311: The convolutional layer extracts local features by performing convolution operations between the input image and the convolution kernel. The convolution operation formula is as follows: , in: Let be the output of the l-th convolutional layer at position (i,j). Let be the weight of the l-th convolutional kernel at position (m,n). This represents the output of the (l-1)th layer at position (i+m, j+n). represents the bias term of the l-th layer, and M and N are the height and width of the convolutional kernel, respectively; S312: Pooling layers are used to reduce the dimensionality of the feature maps output by convolutional layers. Common pooling methods include max pooling and average pooling. S313: The fully connected layer integrates the features output by the pooling layer and outputs a facial feature vector for recognition.
[0037] S32: Taking the Local Binary Pattern (LBP) algorithm as an example, LBP is a simple and effective texture description operator. By comparing the gray values of the current pixel with those of the neighboring pixels, the gray values of the neighboring pixels are thresholded with those of the current pixel to obtain a binary number. Then, this binary number is converted into a decimal number as the LBP value of the pixel. S321: Let the current pixel be... Its grayscale value Consider Centered The neighborhood formed by the nth adjacent pixels, the nth pixel in the neighborhood The grayscale value of each pixel is For each neighboring pixel, calculate the sign of the difference between its grayscale value and that of the center pixel. ,in It is a symbolic function, defined as: ; S322: Arrange the sign function values of all neighboring pixels in order to form a binary number. For example, for a given number... The circular neighborhood of n pixels (a neighborhood with a radius of 1) is represented by the binary number 1. (Starting from the center pixel, arrange the binary bits of the neighboring pixels in a clockwise direction), and then convert this binary number to a decimal number, which is the LBP value of the center pixel: , in The number of neighboring pixels represents the number of adjacent pixels surrounding the center pixel, for example... This means that 8 neighboring pixels form a circular neighborhood; if different radii are considered... The neighborhood of a pixel can be used to obtain the pixel value at non-integer coordinates through interpolation methods. The neighborhood radius represents the size of the neighborhood, in pixels, such as... This means taking a ring of adjacent pixels (top, bottom, left, right, and diagonal) around the center pixel.
[0038] S33: Taking Principal Component Analysis (PCA) algorithm as an example, PCA is a statistical method that transforms the original data into a new coordinate system through orthogonal transformation, so that the projection of the data on the new coordinate axis has the maximum variance. In face recognition, it can be used for dimensionality reduction and to extract the main components that can represent the facial features. S331: Assume the face image is a two-dimensional matrix. Convert it to vector form, and let... There are training sample images, each of which is vectorized into . Calculate the mean vector of all samples. : ,in The number of samples is the number of face images used to train the PCA model. S332: Center each sample vector to obtain the centered vector. : ; S333: Calculate the covariance matrix : ,in This represents the matrix transpose operation. It is a matrix The transpose of the matrix; S334: Solving the covariance matrix The eigenvalues and eigenvectors are given, assuming the eigenvalues are arranged in descending order as follows: The corresponding feature vector is ,in It is the dimension after the image is vectorized; S335: Before selection The eigenvector matrix is composed of the eigenvectors corresponding to the largest eigenvalues. This is used to project the original data into a new low-dimensional space, where The number of feature vectors represents the number of main components extracted. The choice usually needs to consider whether it can retain enough information (such as the cumulative variance contribution rate), for example, choosing Make the former The sum of each eigenvalue is a certain proportion of the total sum of eigenvalues (e.g., ...). (above); for a new sample image vector The vector after feature extraction for: ,vector This is the extracted facial feature vector, which retains the main components with large variances from the original data.
[0039] Step S3 output: Face feature vector (describes the key features of the face image, such as facial contours, the position of facial features, etc.); Step S3: Obtain the facial feature vector, which will serve as the basis for matching and recognition in subsequent steps.
[0040] S4: Face recognition using extracted features: Input the extracted feature information into the face recognition module, compare it with the features in the face feature database, and obtain the face recognition result; Using the facial feature vector obtained in step S3, facial recognition is performed using the extracted features, which will be used as the basis for matching and recognition, and compared with the feature vector in the database. Similarity measurement methods, such as Euclidean distance and cosine similarity, are used to calculate the similarity between the input features and the features in the feature library. When the similarity exceeds a preset threshold, the recognition is considered successful and the recognition result is output; otherwise, the recognition is considered unsuccessful. S41: Taking Euclidean distance as an example: The formula for Euclidean distance is... ,in: Let x be the Euclidean distance between two feature vectors x and y. and These are the i components of the feature vectors x and y, respectively, and n is the dimension of the feature vectors; S42: Taking cosine similarity as an example: the formula for cosine similarity is... ,in: Cosine similarity between two feature vectors x and y Let be the angle between the two vectors.
[0041] Step S4 output: Face recognition result (including the identified face identity and matching degree); Step S4: Obtain the face recognition result.
[0042] S5: Storage and Feedback: Using the face recognition results obtained in step S4, the recognition results are stored in the storage module of the database, and corresponding feedback information (such as permission to enter, alarm, etc.) is generated based on the recognition results. The storage module is used to store facial feature databases and other related data, and to provide corresponding feedback and applications based on the recognition results; for example, in an access control system, the access control is opened if the recognition is successful; in a monitoring system, an alarm is issued if a specific person is identified.
[0043] Step S5 output results: stored face recognition records (including recognition time, face identity, matching degree, etc.) and feedback information (such as operation instructions, prompts, etc.); Step S5 serves the purpose of storing data to provide feedback for subsequent model iterations. This feedback directly guides operations in real-world application scenarios (such as access control, monitoring, and alarms) to ensure the effectiveness and security of the facial recognition system.
[0044] A face recognition system based on seamless image removal technology includes the following modules: Image acquisition module: It acquires raw image data containing human faces through devices such as cameras, providing basic visual information for the face recognition process. It transmits the acquired image data to the subsequent processing module to ensure that the subsequent process can obtain accurate and complete face image information. It is the source of data input for the entire system. The seamless image removal module preprocesses the acquired original face images to remove influencing factors such as lighting, improve image quality, and enhance the accuracy and effectiveness of subsequent feature extraction. The seamless image removal module includes an illumination estimation submodule, an illumination compensation submodule, and an image reconstruction submodule. Illumination estimation submodule: Performs illumination estimation on the input face image data, calculates the illumination intensity of each pixel in the image data, and obtains an illumination distribution map to understand the illumination conditions in different areas of the image. Illumination compensation submodule: Based on the estimated illumination components, the illumination compensation is performed on the image to make the illumination of the image more uniform and reduce the impact of illumination differences on face recognition; Image reconstruction submodule: The reflection component after illumination compensation is recombined with the adjusted illumination component to obtain a face image after seamless image removal. This allows the image to maintain the integrity and clarity of the face while removing the influence of illumination, providing a better image foundation for the effective extraction of facial features. Feature extraction module: Extracts representative and distinguishable facial feature information from the face image after the face image is processed without artifacts, and converts the face image into a feature vector so that the subsequent face recognition module can perform efficient comparison and recognition. Face recognition module: compares the extracted feature information with the features in the face feature database to determine the identity information corresponding to the input face image, thereby realizing the face recognition function; Storage and Feedback Module: Stores and provides feedback on the face recognition results, making it convenient for users to understand the recognition status and also providing support for subsequent data query, statistics and management.
[0045] Terminology Explanation: 1. Image Acquisition: Image acquisition refers to the process of using a camera to capture the optical image presented by an image intensifier, converting it into a video signal, and then transmitting it to an image acquisition card for digital processing, ultimately forming digital image data for subsequent computer processing and storage. Image acquisition involves two key indicators: grayscale level and acquisition resolution. This process uses a vision sensor to convert the acquired light signal into an electrical signal. After spatial sampling and amplitude quantization, these signals constitute a digital image.
[0046] 2. Facial Recognition Technology: Facial recognition technology is a biometric identification technology that authenticates identity based on facial features. It automatically detects and tracks faces in images or video streams containing human faces, then extracts and compares facial features to identify and verify an individual's identity.
[0047] 3. Illumination Changes: Illumination changes refer to the phenomenon where, during image acquisition, changes in factors such as the intensity, angle, and type of light source cause variations in the intensity and distribution of reflected light from the surface of the object being photographed (such as a face). Illumination changes can significantly affect the quality of facial images, thereby impacting the accuracy of facial recognition.
[0048] 4. Seamless Image Removal Technology: Seamless image removal technology is a technique used to eliminate the effects of lighting changes in images. Through steps such as lighting estimation, lighting compensation, and image reconstruction, it effectively eliminates problems such as shadows, highlights, or uneven contrast caused by lighting variations, while preserving the original information of the image to the greatest extent possible, avoiding the introduction of additional noise or damage to key features, making the processed image more suitable for face recognition.
[0049] 5. Retinex Theory: Retinex theory is a model based on the human visual system's perception of color and brightness. This theory posits that an image can be decomposed into two components: a reflection component and an illumination component. The reflection component reflects the inherent properties of an object's surface (such as color and texture), while the illumination component is related to the geometric relationship between the light source and the object's surface. By processing these two components separately, illumination compensation and enhancement of the image can be achieved.
[0050] 6. Illumination Estimation: Illumination estimation refers to the process of estimating the illumination intensity of each pixel in an image. In seamless image removal techniques, illumination estimation is a crucial step. It analyzes and processes the input image to calculate the illumination components of each pixel, providing a foundation for subsequent illumination compensation.
[0051] 7. Illumination Compensation: Illumination compensation refers to the process of making targeted adjustments to areas of an image that are too bright or too dim, based on the results of illumination estimation. In seamless image removal techniques, the purpose of illumination compensation is to eliminate the adverse effects of illumination changes, making the processed image closer to the lighting conditions of a real scene, thereby improving the accuracy of face recognition.
[0052] 8. Image Reconstruction: Image reconstruction refers to the process of recombining the reflection component after illumination compensation with the adjusted illumination component to obtain a face image without artifacts. In artifact-free image removal technology, image reconstruction is the final step. It generates the final artifact-free image result by synthesizing the processed reflection and illumination components.
[0053] 9. Feature Extraction: Feature extraction refers to the process of extracting facial feature information for recognition from a processed face image. This feature information can include geometric features of the face (such as the position and shape of the eyes, nose, and mouth), texture features (such as skin texture, wrinkles, etc.), and high-level features learned by deep learning models.
[0054] 10. Facial Feature Vector: A facial feature vector is a way to digitally represent a facial image. It is a fixed-length array of values, where each value represents quantified information about a specific feature dimension of the face. These feature dimensions cover various aspects of the face, including facial contours, the position and shape of facial features, skin texture, etc.
[0055] 11. Face Recognition Module: The face recognition module compares the extracted feature information with a pre-stored face feature database to complete the face recognition task. It calculates the similarity between the input features and the features in the feature database, and makes a judgment based on a preset threshold, thereby realizing face recognition and verification.
[0056] 12. Facial Feature Database: A facial feature database is a collection of pre-stored facial feature information. It contains facial feature information of multiple known individuals, used for comparison and recognition with real-time acquired facial feature information. The accuracy and completeness of the facial feature database have a significant impact on the performance of a facial recognition system.
[0057] Experimental verification principle explanation: To verify the effectiveness of this invention, a multi-illumination scene test set can be used for quantitative analysis. Face images acquired under different illumination conditions (such as strong light, weak light, sidelight, etc.) are used as the test dataset. The test dataset is divided into a training set and a test set. The face recognition system is trained using the training set, and then tested using the test set. The recognition accuracy under different illumination conditions is compared between using the method of this invention and not using the method of this invention (i.e., directly performing face recognition on the original images) to verify the effectiveness of the method of this invention.
[0058] Dataset construction includes the following steps: 1) Data collection: In a controlled laboratory environment and real-world scenarios, five types of typical lighting samples (strong direct light / ISO 1600 weak light / single-sided 45° side light / mixed strobe light / indoor backlight) were collected, with 200 face images for each type, for a total of 1000 samples. The training set and test set were divided in a 7:3 ratio.
[0059] 2) Comparison of options: Control group: Original images were directly input into the ResNet-50 recognition model. Experimental group: The original image was processed without any artifact removal and then input into the same model. 3) Evaluation indicators: a. Recognition accuracy (%) Control group (not using the method of this invention): Under different lighting conditions, the original image suffers from uneven lighting, being too bright, or too dark, which leads to inaccurate feature information extracted by the model, resulting in a lower accuracy rate for face recognition. For example, under strong light, some areas of the face may be overexposed, causing the loss of some detailed features; under low light, image noise increases, and facial features become blurred, affecting accuracy.
[0060] Experimental group (using the method of this invention): The seamless image removal process can estimate and compensate for the illumination of face images under different lighting conditions, improve the image illumination conditions, improve image quality, and thus enable the model to extract more accurate and complete facial feature information, thereby improving the accuracy of face recognition.
[0061] b. Image quality metrics (PSNR / SSIM) PSNR (Peak Signal-to-Noise Ratio) Control group: Due to the influence of lighting on the original image, there is a significant difference between it and the ideal image without lighting interference, resulting in a lower PSNR value. For example, under strong or weak light conditions, the brightness and contrast of the image are unbalanced, which will cause a larger mean square error (MSE) in the PSNR calculation, thus reducing the PSNR value and reflecting poor image quality.
[0062] Experimental group: The facial images after the seamless image removal process have optimized lighting, improved overall image quality, and reduced differences from the ideal image. Therefore, the PSNR value is higher than that of the control group, indicating better image quality.
[0063] SSIM (Structural Similarity Index) Control group: Illumination changes can damage the local structural information of facial images. For example, under side lighting or backlighting conditions, some areas of the face may appear shadowed or have blurred outlines, resulting in a decrease in the structural similarity between the original image and the reference image, and a smaller SSIM value.
[0064] Experimental group: The non-illuminating image processing can effectively alleviate the influence of illumination on the image structure, making the processed image structurally closer to the original image without illumination interference. Therefore, the SSIM value is higher than that of the control group, indicating that the structural integrity of the image is better preserved.
[0065] c. Single-frame processing latency (ms) Control group: Since no traceless image removal processing is required, the original image is directly input into the ResNet-50 recognition model for face recognition. The processing flow is relatively simple, so the single-frame processing latency is shorter.
[0066] The experimental group required seamless image removal of the original image, including steps such as illumination estimation, illumination compensation, and image reconstruction. This increased the computational load, resulting in a slightly longer single-frame processing latency compared to the control group. However, considering that seamless image removal significantly improves face recognition accuracy and image quality, it is generally acceptable in practical applications, especially in scenarios with high security requirements, where accuracy and image quality are often more important than processing speed.
[0067] As can be seen from the above description, the embodiments of the present invention achieve the following technical effects: improved light adaptability and recognition accuracy: In traditional face recognition technology systems, changes in light are a key factor affecting recognition performance. Due to the significant changes in image brightness distribution and contrast under different lighting conditions (such as strong light, weak light, etc.), traditional methods have low recognition accuracy and poor performance stability, making it difficult to meet practical application needs. The present invention uses a seamless image removal technique, through light estimation, compensation, and reconstruction, to effectively eliminate light interference. Under different lighting conditions (strong light, weak light, etc.), the recognition accuracy is significantly improved compared to traditional methods, and the stability is significantly enhanced. This solves the recognition problem caused by light and improves the reliability of the system in complex lighting environments.
[0068] Preserving image details and reducing noise impact: Existing preprocessing methods easily destroy the original image information and introduce noise; In the seamless image removal process, this invention deeply optimizes the algorithm, based on Retinex theory, to accurately decompose the image and obtain the reflection and illumination components; On this basis, an adaptive compensation strategy is adopted to make targeted adjustments for different illumination areas, and combined with smooth transition technology, to effectively avoid processing traces and preserve image details to the greatest extent.
[0069] Reduced cost and complexity, facilitating widespread application: In the application of facial recognition technology, some advanced methods are costly and structurally complex, limiting their application; the algorithm of this invention is reasonably designed, with low computational complexity and low hardware requirements. Under the same recognition accuracy, the computational resources and hardware costs are significantly reduced compared to traditional methods, making the system more cost-effective, easier to deploy and maintain, and widely applicable to scenarios such as small access control and mobile terminals, enhancing the practicality and scalability of facial recognition technology.
[0070] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention is limited to these examples; within the framework of the invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity.
[0071] This invention is intended to cover all such substitutions, modifications, and variations that fall within the broad scope of this specification. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A face recognition processing method based on seamless image removal technology, characterized in that, The specific steps include the following: S1: Acquire image data containing human faces: The image acquisition module uses a camera to acquire image data containing human faces, and the acquired raw human face image dataset is transmitted to the subsequent processing module through the data transmission interface; S2: Perform seamless image removal processing on the acquired face images; S21: Illumination estimation: Perform illumination estimation on the input face image data, calculate the illumination intensity of each pixel in the image data, and obtain the illumination distribution map; S22: Illumination compensation: Based on the estimated illumination components, the image is illuminated to obtain an illuminated face image; S23: Image reconstruction: The reflection component after illumination compensation and the adjusted illumination component are recombined to obtain the face image after seamless image removal. S3: Feature extraction of the processed face image: Input the face image after the image removal process into the feature extraction module, and use the algorithm to extract the feature information of the face image to obtain the face feature vector; S4: Face recognition using extracted features: Input the extracted feature information into the face recognition module, compare it with the features in the face feature database, and obtain the face recognition result; S5: Storage and Feedback: Using the face recognition results obtained in step S4, the recognition results are stored in the storage module of the database, and corresponding feedback information is generated based on the recognition results.
2. The face recognition processing method based on seamless image removal technology according to claim 1, characterized in that, In step S1, the camera can select a suitable resolution and frame rate according to actual needs; the output of the image acquisition module is the original face image dataset, which is the input source for subsequent seamless image removal processing.
3. The face recognition processing method based on seamless image removal technology according to claim 1, characterized in that, S21 specifically includes: using the original face image dataset obtained in step S1 as the basic data for analyzing lighting conditions, and using it to estimate the lighting distribution and intensity in the image; Using a method based on Retinex theory, the image is decomposed into reflection and illumination components. The image is assumed to be... Represented as reflection component and light component The product of, i.e. The illumination components are estimated by solving an optimization problem. The specific algorithm is as follows: S211: Apply Gaussian filtering to the image to obtain a preliminary estimate of the illumination components, the formula of which is: , in: Is the Gaussian function at point... The value at; It is the standard deviation of the Gaussian distribution; and It is the coordinate offset relative to the center of the filter; S212: Through an iterative optimization algorithm, the ratio of the reflection component and the illumination component is continuously adjusted so that the decomposed reflection component retains as much of the original image information as possible, while the illumination component accurately reflects the changes in illumination. The objective function of the iterative optimization algorithm is expressed as: , in: For regularization parameters; Represents the reflection component The gradient.
4. The face recognition processing method based on seamless image removal technology according to claim 3, characterized in that, S22 specifically includes: using the illumination distribution map obtained in step S21, adjusting the brightness and contrast of the image according to the illumination distribution to eliminate the influence of uneven illumination on the face image; An adaptive illumination compensation algorithm is employed to make targeted adjustments to areas with excessively strong or weak illumination. To avoid introducing obvious artifacts, a smooth transition method is used during the adjustment process, specifically employing a Gaussian kernel for smoothing. The Gaussian kernel formula is the same as the Gaussian filtering formula in step S21. This is achieved by controlling... The values achieve varying degrees of smoothing; S221: For areas with excessively high illumination, an exponential decay function is used to reduce pixel values. The adjustment formula for areas with excessively high illumination is as follows: , in: These are the adjusted pixel values; These are the original pixel values; The attenuation coefficient; The threshold for excessive light intensity; S222: For areas with insufficient lighting, a linear growth function is used to increase pixel values. The adjustment formula for areas with insufficient lighting is as follows: , in: The growth coefficient, This is the threshold for insufficient light.
5. A face recognition processing method based on seamless image removal technology according to claim 4, characterized in that, S23 specifically includes: using the illumination-compensated face image obtained in step S22 as the basis for reconstructing a high-quality face image, further removing noise and artifacts to improve image quality, as specified in the formula: , in: The image of a face after seamless image removal processing. This is the reflected component after illumination compensation adjustment. This is the adjusted light component.
6. A face recognition processing method based on seamless image removal technology according to claim 1, characterized in that, Specifically, S3 includes: using the face image after the seamless image removal process obtained in step S23, and using an algorithm to extract features from the processed face image to provide high-quality, standardized face image input; S31: Taking the convolutional neural network algorithm as an example, its basic structure includes convolutional layers, pooling layers, and fully connected layers; S311: The convolutional layer extracts local features by performing convolution operations between the input image and the convolution kernel. The convolution operation formula is as follows: , in: Let be the output of the l-th convolutional layer at position (i,j). Let be the weight of the l-th convolutional kernel at position (m,n). This represents the output of the (l-1)th layer at position (i+m, j+n). represents the bias term of the l-th layer, and M and N are the height and width of the convolutional kernel, respectively; S312: Pooling layers are used to reduce the dimensionality of the feature maps output by convolutional layers; S313: The fully connected layer integrates the features output by the pooling layer and outputs a facial feature vector for recognition.
7. A face recognition processing method based on seamless image removal technology according to claim 6, characterized in that, S3 specifically includes: S32: Taking the local binary mode algorithm as an example, by comparing the gray values of the current pixel with those of the neighboring pixels, the gray values of the neighboring pixels and the gray values of the current pixel are thresholded to obtain a binary number. Then, this binary number is converted into a decimal number as the LBP value of the pixel. S321: Let the current pixel be... Its grayscale value Consider Centered The neighborhood formed by the nth adjacent pixels, the nth pixel in the neighborhood The grayscale value of each pixel is For each neighboring pixel, calculate the sign of the difference between its grayscale value and that of the center pixel. ,in It is a symbolic function, defined as: ; S322: Arrange the sign function values of all neighboring pixels in order to form a binary number, and then convert this binary number to a decimal number, which is the LBP value of the center pixel: ,in This represents the number of neighboring pixels; if different radii are considered... The neighborhood of the pixel can be obtained by interpolation methods to obtain the pixel value at non-integer coordinates.
8. A face recognition processing method based on seamless image removal technology according to claim 1, characterized in that, S4 specifically includes: using the facial feature vector obtained in step S3, performing facial recognition using the extracted features, and comparing it with the feature vector in the database as the basis for matching and recognition; A similarity measurement method is used to calculate the similarity between the input feature and the features in the feature library. When the similarity exceeds a preset threshold, the recognition is considered successful and the recognition result is output; otherwise, the recognition is considered unsuccessful. S41: Taking Euclidean distance as an example: The formula for Euclidean distance is... ,in: Let x be the Euclidean distance between two feature vectors x and y. and These are the i components of the feature vectors x and y, respectively, and n is the dimension of the feature vectors; S42: Taking cosine similarity as an example: the formula for cosine similarity is... ,in: Cosine similarity between two feature vectors x and y Let be the angle between the two vectors.
9. A face recognition processing method based on seamless image removal technology according to claim 1, characterized in that, In step S5, the storage module is used to store relevant data from the facial feature database and to provide corresponding feedback and applications based on the recognition results.
10. A face recognition system based on seamless image removal technology, used to implement the face recognition processing method based on seamless image removal technology as described in any one of claims 1-9, characterized in that, Includes the following modules: Image acquisition module: Acquires raw image data containing human faces through a camera, providing basic visual information for the face recognition process; The seamless image removal processing module preprocesses the acquired original face images to improve image quality. The seamless image removal processing module includes an illumination estimation submodule, an illumination compensation submodule, and an image reconstruction submodule. Illumination estimation submodule: Performs illumination estimation on the input face image data, calculates the illumination intensity of each pixel in the image data, and obtains the illumination distribution map; Illumination compensation submodule: Performs illumination compensation on the image based on the estimated illumination components; Image reconstruction submodule: Recombines the reflection component after illumination compensation with the adjusted illumination component to obtain a face image after seamless image removal. Feature extraction module: Extracts representative and distinguishable facial feature information from the face image after the face image is processed without artifact removal, and converts the face image into a feature vector; Face recognition module: compares the extracted feature information with the features in the face feature database to determine the identity information corresponding to the input face image, thereby realizing the face recognition function; Storage and Feedback Module: Stores and feeds back the facial recognition results.