Face recognition method based on identity verification mainboard

By calculating water vapor content for adaptive texture restoration and grayscale correction, and combining it with principal component analysis algorithm, the problem of feature loss in face recognition under humid and foggy conditions was solved, achieving high stability and high accuracy in recognition.

CN121640544APending Publication Date: 2026-03-10SHEN ZHEN CORE SMART CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In humid and foggy environments, facial recognition algorithms cannot effectively capture subtle facial texture features, leading to recognition failures or misjudgments.

Method used

By calculating the water vapor content of pixels, adaptive texture restoration and grayscale correction are performed, facial feature vectors are extracted and matched with pre-stored feature vectors in the database, and dimensionality reduction is performed using principal component analysis algorithm.

Benefits of technology

In humid and foggy environments, the system achieves stability and accuracy in facial recognition, avoiding feature loss caused by skin texture being covered by moisture, and significantly improving the reliability of recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121640544A_ABST
    Figure CN121640544A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of face recognition, and particularly discloses a face recognition method based on an identity verification mainboard, and the method comprises the following steps: the identity verification mainboard receives a to-be-recognized face image obtained by an image collection device, and carries out the gray processing of the face image, and obtains a gray image; determining the water vapor degree of the pixel i based on the gray values of other pixels around the pixel i in the gray image, wherein the water vapor degree is used for reflecting the degree of texture blurring of the pixel i caused by water vapor condensation; based on the water vapor degree, carrying out adaptive texture recovery on the grayscale image to obtain a standard image; and extracting a facial feature vector from the standard image, performing matching calculation on the facial feature vector and a facial feature vector pre-stored in a database, and outputting a face recognition result according to a matching calculation result. According to the invention, high face recognition stability and accuracy can still be maintained in a high-humidity environment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of face recognition, in particular to a face recognition method based on an identity verification mainboard. BACKGROUND

[0002] In a humid and foggy environment, the air is full of water vapor, and there is a temperature difference between the surface of the human face skin and the surrounding humid air. Water vapor will condense into a layer of fine water droplets on the skin surface. These water droplets are evenly attached to the cheeks, forehead, and nose wings, naturally filling the pores and fine wrinkles of the skin itself. The originally uneven skin texture is filled with water vapor, forming a relatively smooth surface.

[0003] The core of face recognition is to rely on the unique fine texture features of the face to distinguish individuals. These pores and wrinkles filled with water vapor are important carriers of feature information extracted by algorithms. When these key textures are covered and smoothed by water vapor, the algorithm cannot capture the unique feature details used to distinguish individuals. The texture information that originally reflects individual differences becomes blurred or even completely disappears, resulting in the extracted face features losing exclusive recognition, and the feature template stored during registration cannot be effectively matched, ultimately leading to recognition failure or misjudgment. SUMMARY

[0004] The purpose of the present application is to provide a face recognition method based on an identity verification mainboard to solve the above technical problems.

[0005] The purpose of the present application can be achieved by the following technical solutions:

[0006] A face recognition method based on an identity verification mainboard, comprising the following steps:

[0007] The identity verification mainboard receives the face image to be recognized obtained by the image acquisition device, and performs gray scale processing on the face image to obtain a gray scale image;

[0008] Determine the water vapor degree of pixel i based on the gray scale values of the remaining pixels around pixel i in the gray scale image, the water vapor degree being used to reflect the degree of texture blurring caused by water vapor condensation on pixel i;

[0009] Based on the water vapor degree, the gray scale image is subjected to adaptive texture restoration to obtain a standard image;

[0010] Extract the face feature vector from the standard image and perform matching calculation with the pre-stored face feature vector in the database, and output the face recognition result according to the matching calculation result.

[0011] As a further scheme of the present application, the calculation of the water vapor degree comprises:

[0012] A rectangular region of a predetermined size is constructed with the pixel i in the gray image as the center, and the variance of the gray values of all pixels in the rectangular region is calculated as the local texture richness of the pixel i;

[0013] The local texture richness of all pixels is normalized to map the local texture richness to the interval of zero to one to obtain a target degree, and the water vapor degree Ai of the pixel i is calculated as Ai=1-Ai', wherein Ai' represents the target degree of the pixel i.

[0014] As a further scheme of the present application, the obtaining of the standard image comprises:

[0015] If the water vapor degree is greater than or equal to a preset water vapor degree threshold, the corresponding pixel in the gray image is marked as a first type of pixel; otherwise, the corresponding pixel in the gray image is marked as a second type of pixel.

[0016] In the gray image, a rectangular region with a preset length and width is set as a search region with the first type of pixel j as the center, and the search region is grid processed to obtain a plurality of sub-regions;

[0017] The performance characteristics of a single sub-region are obtained, and the performance characteristics include the mean B1 and the variance B2 of the gray values of all pixels in the sub-region, and a feature vector (B1, B2) of the sub-region is constructed;

[0018] For a single sub-region, the ratio of the number of the first type of pixels to the total number of pixels is calculated, and if the ratio is less than 0.1, the sub-region is marked as a candidate region, and the feature vector of the candidate region is marked as a candidate vector; the sub-region where the first type of pixel j is located is not used as a candidate region.

[0019] The sub-region where the first type of pixel j is located is marked as a comparison region, and the feature vector of the comparison region is marked as a comparison vector.

[0020] The cosine value between the comparison vector and the candidate vector is calculated, the candidate region corresponding to the maximum cosine value is taken as a target region, and the target region is copied to cover the corresponding comparison region.

[0021] After all the comparison regions are covered, the covered comparison regions are smoothed to obtain a standard image.

[0022] As a further scheme of the present application, the obtaining of the standard image further comprises:

[0023] The pixels obtained through the covering operation in the standard image are marked as first pixels, and the remaining pixels are marked as second pixels.

[0024] Four second pixels adjacent to the first pixel k and located above, below, left and right are obtained and marked as abutting pixels, and the first pixel k and each abutting pixel form a correction pair.

[0025] For each correction pair, calculate the result of subtracting the gray value of the first pixel k from the gray value of the adjacent pixel k1, and record the result as the gray difference value;

[0026] Calculate the absolute values of the gray difference values of all the four correction pairs of the first pixel, and calculate the average value and the standard deviation of the absolute values, and add twice the standard deviation to the average value to obtain the determination threshold;

[0027] Count the number of correction pairs corresponding to the first pixel k whose absolute value of the gray difference value is greater than the determination threshold, and if the number is greater than or equal to 2, the first pixel k is recorded as a pixel to be adjusted;

[0028] Calculate the average value D of the gray difference values of all the correction pairs of the pixel to be adjusted, and record the average value D as the comprehensive adjustment value. The value obtained by adding the comprehensive adjustment value to the gray value of the pixel to be adjusted is taken as the adjusted gray value of the pixel to be adjusted;

[0029] Recombine all the first pixels and all the second pixels whose gray values have been adjusted to form a corrected standard image.

[0030] As a further scheme of the present application, the face feature vector extraction includes:

[0031] Detect the face feature points in the standard image using a face key point positioning algorithm, and the face feature points include the positions of eyes, nose and mouth;

[0032] Based on the detected face feature points, perform affine transformation on the standard image to align the positions of eyes and mouth to standard coordinates to obtain an aligned standard image;

[0033] On the aligned standard image, calculate local binary pattern features of multiple scales, wherein each scale is obtained by downsampling through a Gaussian pyramid, and the local binary pattern feature calculates the eight-neighbor binary pattern of each pixel;

[0034] Flatten the local binary pattern features of each scale into a feature vector, and connect the feature vectors of all scales into a high-dimensional composite feature vector;

[0035] Use principal component analysis algorithm to reduce the dimension of the high-dimensional composite feature vector to obtain the face feature vector.

[0036] As a further scheme of the present application, in the process of calculating the water vapor degree, the process of determining the size of the rectangular region includes:

[0037] Obtain the distance L between the two eyes in the standard image;

[0038] Calculate a scaling factor according to the distance L, and the scaling factor is proportional to the distance L;

[0039] adjusting a size of the rectangular region based on the scaling factor.

[0040] As a further aspect of the present application: the principal component analysis algorithm used in the dimension reduction process is a projection matrix trained based on a large number of face images; the training process of the projection matrix comprises:

[0041] Collecting a plurality of face images collected in a dry environment, extracting a face feature vector of the face image to form a training set;

[0042] Calculating a covariance matrix of the feature vector of the training set, performing eigenvalue decomposition on the covariance matrix, and selecting the first n eigenvectors with the largest eigenvalues to form a projection matrix; n is a preset number;

[0043] Using the projection matrix to perform linear transformation on the high-dimensional composite feature vector to obtain the face feature vector.

[0044] As a further aspect of the present application: the output face recognition result comprises:

[0045] The pre-stored face feature vector in the database is taken as a target vector, the cosine value between the face feature vector extracted from the standard image and the target vector is calculated, and the maximum value E is obtained;

[0046] If the maximum value E is greater than or equal to a preset maximum value threshold, it is determined that the matching is successful; otherwise, it is determined that the matching fails.

[0047] The beneficial effects of the present application are: compared with the prior art:

[0048] The present application introduces a texture degradation quantification mechanism based on water vapor degree, which can effectively compensate for the texture blur caused by water vapor condensation on the surface of the face in humid, foggy and other environments. By analyzing the local texture richness and constructing a water vapor degree model based on it, the area covered by water vapor and blurred can be accurately identified, and adaptive texture restoration is performed on this basis, so that the damaged texture area is reliably reconstructed. Further combined with the comparison and replacement of regional features and subsequent gray correction processing, the restored image is closer to the real face texture in dry state in terms of local detail continuity, structure consistency and texture level. The standard image obtained by correction provides a stable basis for subsequent feature point alignment and multi-scale texture feature extraction, so that the composite face feature vector constructed has more complete and more distinguishable texture information. Finally, through matching comparison with the database feature vector, the present application can still maintain high recognition stability and accuracy in a high-humidity environment, effectively avoiding the feature missing problem caused by water vapor covering the skin texture, and significantly improving the reliability of face recognition. BRIEF DESCRIPTION OF DRAWINGS

[0049] The invention will now be further described with reference to the accompanying drawings.

[0050] Figure 1 This is a flowchart illustrating a face recognition method based on an identity verification motherboard according to the present invention. Detailed Implementation

[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0052] Please see Figure 1 As shown, this invention is a face recognition method based on an identity verification motherboard, comprising the following steps:

[0053] The identity verification motherboard receives the face image to be identified from the image acquisition device, and performs grayscale processing on the face image to obtain a grayscale image;

[0054] The water vapor content of pixel i is determined based on the gray values ​​of the surrounding pixels in the grayscale image. The water vapor content is used to reflect the degree of texture blurring caused by water vapor condensation in pixel i.

[0055] In a preferred embodiment of the present invention, the calculation of water vapor density includes:

[0056] Construct a rectangular region of a predetermined size centered on pixel i in the grayscale image, and calculate the variance of the grayscale values ​​of all pixels in the rectangular region as the local texture richness of pixel i.

[0057] The local texture richness of all pixels is normalized to map the local texture richness to the interval between zero and one, thus obtaining the target degree. The water vapor degree Ai = 1 - Ai' of pixel i is calculated, where Ai' represents the target degree of pixel i.

[0058] It's important to note that by constructing local regions centered on pixels and calculating the changes in grayscale values ​​within those regions, the degree of undulation in the actual skin texture at that location can be reflected. The blurring phenomenon caused by moisture adhesion stems from the weakening of these original subtle undulations. The more uniform the grayscale values ​​in a local region, the more the original texture is flattened by moisture, and the lower the texture richness. Normalizing the texture richness of different pixels allows for comparison of texture changes at various locations on a uniform scale, thus accurately determining which areas are more significantly affected by moisture. The less rich the texture, the more severe the moisture coverage; therefore, texture richness and moisture content are inversely related. The moisture content obtained in this way can accurately reflect the degree of texture loss at each pixel.

[0059] Based on the water vapor content, adaptive texture restoration is performed on the grayscale image to obtain a standard image;

[0060] In another preferred embodiment of the present invention, acquiring a standard image includes:

[0061] If the water vapor content is greater than or equal to the preset water vapor content threshold, the corresponding pixel in the grayscale image is marked as a type 1 pixel; otherwise, the corresponding pixel in the grayscale image is marked as a type 2 pixel.

[0062] In a grayscale image, a rectangular region with preset length and width is set around a pixel j of a certain class and is denoted as the search region. The search region is then gridded to obtain several sub-regions.

[0063] Obtain the performance features of a single sub-region, which include the mean B1 and variance B2 of the gray values ​​of all pixels in the sub-region, and construct the feature vector (B1, B2) of the sub-region.

[0064] For a single sub-region, the ratio of the number of pixels of one type to the total number of pixels is counted. If the ratio is less than 0.1, the sub-region is recorded as a candidate region, and the feature vector of the candidate region is recorded as the candidate vector. The sub-region containing pixel j of one type is not considered as a candidate region.

[0065] The sub-region containing a class of pixels j is denoted as the contrast region, and the feature vector of the contrast region is denoted as the contrast vector.

[0066] Calculate the cosine of the angle between the comparison vector and the candidate vector, take the candidate region corresponding to the largest cosine of the angle as the target region, and copy the target region to cover the corresponding comparison region.

[0067] After all the contrast areas are covered, the covered contrast areas are smoothed to obtain a standard image.

[0068] It is understandable that classifying pixels by moisture content is based on the imaging principle that moisture coverage weakens normal texture undulations. By distinguishing between affected and unaffected areas, it is possible to identify which locations have distorted textures and require targeted repair.

[0069] The purpose of establishing a search region centered on the affected pixel type and then meshing it is to find sub-regions around it that still maintain normal texture structure. The grayscale mean and grayscale variation of these sub-regions can reflect relatively realistic texture features. Candidate regions are then filtered based on the proportion of the pixel type in the sub-regions, aiming to eliminate regions that are also blurred by moisture, thus ensuring that the regions used for subsequent replacement have higher reliability.

[0070] By calculating the cosine similarity between the feature vectors of the comparison region and the candidate region, the region with the texture distribution closest to the target location can be found among multiple candidate regions. This makes the covered region more consistent with the original state of that location in terms of grayscale structure and texture distribution. In this way, the area damaged by moisture is filled with a more realistic region in the neighborhood, restoring the local texture of the image. The smoothing process after covering further mitigates the transition between regions, making the overall restoration result continuous and natural, resulting in a standard image that more closely resembles the texture of dry skin, providing a reliable foundation for subsequent feature extraction.

[0071] In a preferred embodiment, acquiring the standard image further includes:

[0072] In the standard image, the pixel obtained through the overlay operation is marked as the first pixel, and the remaining pixels are marked as the second pixel;

[0073] Obtain the four second pixels that are adjacent to the first pixel k and are located above, below, to the left and to the right, and record them as adjacent pixels. Form a correction pair between the first pixel k and each adjacent pixel.

[0074] For a single correction pair, calculate the gray value of the adjacent pixel k1 minus the gray value of the first pixel k, and record this result as the gray value difference.

[0075] Calculate the absolute value of the grayscale difference of the four correction pairs of all first pixels, and calculate the mean and standard deviation of the absolute values. Add twice the standard deviation to the mean to obtain the judgment threshold.

[0076] The number of times the absolute value of the grayscale difference in the four correction pairs corresponding to the first pixel k is greater than the judgment threshold is counted. If the number is ≥2, the first pixel k is recorded as the pixel to be adjusted.

[0077] Calculate the average value D of the grayscale difference of all correction pairs of the pixel to be adjusted, and record the average value D as the comprehensive adjustment value. Add the comprehensive adjustment value to the grayscale value of the pixel to be adjusted, and use the value obtained as the adjusted grayscale value of the pixel to be adjusted.

[0078] All first pixels and all second pixels that have undergone grayscale adjustment are recombined to form the corrected standard image.

[0079] It's important to note that while the local area possesses a relatively reasonable structure after restoring the moisture-affected texture through overlay, the overlay operation itself cannot completely guarantee the continuity of grayscale levels between the restored pixels and their surrounding uncovered pixels. Therefore, further correction using neighborhood relationships is necessary to ensure the restored area truly integrates into the overall image. Comparing the grayscale differences between the overlaid pixels and their neighboring uncovered pixels in four directions uses the grayscale distribution of the normal area as a reference. Pixels that still appear abrupt after overlay are identified by observing whether the differences significantly deviate from the overall statistical range. When a pixel exhibits abnormal differences in multiple directions, it indicates that the grayscale level at that location is inconsistent with the surrounding environment. The grayscale needs to be adjusted by comprehensively considering its neighborhood differences, gradually bringing it closer to the true gradient trend of the local area. This correction method eliminates unnatural edges and local abrupt changes caused by overlay, making the brightness changes of the restored area more consistent with the original area. Consequently, the final standard image exhibits a more natural texture transition, improves the reliability of local details, and provides a more stable and consistent image foundation for subsequent feature extraction.

[0080] Facial feature vectors are extracted from the standard image and matched with pre-stored facial feature vectors in the database. Based on the matching result, the face recognition result is output.

[0081] In another preferred embodiment of the present invention, extracting facial feature vectors includes:

[0082] The facial landmark localization algorithm is used to detect facial feature points in the standard image, including the positions of the eyes, nose and mouth;

[0083] Based on the detected facial feature points, an affine transformation is performed on the standard image to align the positions of the eyes and mouth to the standard coordinates, resulting in an aligned standard image.

[0084] On the aligned standard image, local binary pattern features at multiple scales are calculated, where each scale is obtained by downsampling through a Gaussian pyramid, and the local binary pattern features calculate the eight-neighbor binary pattern of each pixel.

[0085] Flatten the local binary pattern features at each scale into feature vectors, and concatenate the feature vectors at all scales into a high-dimensional composite feature vector;

[0086] The high-dimensional composite feature vector is reduced in dimensionality using principal component analysis to obtain the facial feature vector.

[0087] It is worth noting that the principal component analysis algorithm used in the dimensionality reduction process is based on a projection matrix trained on a large number of face images; the training process of the projection matrix includes:

[0088] Multiple facial images were collected under dry conditions, and facial feature vectors were extracted from the facial images to form a training set;

[0089] Calculate the covariance matrix of the feature vectors of the training set, perform eigenvalue decomposition on the covariance matrix, and select the n feature vectors with the largest eigenvalues ​​to form the projection matrix; n is a preset number.

[0090] The high-dimensional composite feature vector is linearly transformed using the projection matrix to obtain the facial feature vector.

[0091] Understandably, by detecting keypoints and performing affine transformations on standard images to maintain spatial consistency of the face, geometric differences caused by different facial poses can be eliminated, preventing pose shifts from interfering with the stable expression of texture features. Local facial textures are often distributed within fixed anatomical regions; only after spatial alignment can the textures of the same area be comparable. Therefore, the alignment process allows subsequent feature descriptions to focus on reflecting the true texture attributes of each area. Extracting multi-scale local binary pattern features from the aligned image leverages the sensitivity of this descriptive method to local structures. By analyzing the grayscale relationship between pixels and their surrounding neighborhoods, minute changes in texture are converted into structurally stable pattern codes, unaffected by overall brightness changes. Features obtained through a multi-scale approach can simultaneously cover both fine textures and larger structures, allowing textures at different levels to be expressed. Flattening these features into vectors and concatenating them is to construct a high-dimensional representation containing complete facial texture information, enabling a more comprehensive perception of local changes. After obtaining high-dimensional features, dimensionality reduction is performed using a trained principal component analysis projection matrix. This utilizes the stable statistical distribution in the training set to project the high-dimensional features according to the inherent differences of real faces, thereby strengthening the distinguishing information between individuals, reducing noise and common components, and making the final facial feature vector more reflective of the differences between individuals. This is beneficial for maintaining reliable identity recognition capabilities even after being affected by humid environments.

[0092] In the specific implementation process, during facial feature extraction, key points are detected in the facial image to determine the stable reference positions of features such as the eyes, nose, and mouth that represent the facial structure. These positions may change in posture under different acquisition conditions. By locating the key points, the overall geometric relationship of the face can be grasped, providing a relatively fixed reference for subsequent processing. Applying an affine transformation to the image based on these key points can bring the face in different postures back to a unified standard coordinate system, ensuring that important facial areas are spatially consistent and suppressing structural differences between different images. The affine transformation eliminates differences in rotation, scale, and a certain degree of tilt, allowing for comparison of subsequently extracted texture information in corresponding areas.

[0093] After geometric alignment, local binary pattern features at multiple scales can be computed on the image. Local binary pattern (LBMM) is a descriptive method that reflects texture changes by comparing the grayscale relationships between a pixel and its surrounding neighborhood. It can preserve local structural information while mitigating the impact of overall brightness variations. Observing the grayscale changes in the surrounding neighborhood for each pixel allows for the formation of pattern codes that represent local texture differences. Features acquired at a single scale can only cover a limited range of texture distribution. However, by downsampling the image using a Gaussian pyramid, images at different resolutions can be obtained, allowing textures to be reflected at different levels of detail. LBMM features at each scale can describe texture information of different structural sizes, thus giving the final features multi-level expressive capabilities.

[0094] Flattening the local binary pattern features extracted at each scale maps complex local structures into vectors, enabling unified computation. Concatenating vectors from multiple scales constructs high-dimensional composite feature vectors containing various texture levels, enriching the overall feature representation with more textural information. While high-dimensional space preserves structural differences and texture variations across facial regions, high-dimensional vectors also contain redundant information and noise, hindering subsequent matching calculations; therefore, dimensionality reduction is necessary.

[0095] Principal Component Analysis (PCA) is used to reduce the dimensionality of this high-dimensional composite feature vector by projecting features from the high-dimensional space onto directions that better reflect individual differences. PCA reorganizes the information in the high-dimensional space by analyzing the projection directions of the features obtained during training, preserving the most discriminative features while weakening unimportant noise components. The dimensionality-reduced vector not only has a more suitable dimension for subsequent matching processing but also contains content that better reflects the texture differences between individuals. This makes the extracted facial feature vector stable, compact, and discriminative, improving the matching reliability in the recognition process. The synergistic effect of these steps ensures that the final facial features retain high discriminative power even in complex environments, providing a solid feature foundation for subsequent face recognition processes.

[0096] When constructing the projection matrix for dimensionality reduction, a large number of face images in dry environments are required as the training basis. These images can preserve the natural distribution of skin texture relatively completely when they are acquired, and can avoid the blurring effect of environmental humidity on texture, so that the statistical structure obtained by training can better reflect the inherent features of real faces.

[0097] After inputting these images into the feature extraction process, corresponding facial feature vectors are obtained. These vectors contain the texture representation of the face in different regions and are a high-dimensional abstract representation of the inherent structure of the face. By combining all these high-dimensional vectors into a training set, covariance analysis can be performed on the training set to understand the changing trends of the face across various feature dimensions. The covariance matrix reflects the correlation between different dimensions, revealing which dimensions have stable relationships and which dimensions exhibit significant individual differences.

[0098] Eigenvalue decomposition of the covariance matrix yields a set of eigenvectors representing the directions of change. Each eigenvector corresponds to the main direction of a certain type of texture change in the image, while the corresponding eigenvalues ​​reflect the degree of variation in these directions. Ranking the eigenvalues ​​helps identify which directions carry richer information about individual differences, and which directions mainly contain unstable noise or common patterns. Selecting eigenvectors with larger eigenvalues ​​to construct the projection matrix aims to use statistical methods to filter out the directions that best reflect the differences between individuals. This simplifies the texture features originally distributed in high-dimensional space through projection without losing crucial information.

[0099] After training, the projection matrix can linearly transform the input high-dimensional composite feature vector during dimensionality reduction, mapping it to a low-dimensional feature space. Since the projection matrix originates from a large amount of real facial texture in dry environments, the main components retained in the low-dimensional space can centrally represent the stable visual features of an individual, making the reduced vector more closely approximate the inherent texture structure of a real face in terms of expressive power. Because the training set covers diverse facial differences, the projection matrix can suppress irrelevant changes during dimensionality reduction, resulting in highly discriminative facial feature vectors. This projection method, trained based on statistical laws, allows the dimensionality reduction process to overcome the interference of environmental differences, making the texture-restored image more stably comparable to the feature vectors from the original dry environment in the database, thus achieving more reliable matching performance in the recognition stage.

[0100] In another preferred embodiment of the present invention, the output face recognition result includes:

[0101] Using the facial feature vectors pre-stored in the database as the target vector, calculate the cosine of the angle between the facial feature vector and the target vector extracted from the standard image, and obtain the maximum value E.

[0102] If the maximum value E is greater than or equal to the preset maximum value threshold, the match is considered successful; otherwise, the match is considered unsuccessful.

[0103] In humid or foggy environments, tiny water droplets formed by condensation on the face can obscure the original skin texture, masking detailed information that helps distinguish individuals. This invention analyzes the grayscale changes in local pixel regions, transforming the grayscale convergence caused by the disappearance of texture due to moisture coverage into quantifiable moisture content. This allows for accurate identification of damaged texture areas in the image. Moisture content-based classification distinguishes areas requiring repair from those with intact texture. Using the texture of the intact area as a reference, the similarity of sub-region features selects the region closest to the original structure to replace the damaged area, reconstructing a structure with realistic texture levels. Subsequently, grayscale correction eliminates abrupt grayscale differences generated during the replacement process, resulting in a natural and consistent texture variation across the entire image. The restored image, through geometric alignment and multi-scale texture description, generates distinctive feature vectors, enabling the recognition process to be based on more realistic skin texture and fundamentally avoiding feature loss caused by moisture obscuring. In this way, the problem of texture blurring caused by humid environment is effectively solved by a series of processes, including identifying the degree of damage, restoring regional structure, correcting local brightness and extracting stable features, so that the final recognition result remains reliable under the condition of humidity interference.

[0104] This invention introduces water vapor content, a quantitative indicator for describing the degree of texture damage. By normalizing the calculation of local texture richness, the blurring caused by water vapor is presented in pixels, thus making degraded texture areas identifiable. Based on this, a texture similarity relationship is constructed between candidate and comparison regions to achieve targeted replacement of damaged areas. This allows areas affected by water vapor to recover their structure using surrounding unaffected local textures. Subsequent grayscale correction further eliminates local abrupt changes caused by overlay operations, resulting in a visually continuous and natural texture. The final generated standard image not only regains texture details but also achieves sufficient stability in local structural consistency, enabling subsequent facial feature extraction and matching to be performed on a basis that more closely resembles real skin texture.

[0105] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should still fall within the scope of the present invention.

Claims

1. A face recognition method based on identity verification mainboard, characterized in that, The method comprises the following steps: The identity verification mainboard receives a face image to be identified acquired by an image acquisition device, and performs grayscale processing on the face image to obtain a grayscale image; The water vapor degree of pixel i is determined based on the grayscale values of the remaining pixels in the periphery of pixel i in the grayscale image, and the water vapor degree is used to reflect the degree of texture blurring of pixel i caused by water vapor condensation; An adaptive texture restoration is performed on the grayscale image based on the water vapor degree, and a standard image is obtained; A face feature vector is extracted from the standard image and matched with a pre-stored face feature vector in a database, and a face recognition result is output based on the matching result.

2. The face recognition method based on identity verification mainboard according to claim 1, characterized in that, The water vapor degree is calculated by: A rectangular region of a predetermined size is constructed with pixel i in the grayscale image as the center, and the variance of the grayscale values of all pixels in the rectangular region is calculated as the local texture richness of pixel i; The local texture richness of all pixels is normalized to map the local texture richness to the interval between zero and one to obtain a target degree, and the water vapor degree Ai of pixel i is calculated as Ai=1-Ai', where Ai' represents the target degree of pixel i.

3. The face recognition method based on identity verification mainboard according to claim 2, characterized in that, The standard image is obtained by: If the water vapor degree is greater than or equal to a preset water vapor degree threshold, the corresponding pixel in the grayscale image is marked as a first type of pixel; otherwise, the corresponding pixel in the grayscale image is marked as a second type of pixel; In the grayscale image, a rectangular region with a preset length and width is set as a search region with the first type of pixel j as the center, and is denoted as a search region, and the search region is grid processed to obtain a plurality of sub-regions; The performance characteristics of a single sub-region are obtained, including the mean B1 and the variance B2 of the grayscale values of all pixels in the sub-region, and a feature vector (B1, B2) of the sub-region is constructed; For a single sub-region, the proportion of the number of first type of pixels to the total number of pixels is calculated, and if the proportion is less than 0.1, the sub-region is marked as a candidate region, and the feature vector of the candidate region is denoted as a candidate vector; the sub-region where the first type of pixel j is located is not used as a candidate region; The sub-region where the first type of pixel j is located is denoted as a comparison region, and the feature vector of the comparison region is denoted as a comparison vector; The cosine value between the comparison vector and the candidate vector is calculated, the candidate region corresponding to the maximum cosine value is taken as a target region, and the target region is copied to cover the corresponding comparison region; After all the comparison regions are covered, the covered comparison regions are smoothed to obtain a standard image.

4. The face recognition method based on identity verification mainboard according to claim 3, characterized in that, The standard image is obtained by: The pixels obtained through the covering operation in the standard image are marked as first pixels, and the remaining pixels are marked as second pixels; Four second pixels adjacent to the first pixel k and located above, below, left and right of the first pixel k are obtained and denoted as adjacent pixels, and the first pixel k and each adjacent pixel form a correction pair; For a single correction pair, the difference between the grayscale value of the adjacent pixel k1 and the grayscale value of the first pixel k is calculated, and the result is denoted as a grayscale difference value; The absolute values of the grayscale difference values of the four correction pairs of all first pixels are calculated, and the average value and the standard deviation of the absolute values are calculated, and the average value plus twice the standard deviation is taken as a judgment threshold; Counting the number of absolute values of gray scale differences in four correction pairs corresponding to the first pixel k, and if the number is greater than or equal to 2, the first pixel k is recorded as a pixel to be adjusted; Calculating the average value D of the gray scale differences of all correction pairs of the pixel to be adjusted, and recording the average value D as a comprehensive adjustment value, and adding the comprehensive adjustment value to the gray scale value of the pixel to be adjusted to obtain the adjusted gray scale value of the pixel to be adjusted; Recombining all the first pixels and all the second pixels after the gray scale value adjustment to form a corrected standard image.

5. The face recognition method based on identity verification mainboard according to claim 4, characterized in that, The face feature vector extraction includes: Detecting face feature points in the standard image using a face key point positioning algorithm, the face feature points including the positions of eyes, nose and mouth; Performing affine transformation on the standard image based on the detected face feature points to align the positions of eyes and mouth to standard coordinates to obtain an aligned standard image; Calculating local binary pattern features of multiple scales on the aligned standard image, wherein each scale is obtained by Gaussian pyramid downsampling, and the local binary pattern feature calculates the binary pattern of an eight-neighborhood of each pixel; Flattening the local binary pattern features of each scale into a feature vector, and connecting the feature vectors of all scales into a high-dimensional composite feature vector; Using a principal component analysis algorithm to reduce the dimension of the high-dimensional composite feature vector to obtain the face feature vector.

6. The face recognition method based on identity verification mainboard according to claim 5, characterized in that, In the process of calculating the water vapor degree, the process of determining the size of the rectangular region includes: Obtaining the distance L between the two eyes in the standard image; Calculating a scaling factor according to the distance L, the scaling factor being proportional to the distance L; Adjusting the size of the rectangular region based on the scaling factor.

7. The face recognition method based on identity verification mainboard according to claim 6, characterized in that, The principal component analysis algorithm used in the dimension reduction process is a projection matrix trained based on a large number of face images; The training process of the projection matrix includes: Collecting a plurality of face images collected in a dry environment, extracting face feature vectors of the face images to form a training set; Calculating the covariance matrix of the feature vectors of the training set, performing eigenvalue decomposition on the covariance matrix, and selecting the first n eigenvectors with the largest eigenvalues to form a projection matrix; n is a preset number; Using the projection matrix to perform linear transformation on the high-dimensional composite feature vector to obtain the face feature vector.

8. The face recognition method based on identity verification mainboard according to claim 7, characterized in that, The face recognition result output includes: Taking the pre-stored face feature vector in the database as a target vector, calculating the included angle cosine value between the face feature vector extracted from the standard image and the target vector, and obtaining the maximum value E; If the maximum value E is greater than or equal to a preset maximum value threshold, it is determined that the matching is successful; otherwise, it is determined that the matching fails.