Charging pile control method and system based on face recognition
Through high-definition cameras and near-infrared light cameras, multi-modal images are collected, combined with multi-scale windows and infrared light feature repair technology, real-time face images are generated, which solves the problem of insufficient face recognition matching capabilities in bad weather, and realizes the charging piles. Stable operation and high-accurate authentication in complex environments.
Patent Information
- Application Number
- CN202411750729.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2024-12-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing charging pile control system based on face recognition has reduced the quality of the face image collected by the camera under severe weather conditions, resulting in limited matching capabilities of the face recognition algorithm and inability to operate stably, limiting the widespread charging piles in outdoor scenes. application.
Use high-definition cameras and near-infrared light cameras to collect multi-modal images, extract face features through multi-scale windows, combine the highlighted features of near-infrared light images to repair the blurred texture features of constant light images, generate real-time face images, and perform multi-dimensional features. Vector matching to implement authentication.
Improve image quality and facial recognition accuracy in harsh environments, enhance the environmental adaptability of charging piles, ensure normal operation in scenarios such as high humidity, low light or strong reflection, reduce the recognition error rate, and improve the The security and applicability of the system.
Smart Images

Figure CN119229508A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a charging pile control method and system based on face recognition. Background Art
[0002] Existing charging pile control systems based on facial recognition usually use cameras to collect user facial images, and then process the facial images through facial recognition algorithms to verify the user's identity and trigger the unlocking or charging function of the charging pile. However, in severe weather conditions, the facial images collected by the camera may lose details, which may make the facial recognition algorithm unable to match normally, resulting in identity authentication failure.
[0003] For example, in rainy and foggy scenes, due to the strong interference of the environment, the quality of images collected by the camera may decrease. The shortcomings of existing face recognition algorithms in face image processing lead to the limitation of the matching ability of face recognition algorithms, making it impossible for charging piles to operate stably under various environmental conditions, limiting their wide application in outdoor scenes. Summary of the invention
[0004] The purpose of the present invention is to provide a charging pile control method and system based on face recognition, aiming to solve the problems mentioned in the background technology.
[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0006] In a first aspect, a charging pile control method based on face recognition is provided, the method comprising: S100, collecting a normal light face image and a near infrared light image of the user through a high-definition camera and a near infrared light camera, and removing image noise from the normal light face image to obtain a pre-processed image; S200, setting a multi-scale window according to the size of the pre-processed image, where the multi-scale window includes a large-scale window and a small-scale window; S300, processing the preprocessed image according to the multi-scale window, extracting the contours of facial features and detailed textures through the small-scale window, and extracting the facial contour and global texture through the large-scale window; S400, merging the facial contours and the face contour into facial features, merging the detail texture and the global texture into texture features, and then merging the facial features and the texture features to form a face feature; S500, by calculating the horizontal and vertical gradients of the facial features, analyzing the clarity of the facial features and the texture features, and obtaining the facial features blurred area and the texture blurred area; S600, based on the gradient, strengthens the edge lines of the blurred area of the facial features to obtain restored facial features; S700, extracts highlight features based on near-infrared light images to obtain infrared texture features; S800, repairing the texture features of the texture fuzzy area according to the infrared texture features to obtain the repaired texture features; S900, mapping the restored facial features and the restored texture features to the same plane, and fusing the restored facial features and the restored texture features to obtain a real-time face image; S1000, matching the real-time face image with the preset identity verification image to obtain a recognition result; S1100, determine whether the charging function is turned on based on the recognition result. When the recognition result is yes, the identity authentication is successful and the charging function of the charging pile is turned on. When the recognition result is no, the identity authentication fails, the charging function of the charging pile is not turned on, and the identity authentication failure is sent to the front end for display.
[0007] Furthermore, by calculating the horizontal and vertical gradients of the facial features, the clarity of the facial features and texture features is analyzed to obtain the facial features blur area and texture blur area, including:
[0008] Divide the preprocessed image according to facial features to obtain feature areas;
[0009] Perform gradient calculation on the pixel values in the feature area to obtain the gradients in the horizontal and vertical directions;
[0010] The horizontal and vertical gradients are weighted and fused to obtain the sharpness value. The calculation formula of the sharpness value is: ,
[0011] in, is the sharpness value of the feature area, and are the horizontal and vertical dimensions of the feature region, respectively. and are horizontal and vertical directions respectively. and are the gradients in the horizontal and vertical directions respectively, and are the indexes of the feature area in the horizontal and vertical dimensions respectively, In the characteristic area The pixel value in the range, and are the weight coefficients in the horizontal and vertical directions respectively, In the characteristic area The standard deviation of pixel values within the range, In the characteristic area The average brightness within the range, is the normalization factor, is a constant;
[0012] According to the sharpness value and the preset sharpness value, the feature area is screened to obtain the blurred area of facial features and the blurred area of texture.
[0013] Furthermore, according to the gradient, the edge lines of the blurred area of the facial features are strengthened to obtain the restored facial features, including:
[0014] By detecting the edges of the blurred areas of the facial features and extracting the lines, blurred lines are obtained;
[0015] By adjusting the pixel value of the blurred line, the clarity of the blurred line is improved to obtain a prominent line;
[0016] According to the protruding lines, the fractures between adjacent protruding lines are repaired to obtain repaired lines;
[0017] The facial features in the blurred area are repaired according to the repairing lines to obtain the repaired facial features.
[0018] Furthermore, according to the near-infrared image, highlight features are extracted to obtain infrared texture features, including:
[0019] By removing the virtual images caused by the changes in illumination in the near-infrared image, a highlight image is obtained;
[0020] According to the highlight image, high-frequency information in the highlight image is analyzed to obtain highlight features;
[0021] The highlight features are screened according to the characteristic areas of the texture features, and the texture features in the highlight features are segmented to obtain the infrared texture features.
[0022] Further, according to the infrared texture features, the texture features of the texture fuzzy area are repaired to obtain the repaired texture features, including:
[0023] Match the texture features of the texture fuzzy area with the infrared texture features to determine the texture repair area;
[0024] According to the texture restoration area, features are extracted from the texture features of the texture fuzzy area and the infrared texture features to obtain features to be restored and restoration features;
[0025] Repair the feature to be repaired according to the repair feature, complete the texture feature of the texture fuzzy area, and obtain a clear texture feature;
[0026] By performing illumination correction on the clear texture features, the abruptness caused by illumination differences is eliminated and the repaired texture features are obtained.
[0027] Furthermore, the restored facial features and the restored texture features are mapped to the same plane, and the restored facial features and the restored texture features are fused to obtain a real-time face image, including:
[0028] Mapping the restored facial features and the restored texture features, converting the restored facial features and the restored texture features into two-dimensional coordinate information, and aligning them in space to obtain two-dimensional plane data;
[0029] According to the two-dimensional plane data, the restored facial features and texture features are meshed to obtain feature meshes;
[0030] The feature grids are weightedly fused through a multi-scale fusion algorithm to highlight and repair facial features and fill the repaired texture features globally to obtain a two-dimensional feature image.
[0031] The two-dimensional feature image is smoothed to optimize the brightness and contrast of the image to obtain a real-time face image.
[0032] Furthermore, the real-time face image is matched with the preset identity verification image to obtain the recognition result, including:
[0033] The similarity between the real-time face image and the preset identity verification image is calculated. The similarity calculation formula is: ,
[0034] in, For real-time face image and similarity of the preset identity verification images, is the index of the preset authentication image, and The real-time face image and the preset identity verification image are The eigenvector values, is the total number of feature vectors of face images, is the index of the feature vector on the face image, and They are real-time face image and preset identity verification image respectively. is the coefficient;
[0035] The recognition result is determined according to the similarity and the preset similarity. When the similarity is greater than the preset similarity, the recognition result is yes, and when the similarity is not greater than the preset similarity, the recognition result is no.
[0036] In a second aspect, an industry graph modeling system based on deep learning is provided, the system comprising:
[0037] A user image acquisition module is used to acquire a normal light face image and a near infrared light image of the user through a high-definition camera and a near infrared light camera, and remove image noise from the normal light face image to obtain a preprocessed image;
[0038] A multi-scale window module, used to set a multi-scale window according to the size of the pre-processed image, and the multi-scale window includes a large-scale window and a small-scale window;
[0039] A feature extraction module is used to process the preprocessed image according to the multi-scale window, extract the contours of the facial features and the detailed texture through the small-scale window, extract the facial contour and the global texture through the large-scale window, and record the extraction coordinates;
[0040] A feature merging module is used to merge the facial contours and face contours into facial features, and merge the detail texture and global texture into texture features, and then merge the facial features and texture features to form facial features;
[0041] The feature analysis module is used to analyze the clarity of facial features and texture features by calculating the horizontal and vertical gradients of facial features to obtain the facial feature fuzzy area and texture fuzzy area;
[0042] The facial feature restoration module is used to strengthen the edge lines of the blurred area of the facial features according to the gradient to obtain the restored facial features;
[0043] The near-infrared light module is used to extract highlight features and obtain infrared texture features based on the near-infrared light image;
[0044] A texture feature restoration module is used to restore the texture features of the texture fuzzy area according to the infrared texture features to obtain the restored texture features;
[0045] An image restoration module is used to map the restored facial features and the restored texture features to the same plane, and fuse the restored facial features and the restored texture features to obtain a real-time face image;
[0046] A face recognition module is used to match the real-time face image with the preset identity verification image to obtain the recognition result;
[0047] The charging function module is used to determine whether the charging function is turned on based on the recognition result. When the recognition result is yes, the identity authentication is successful and the charging pile charging function is turned on. When the recognition result is no, the identity authentication fails, the charging pile charging function is not turned on, and the identity authentication failure is sent to the front end for display.
[0048] The above solution of the present invention includes at least the following beneficial effects:
[0049] The present invention collects normal light and near-infrared light images respectively through a high-definition camera and a near-infrared camera, effectively overcoming the problem of reduced image quality under adverse weather conditions. Under environmental interference such as rain and fog, the normal light camera may not be able to capture clear facial details, but the near-infrared camera can make up for this defect and provide additional highlight features, thereby realizing multimodal image fusion processing; this multi-source image acquisition method not only improves the effectiveness of the image, but also increases the environmental adaptability of the face recognition algorithm, so that the charging pile can operate normally under various complex outdoor conditions, enhances the interference resistance to harsh environments, and broadens the applicability of the charging pile in special scenarios such as high humidity, low light or strong reflection.
[0050] The present invention sets a multi-scale window, uses a small-scale window to extract the contours of facial features and detailed textures, and a large-scale window to extract facial contours and global textures, effectively separating local details from overall features. This hierarchical extraction mechanism can avoid the problem of detail loss caused by over-reliance on global features, while enhancing the system's ability to capture feature details. Multi-scale processing can ensure that key information is retained even when the face is partially blocked or the light is uneven, thereby improving the extraction efficiency and matching accuracy of facial features.
[0051] The present invention obtains infrared texture features by extracting highlight features in near-infrared images and uses them to repair the fuzzy texture features of normal-light images. The introduction of infrared information not only enhances the integrity of detail textures, but also makes up for the shortcomings of traditional images in low-light environments to a certain extent. This method of combining multispectral image information enables the system to maintain a high recognition accuracy under weak or complex lighting conditions, avoiding the limitations brought about by pure reliance on traditional image processing algorithms.
[0052] The present invention maps the restored facial features and texture features to the same plane, and uses a multi-scale fusion algorithm to perform weighted fusion on the features, and finally generates a real-time face image. This process effectively solves the possible deviation problem between different features through spatial alignment and gridding processing, ensuring the uniformity of features. Multi-scale feature fusion not only improves the detail expression of the image, but also makes the face image more representative through the comprehensive use of global and local features, further improving the accuracy of identity authentication.
[0053] The present invention effectively reduces the error rate in the recognition process by calculating the similarity between the real-time face image and the preset identity authentication image and matching them with multi-dimensional feature vectors. Compared with the traditional single-dimensional similarity calculation, this method is more comprehensive and accurate. The similarity calculation uses optimization algorithms such as feature vector weighting and multi-scale gradient analysis, which significantly improves the reliability of the verification results and reduces the incidence of false positive and false negative events, thereby ensuring the security of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flowchart of a charging pile control method based on face recognition provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0056] like Figure 1 As shown, an embodiment of the present invention proposes a charging pile control method based on face recognition, the method comprising: S100, collecting a normal light face image and a near infrared light image of the user through a high-definition camera and a near infrared light camera, and removing image noise from the normal light face image to obtain a pre-processed image; S200, setting a multi-scale window according to the size of the pre-processed image, where the multi-scale window includes a large-scale window and a small-scale window; S300, processing the preprocessed image according to the multi-scale window, extracting the contours of facial features and detailed textures through the small-scale window, and extracting the facial contour and global texture through the large-scale window; S400, merging the facial contours and the face contour into facial features, merging the detail texture and the global texture into texture features, and then merging the facial features and the texture features to form a face feature; S500, by calculating the horizontal and vertical gradients of the facial features, analyzing the clarity of the facial features and the texture features, and obtaining the facial features blurred area and the texture blurred area; S600, based on the gradient, strengthens the edge lines of the blurred area of the facial features to obtain restored facial features; S700, extracts highlight features based on near-infrared light images to obtain infrared texture features; S800, repairing the texture features of the texture fuzzy area according to the infrared texture features to obtain the repaired texture features; S900, mapping the restored facial features and the restored texture features to the same plane, and fusing the restored facial features and the restored texture features to obtain a real-time face image; S1000, matching the real-time face image with the preset identity verification image to obtain a recognition result; S1100, determine whether the charging function is turned on based on the recognition result. When the recognition result is yes, the identity authentication is successful and the charging function of the charging pile is turned on. When the recognition result is no, the identity authentication fails, the charging function of the charging pile is not turned on, and the identity authentication failure is sent to the front end for display.
[0057] In an embodiment of the present invention, a normal light face image and a near infrared light image of a user are collected by a high-definition camera and a near infrared camera, and the image noise of the normal light face image is removed to obtain a preprocessed image, thereby realizing the acquisition of multi-light source information and enhancing the adaptability of the system under complex environmental conditions. At the same time, the image quality is improved by noise removal, providing a more reliable data basis for subsequent feature extraction and analysis; according to the size of the preprocessed image, a multi-scale window is set, and the multi-scale window includes a large-scale window and a small-scale window, which can effectively distinguish local and global features, avoid feature omissions caused by focusing only on a single scale, and improve the system's adaptability to images of different sizes and resolutions.
[0058] The preprocessed image is processed according to the multi-scale window, the facial contours and detailed textures are extracted through a small-scale window, and the facial contours and global textures are extracted through a large-scale window. The feature extraction method of different regions and scales can ensure the integrity of the overall structure while ensuring the feature details, laying the foundation for subsequent feature fusion and image matching; the facial contours and facial contours are merged into facial features, and the detailed textures and global textures are merged into texture features, and then the facial features and texture features are merged to form facial features. By fusing multiple features, the generated facial features contain both detailed information and a global perspective, which greatly improves the recognition and uniqueness of the features.
[0059] By calculating the horizontal and vertical gradients of facial features and analyzing the clarity of facial features and texture features, the blurred areas of facial features and texture are obtained, and the precise positioning of the blurred areas is achieved. This provides a clear target area for the feature restoration process, ensures the efficient allocation of restoration resources, and improves the quality and speed of image restoration. According to the gradient, the edge lines of the blurred areas of facial features are strengthened to obtain restored facial features. By strengthening the edges, the missing or deformed features caused by blurring are effectively compensated, and the overall accuracy and clarity of the facial features are improved.
[0060] According to the near-infrared light image, the highlight features are extracted to obtain the infrared texture features. According to the infrared texture features, the texture features of the texture fuzzy area are repaired to obtain the repaired texture features. By introducing near-infrared light data, this step enhances the system's adaptability to low-light or reflective environments, so that the texture features can achieve high-quality restoration in weak light or complex environments; the repaired facial features and the repaired texture features are mapped to the same plane, and the repaired facial features and the repaired texture features are fused to obtain a real-time face image, ensuring the integrity and coordination of the face image, and providing high-quality input data for the subsequent identity authentication process; the real-time face image is matched with the preset identity authentication image to obtain a recognition result, and whether the charging function is turned on is determined according to the recognition result. Through a high-precision matching algorithm, the linkage of identity authentication and function control is realized, ensuring the safety and convenience of the charging pile.
[0061] Among them, S100 uses a high-definition camera to collect the user's normal light facial image, and uses a near-infrared camera to obtain near-infrared light images. Normal light images provide facial texture information under natural light, but are easily interfered by external light; near-infrared light images can provide additional highlight features in weak light or bad weather conditions to make up for the shortcomings of normal light images. By removing noise from normal light images, interfering pixels that may be introduced due to changes in external ambient light are effectively removed, ensuring the accuracy of subsequent image analysis.
[0062] Among them, S200, the setting of the multi-scale window is based on the actual size of the preprocessed image, and the range of the large-scale window and the small-scale window is reasonably selected. The small-scale window is used to capture local detail features, such as facial contours and skin texture, while the large-scale window focuses on global information, such as the overall facial contour and evenly distributed texture features. The two-scale windows work together to ensure the comprehensiveness and accuracy of feature extraction.
[0063] Among them, S300 partitions different parts of the pre-processed image based on multi-scale windows. The small-scale window is used to capture the facial features and finer detail textures in the local area, while the large-scale window focuses on the extraction of global features, including facial shape and large-scale texture distribution. Through this multi-level processing, the system generates a series of feature points and accurately records the spatial coordinates of each feature to form structured feature data.
[0064] Among them, S400 combines the extracted facial contour information with the overall facial contour data to generate more comprehensive facial features, and at the same time combines the local detail texture information with the global texture features to form texture features. By further combining the two features, a comprehensive feature vector of the face is obtained.
[0065] In a preferred embodiment of the present invention, by calculating the horizontal and vertical gradients of facial features, analyzing the clarity of facial features and texture features, and obtaining facial feature fuzzy areas and texture fuzzy areas, the following are included:
[0066] Divide the preprocessed image according to facial features to obtain feature areas;
[0067] Perform gradient calculation on the pixel values in the feature area to obtain the gradients in the horizontal and vertical directions;
[0068] The horizontal and vertical gradients are weighted and fused to obtain the sharpness value. The calculation formula of the sharpness value is: ,
[0069] in, is the sharpness value of the feature area, and are the horizontal and vertical dimensions of the feature region, respectively. and are horizontal and vertical directions respectively. and are the gradients in the horizontal and vertical directions respectively, and are the indexes of the feature area in the horizontal and vertical dimensions respectively, In the characteristic area The pixel value in the range, and are the weight coefficients in the horizontal and vertical directions respectively, In the characteristic area The standard deviation of pixel values within the range, In the characteristic area The average brightness within the range, is the normalization factor, is a constant;
[0070] According to the sharpness value and the preset sharpness value, the feature area is screened to obtain the blurred area of facial features and the blurred area of texture.
[0071] In an embodiment of the present invention, the preprocessed image is divided according to facial features to obtain feature areas. The division of feature areas provides a clear processing range for subsequent gradient calculation and blurred area identification, thereby improving the pertinence of the algorithm. Gradient calculation is performed on the pixel values in the feature area to obtain gradients in the horizontal and vertical directions, which can effectively capture the edges and detail information in the feature area, thereby providing an important basis for identifying blurred areas. The horizontal and vertical gradients are weightedly fused to obtain a sharpness value, which not only reflects the richness of the regional edge information, but also avoids the misjudgment that may be caused by a single gradient direction, thereby providing a scientific quantitative basis for blurred area identification. According to the sharpness value and the preset sharpness value, the feature area is screened to obtain facial feature blurred areas and texture blurred areas. By accurately locating the blurred areas, the system can concentrate resources on the parts that need to be repaired, thereby improving the efficiency and effect of repair.
[0072] Among them, the pre-processed image is divided according to the facial features to obtain the feature areas, which specifically include:
[0073] According to the facial features, the preprocessed image is divided into several feature areas, such as eyes, nose, mouth and skin texture areas. Each area is defined based on spatial coordinates and specific shape rules to partition different parts of the image. This division process can combine prior knowledge and facial geometry models to make the boundaries of each area more consistent with the actual facial features.
[0074] Among them, the gradient calculation is performed on the pixel values in the feature area to obtain the gradients in the horizontal and vertical directions, specifically including:
[0075] In each feature area, the system uses the gradient calculation method to analyze the change amplitude of the pixel value in the horizontal and vertical directions to generate a gradient. The size of the gradient reflects the rate of change of the pixel value and is an important indicator for measuring the edge features of the image. The combination of horizontal and vertical gradients can more accurately characterize the clarity of the feature area.
[0076] Among them, according to the sharpness value and the preset sharpness value, the feature area is screened to obtain the facial feature blurred area and the texture blurred area, which specifically include:
[0077] The sharpness value of each feature area is compared with the preset sharpness value, and the blurred area is filtered out based on the result. The facial feature blurred area mainly refers to the area containing information of facial features such as eyes, nose, and mouth. The texture blurred area corresponds to the information area of skin texture and overall facial texture. The distribution of sharpness values in the area is combined during the screening process to ensure that the screening results can truly reflect the degree of blur of the area without missing detailed blur or over-marking high-frequency noise. The classification of blurred areas helps to adopt more targeted repair strategies for different features, such as edge enhancement of facial features and detail completion of texture.
[0078] In a preferred embodiment of the present invention, according to the gradient, the edge lines of the blurred area of the facial features are strengthened to obtain the restored facial features, including:
[0079] By detecting the edges of the blurred areas of the facial features and extracting the lines, blurred lines are obtained;
[0080] By adjusting the gradient value of the blurred line, the clarity of the blurred line is improved to obtain a prominent line;
[0081] According to the protruding lines, the fractures between adjacent protruding lines are repaired to obtain repaired lines;
[0082] The facial features in the blurred area are repaired according to the repairing lines to obtain the repaired facial features.
[0083] In an embodiment of the present invention, by detecting the edges of the blurred area of the facial features, the lines are extracted to obtain blurred lines, and by identifying the blurred lines, the area that needs to be repaired can be accurately located; by adjusting the gradient value of the blurred lines, the clarity of the blurred lines is improved to obtain highlighted lines, and the enhanced clarity makes the blurred lines more prominent in the image, thereby improving the boundary quality of the facial features; according to the highlighted lines, the breaks between adjacent highlighted lines are repaired to obtain repaired lines, and the break repair not only restores the integrity of the facial feature edges, but also provides an accurate boundary reference for subsequent feature adjustments; according to the repaired lines, the facial features in the blurred area of the facial features are repaired to obtain repaired facial features, thereby achieving comprehensive repair of the blurred facial features and restoring the clear edges of the facial features.
[0084] Among them, by detecting the edges of the blurred areas of the facial features and extracting the lines, the blurred lines are obtained, which specifically includes:
[0085] The edge detection algorithm is used to identify the edge lines in the area, calculate the gradient changes in pixel intensity, and extract high-change areas as edges. It not only identifies the main boundaries of the blurred area, but also distinguishes between complete edge lines and interruptions or unclear breaks caused by blur. During the extraction process, the gradient direction and intensity analysis are combined to avoid misjudgment due to noise, while ensuring the accuracy and consistency of the extraction results.
[0086] Among them, by adjusting the gradient value of the blurred line, the clarity of the blurred line is improved to obtain the highlighted line, which specifically includes:
[0087] The blurred lines are sharpened, their gradient values are calculated and the gradient differences are amplified through a nonlinear enhancement algorithm. By adjusting the amplitude of the gradient value, the contrast of the blurred lines is improved, making them clearer and more obvious. In this process, the local texture information of the edge is combined to avoid pseudo edges or distortion caused by over-enhancement.
[0088] Among them, according to the protruding lines, the breaks between adjacent protruding lines are repaired to obtain repaired lines, which specifically includes:
[0089] The fractures are smoothly connected through curve fitting method to ensure good continuity between the repaired lines and the original lines. At the same time, the direction and curvature of the lines are analyzed in combination with the fractures to avoid distortion or unnatural connections during the repair process.
[0090] Among them, according to the restoration lines, the facial features of the blurred facial features area are restored to obtain the restored facial features, which specifically includes:
[0091] Based on the repaired lines, the system smoothes the edge lines. For example, for the blurred eye area, the system redefines the boundary of the eye according to the repaired lines, and at the same time unifies the pixel values of the inner and outer areas, making the repaired facial features clearer and more natural.
[0092] In a preferred embodiment of the present invention, highlight features are extracted based on the near-infrared light image to obtain infrared texture features, including:
[0093] By removing the virtual images caused by the changes in illumination in the near-infrared image, a highlight image is obtained;
[0094] According to the highlight image, high-frequency information in the highlight image is analyzed to obtain highlight features;
[0095] The highlight features are screened according to the characteristic areas of the texture features, and the texture features in the highlight features are segmented to obtain the infrared texture features.
[0096] In an embodiment of the present invention, a highlight image is obtained by removing phantoms caused by changes in illumination in a near-infrared image, thereby improving the purity of the near-infrared image and ensuring that the highlight area extracted subsequently is real and accurate; based on the highlight image, high-frequency information in the highlight image is analyzed to obtain highlight features, and key edge and detail information in the near-infrared image is converted into features that can be used for identification, laying a solid foundation for the next step of texture feature screening and segmentation; highlight features are screened according to the feature areas of texture features, and texture features in highlight features are segmented to obtain infrared texture features, thereby ensuring that highlight features can be concentrated on key facial areas and providing rich and clear facial surface feature information in low-light or complex lighting environments.
[0097] Among them, by removing the virtual shadows caused by the change of illumination in the near-infrared light image, a highlight image is obtained, which specifically includes:
[0098] The ghost images in near-infrared images may be caused by uneven ambient light or surface reflection. In order to obtain a pure highlight area, the image is firstly subjected to illumination compensation processing. For example, the brightness distribution of the entire image is adjusted based on the histogram equalization method. Then, the ghost area is separated from the effective highlight area by using region growing or background separation technology, and the transition area is processed by a smoothing algorithm to reduce the impact of the ghost images.
[0099] Among them, according to the highlight image, the high-frequency information in the highlight image is analyzed to obtain the highlight features, which specifically include:
[0100] In highlight images, high-frequency information is extracted through frequency domain processing techniques such as Fourier transform or wavelet analysis. These high-frequency components usually correspond to details and edge features in the image. Combined with spatial domain processing algorithms, the edge and texture details of the highlight area are further enhanced, so that the highlight features can completely retain the structural information of the face. In addition, by setting a threshold, the interference information of the low-frequency area is excluded, and only the area with significant high-frequency characteristics is retained.
[0101] Among them, the highlight features are screened according to the feature area of the texture feature, and the texture features in the highlight features are segmented to obtain the infrared texture features, which specifically include:
[0102] The facial texture areas are obtained according to the previous steps, and the highlight features are screened according to these areas. The screening method is based on regional constraints. For example, a specific regional mask is used to align the highlight features with the feature areas one by one, and redundant information in non-target areas is excluded. Then, texture feature segmentation is further performed, and the texture characteristics of the image are extracted by combining the filter. The subtle texture patterns in the highlight area are identified and marked. The texture features are separated from the background or other areas through the regional segmentation method to generate accurate infrared texture features.
[0103] In a preferred embodiment of the present invention, the texture features of the texture fuzzy area are repaired according to the infrared texture features to obtain the repaired texture features, including:
[0104] Match the texture features of the texture fuzzy area with the infrared texture features to determine the texture repair area;
[0105] According to the texture restoration area, features are extracted from the texture features of the texture fuzzy area and the infrared texture features to obtain features to be restored and restoration features;
[0106] Repair the feature to be repaired according to the repair feature, complete the texture feature of the texture fuzzy area, and obtain a clear texture feature;
[0107] By performing illumination correction on the clear texture features, the abruptness caused by illumination differences is eliminated and the repaired texture features are obtained.
[0108] In an embodiment of the present invention, the texture features of the texture fuzzy area are matched with the infrared texture features to determine the texture repair area. By combining the infrared texture features, the texture fuzzy area is analyzed and matched in detail to clarify the specific area that needs to be repaired. According to the texture repair area, features are extracted from the texture features of the texture fuzzy area and the infrared texture features to obtain features to be repaired and repair features. By combining the information of the fuzzy area and the infrared texture features, the system can better extract the reference data required for repair, and ensure the relevance and accuracy of the features to be repaired and the repair features. According to the repair features, the features to be repaired are repaired to complete the texture features of the texture fuzzy area to obtain clear texture features, and the detailed information of the fuzzy texture area is restored. By performing illumination correction on the clear texture features, the abruptness caused by the illumination difference is eliminated to obtain the repaired texture features, and the abruptness caused by uneven illumination is eliminated, so that the final texture features are more natural and smooth, providing high-quality input for subsequent feature fusion.
[0109] Among them, the texture features of the texture blur area are matched with the infrared texture features to determine the texture repair area, which specifically includes:
[0110] The texture features in the texture fuzzy area are matched with the infrared texture features extracted previously. The correspondence between the two sets of features is found through a feature point-based matching method. The matching process uses the following similarity calculation formula to identify the part of the texture fuzzy area that needs to be repaired, and combines the feature position and texture distribution to accurately mark the area to be repaired.
[0111] Among them, according to the texture restoration area, features are extracted from the texture features of the texture fuzzy area and the infrared texture features to obtain the features to be restored and the restoration features, which specifically include:
[0112] After determining the texture restoration area, the system extracts relevant features from the texture blur area and infrared texture features respectively. The extraction process combines edge detection and texture analysis technology to identify the existing texture features in the blur area, and extracts clear texture features that match the restoration area from the infrared texture. By comparing the detailed differences between the features, the blurred or missing features to be restored are further marked, and the corresponding restoration features are generated.
[0113] Among them, the features to be repaired are repaired according to the repair features, the texture features of the texture fuzzy area are completed, and the clear texture features are obtained, which specifically includes:
[0114] The system uses repair features to complete the features to be repaired, and adopts texture synthesis algorithm to reconstruct features area by area. During the repair process, it pays attention to the processing of edges and details to ensure that the completed texture features are seamlessly integrated with the surrounding areas, while avoiding pseudo-texture or distortion caused by synthesis.
[0115] Among them, by performing illumination correction on the clear texture features, the texture abruptness caused by the illumination difference is eliminated, and the repaired texture features are obtained, which specifically includes:
[0116] After the restoration is completed, the system performs lighting correction on the clear texture features to eliminate the lighting difference between the repaired area and the original area. It uses a brightness equalization algorithm to adjust the brightness and contrast of the repaired area to make it consistent with the surrounding lighting. It then uses local lighting technology to optimize the abrupt problems under complex lighting conditions to ensure that the lighting transition in the repaired area is smooth and natural.
[0117] In a preferred embodiment of the present invention, the restored facial features and the restored texture features are mapped to the same plane, and the restored facial features and the restored texture features are fused to obtain a real-time face image, including:
[0118] Mapping the restored facial features and the restored texture features, converting the restored facial features and the restored texture features into two-dimensional coordinate information, and aligning them in space to obtain two-dimensional plane data;
[0119] According to the two-dimensional plane data, the restored facial features and texture features are meshed to obtain feature meshes;
[0120] The feature grids are weightedly fused through a multi-scale fusion algorithm to highlight and repair facial features and fill the repaired texture features globally to obtain a two-dimensional feature image.
[0121] The two-dimensional feature image is smoothed to optimize the brightness and contrast of the image to obtain a real-time face image.
[0122] In an embodiment of the present invention, the restored facial features and the restored texture features are mapped, the restored facial features and the restored texture features are converted into two-dimensional coordinate information, and they are spatially aligned to obtain two-dimensional plane data, thereby eliminating the spatial deviation caused by different acquisition methods or restoration algorithms, and laying a foundation for subsequent feature fusion; according to the two-dimensional plane data, the restored facial features and the restored texture features are gridded to obtain feature grids, and gridding converts complex feature data into a structured form, which helps the system to perform detailed analysis of local features and coordinated processing of global features; the feature grids are weightedly fused through a multi-scale fusion algorithm, the restored facial features are highlighted and the restored texture features are filled globally to obtain a two-dimensional feature image, and multi-scale fusion achieves a balance between local details and global consistency, so that the final generated two-dimensional feature image has both rich details and a natural overall effect; the two-dimensional feature image is smoothed to optimize the brightness and contrast of the image to obtain a real-time face image, further improving the visual quality of the image, and making the generated real-time face image clearer and more natural.
[0123] Among them, the restored facial features and the restored texture features are mapped, the restored facial features and the restored texture features are converted into two-dimensional coordinate information, and they are spatially aligned to obtain two-dimensional plane data, specifically including:
[0124] The restored facial features and texture features are mapped from three dimensions to two dimensions, and affine transformation is used to convert these features into a unified two-dimensional coordinate system. In this process, the spatial position and proportional relationship of the feature points are used to ensure that the mapping results are consistent with the actual facial structure. After the mapping is completed, the system spatially aligns different feature data, and aligns the facial features and texture features in a two-dimensional plane based on the feature point algorithm to form a complete facial feature plane.
[0125] Among them, according to the two-dimensional plane data, the repaired facial features and the repaired texture features are gridded to obtain feature grids, which specifically include:
[0126] The system performs gridding operations on the two-dimensional plane data, divides the restored facial features and texture features into regular grid units, and uses quadrilateral division to divide the entire two-dimensional plane into multiple adjacent feature units. Each grid node corresponds to a specific feature point, and the grid boundary describes the spatial relationship between these points.
[0127] Among them, the feature grids are weightedly fused through a multi-scale fusion algorithm to highlight the repaired facial features and fill the repaired texture features globally to obtain a two-dimensional feature image, including:
[0128] The feature grid is weighted by using a multi-scale fusion algorithm, and weights are dynamically assigned according to the importance of specific areas. For example, higher weights are assigned to the facial features to highlight their details, while weights are appropriately reduced in other facial texture areas to ensure a smooth transition of textures. Different feature enhancement rules are assigned to each grid node according to the region category where the node is located. For example, for facial feature nodes, edge and detail information is retained first, and for texture nodes, adjacent features are smoothed to enhance coherence. Detail enhancement technology is used to maintain the clarity of the facial features, while texture expansion is used to fill the global image to enhance the coherence of the image. Finally, the features of all grid nodes are ensured to remain consistent globally to obtain a two-dimensional feature image.
[0129] Among them, the two-dimensional feature image is smoothed, the brightness and contrast of the image are optimized, and a real-time face image is obtained, which specifically includes:
[0130] The two-dimensional feature image is smoothed and bilateral filtering is used to eliminate abrupt boundaries and noise points. Then, the brightness and contrast of the image are optimized, and the overall visual effect is enhanced through histogram equalization, while avoiding the loss of details caused by excessive adjustment. The smoothing process is also combined with the brightness changes in the local area to ensure the uniformity of the lighting and the naturalness of the transition.
[0131] In a preferred embodiment of the present invention, the real-time face image is matched with the preset identity verification image to obtain a recognition result, including:
[0132] The similarity between the real-time face image and the preset identity verification image is calculated. The similarity calculation formula is: ,
[0133] in, For real-time face image and similarity of the preset identity verification images, is the index of the preset authentication image, and The real-time face image and the preset identity verification image are The eigenvector values, is the total number of feature vectors of face images, is the index of the feature vector on the face image, and They are real-time face image and preset identity verification image respectively. is the coefficient;
[0134] The recognition result is determined according to the similarity and the preset similarity. When the similarity is greater than the preset similarity, the recognition result is yes, and when the similarity is not greater than the preset similarity, the recognition result is no.
[0135] In an embodiment of the present invention, the similarity between the real-time face image and the preset identity authentication image is calculated. The feature vector of the real-time face image is generated by the restored and fused facial features and texture features, while the feature vector of the preset identity authentication image is pre-stored in a database. During the calculation process, the system will normalize the features of the two to ensure that different image sources will not affect the matching results. The similarity directly determines whether the system can accurately verify the user's identity; comparing the similarity with the preset similarity to determine the recognition result can effectively determine whether the user meets the identity authentication requirements.
[0136] An embodiment of the present invention further provides a charging pile control system based on face recognition, the system comprising:
[0137] A user image acquisition module is used to acquire a normal light face image and a near infrared light image of the user through a high-definition camera and a near infrared light camera, and remove image noise from the normal light face image to obtain a preprocessed image;
[0138] A multi-scale window module, used to set a multi-scale window according to the size of the pre-processed image, and the multi-scale window includes a large-scale window and a small-scale window;
[0139] A feature extraction module is used to process the preprocessed image according to the multi-scale window, extract the contours of the facial features and the detailed texture through the small-scale window, extract the facial contour and the global texture through the large-scale window, and record the extraction coordinates;
[0140] A feature merging module is used to merge the facial contours and face contours into facial features, and merge the detail texture and global texture into texture features, and then merge the facial features and texture features to form facial features;
[0141] The feature analysis module is used to analyze the clarity of facial features and texture features by calculating the horizontal and vertical gradients of facial features to obtain the facial feature fuzzy area and texture fuzzy area;
[0142] The facial feature restoration module is used to strengthen the edge lines of the blurred area of the facial features according to the gradient to obtain the restored facial features;
[0143] The near-infrared light module is used to extract highlight features and obtain infrared texture features based on the near-infrared light image;
[0144] A texture feature restoration module is used to restore the texture features of the texture fuzzy area according to the infrared texture features to obtain the restored texture features;
[0145] An image restoration module is used to map the restored facial features and the restored texture features to the same plane, and fuse the restored facial features and the restored texture features to obtain a real-time face image;
[0146] A face recognition module is used to match the real-time face image with the preset identity verification image to obtain the recognition result;
[0147] The charging function module is used to determine whether the charging function is turned on based on the recognition result. When the recognition result is yes, the identity authentication is successful and the charging pile charging function is turned on. When the recognition result is no, the identity authentication fails, the charging pile charging function is not turned on, and the identity authentication failure is sent to the front end for display.
[0148] It should be noted that the system is a system corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0149] The embodiment of the present invention further provides a computing device, including: a processor, a memory storing a computer program, and when the computer program is executed by the processor, the method described above is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0150] The embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the above method. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0151] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A charging pile control method based on face recognition, characterized in that: The method comprises: The user's normal light face image and near infrared light image are collected by a high-definition camera and a near infrared light camera, and image noise is removed from the normal light face image to obtain a preprocessed image; According to the size of the preprocessed image, a multi-scale window is set, and the multi-scale window includes a large-scale window and a small-scale window; The preprocessed image is processed according to the multi-scale window, the facial features contours and detail textures are extracted through the small-scale window, and the facial contours and global textures are extracted through the large-scale window; The facial features and the face contour are merged into the facial features, and the detail texture and the global texture are merged into the texture features. Then, the facial features and the texture features are merged to form the face features. By calculating the horizontal and vertical gradients of facial features, the clarity of facial features and texture features is analyzed to obtain the facial feature fuzzy area and texture fuzzy area; According to the gradient, the edge lines of the blurred area of the facial features are strengthened to obtain the restored facial features; According to the near-infrared light image, the highlight features are extracted to obtain the infrared texture features; According to the infrared texture features, the texture features of the texture fuzzy area are repaired to obtain the repaired texture features; Mapping the restored facial features and the restored texture features to the same plane, and fusing the restored facial features and the restored texture features to obtain a real-time face image; Match the real-time face image with the preset identity verification image to obtain the recognition result; Determine whether the charging function is turned on based on the recognition result. When the recognition result is yes, the identity authentication is successful and the charging pile charging function is turned on. When the recognition result is no, the identity authentication fails, the charging pile charging function is not turned on, and the identity authentication failure is sent to the front end for display.
2. A charging pile control method based on face recognition according to claim 1, characterized in that: By calculating the horizontal and vertical gradients of facial features, analyzing the clarity of facial features and texture features, we can obtain the facial features blur area and texture blur area, including: Divide the preprocessed image according to facial features to obtain feature areas; Perform gradient calculation on the pixel values in the feature area to obtain the gradients in the horizontal and vertical directions; The horizontal and vertical gradients are weighted and fused to obtain the sharpness value. The calculation formula of the sharpness value is: ; in, is the sharpness value of the feature area, and are the horizontal and vertical dimensions of the feature region, respectively. and are horizontal and vertical directions respectively. and are the gradients in the horizontal and vertical directions respectively, and are the indexes of the feature area in the horizontal and vertical dimensions respectively, In the characteristic area The pixel value in the range, and are the weight coefficients in the horizontal and vertical directions respectively, In the characteristic area The standard deviation of pixel values within the range, In the characteristic area The average brightness within the range, is the normalization factor, is a constant; According to the sharpness value and the preset sharpness value, the feature area is screened to obtain the blurred area of facial features and the blurred area of texture.
3. A charging pile control method based on face recognition according to claim 2, characterized in that: According to the gradient, the edge lines of the blurred area of the facial features are strengthened to obtain the restored facial features, including: By detecting the edges of the blurred areas of the facial features and extracting the lines, blurred lines are obtained; By adjusting the gradient value of the blurred line, the clarity of the blurred line is improved to obtain a prominent line; According to the protruding lines, the fractures between adjacent protruding lines are repaired to obtain repaired lines; The facial features in the blurred facial feature area are repaired according to the repairing lines to obtain the repaired facial feature features.
4. A charging pile control method based on face recognition according to claim 3, characterized in that: According to the near-infrared image, the highlight features are extracted to obtain the infrared texture features, including: By removing the virtual images caused by the changes in illumination in the near-infrared image, a highlight image is obtained; According to the highlight image, the high-frequency information in the highlight image is analyzed to obtain the highlight feature; The highlight features are screened according to the characteristic areas of the texture features, and the texture features in the highlight features are segmented to obtain the infrared texture features.
5. A charging pile control method based on face recognition according to claim 4, characterized in that: According to the infrared texture features, the texture features of the texture fuzzy area are repaired to obtain the repaired texture features, including: Match the texture features of the texture fuzzy area with the infrared texture features to determine the texture repair area; According to the texture restoration area, features are extracted from the texture features of the texture fuzzy area and the infrared texture features to obtain features to be restored and restoration features; Repair the feature to be repaired according to the repair feature, complete the texture feature of the texture fuzzy area, and obtain a clear texture feature; By performing illumination correction on the clear texture features, the abruptness caused by illumination differences is eliminated and the repaired texture features are obtained.
6. A charging pile control method based on face recognition according to claim 5, characterized in that: Mapping the restored facial features and the restored texture features to the same plane, and fusing the restored facial features and the restored texture features to obtain a real-time face image, including: Mapping the restored facial features and the restored texture features, converting the restored facial features and the restored texture features into two-dimensional coordinate information, and aligning them in space to obtain two-dimensional plane data; According to the two-dimensional plane data, the restored facial features and texture features are meshed to obtain feature meshes; The feature grids are weightedly fused through a multi-scale fusion algorithm to highlight and repair facial features and fill the repaired texture features globally to obtain a two-dimensional feature image. The two-dimensional feature image is smoothed to optimize the brightness and contrast of the image to obtain a real-time face image.
7. A charging pile control method based on face recognition according to claim 6, characterized in that: Match the real-time face image with the preset identity verification image to obtain the recognition result, including: The similarity between the real-time face image and the preset identity verification image is calculated. The similarity calculation formula is: ; in, For real-time face images and similarity of the preset identity verification images, is the index of the preset authentication image, and The real-time face image and the preset identity verification image are The eigenvector values, is the total number of feature vectors of face images, is the index of the feature vector on the face image, and They are real-time face image and preset identity verification image respectively. is the coefficient; The recognition result is determined according to the similarity and the preset similarity. When the similarity is greater than the preset similarity, the recognition result is yes, and when the similarity is not greater than the preset similarity, the recognition result is no.
8. A charging pile control system based on face recognition, characterized in that: The system comprises: A user image acquisition module is used to acquire a normal light face image and a near infrared light image of the user through a high-definition camera and a near infrared light camera, and remove image noise from the normal light face image to obtain a pre-processed image; A multi-scale window module, used to set a multi-scale window according to the size of the pre-processed image, and the multi-scale window includes a large-scale window and a small-scale window; A feature extraction module is used to process the preprocessed image according to the multi-scale window, extract the contours of the facial features and the detailed texture through the small-scale window, extract the facial contour and the global texture through the large-scale window, and record the extraction coordinates; A feature merging module is used to merge the facial contours and the face contour into facial features, and merge the detail texture and the global texture into texture features, and then merge the facial features and the texture features to form the face features; The feature analysis module is used to analyze the clarity of facial features and texture features by calculating the horizontal and vertical gradients of facial features to obtain the facial feature fuzzy area and texture fuzzy area; The facial feature restoration module is used to strengthen the edge lines of the blurred area of the facial features according to the gradient to obtain the restored facial features; The near-infrared light module is used to extract highlight features and obtain infrared texture features based on the near-infrared light image; A texture feature restoration module is used to restore the texture features of the texture fuzzy area according to the infrared texture features to obtain the restored texture features; An image restoration module is used to map the restored facial features and the restored texture features to the same plane, and fuse the restored facial features and the restored texture features to obtain a real-time face image; A face recognition module is used to match the real-time face image with the preset identity verification image to obtain the recognition result; The charging function module is used to determine whether the charging function is turned on based on the recognition result. When the recognition result is yes, the identity authentication is successful and the charging pile charging function is turned on. When the recognition result is no, the identity authentication fails, the charging pile charging function is not turned on, and the identity authentication failure is sent to the front end for display.
9. A computing device, characterized in that include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Fused featured-based face detection and alignment method
CN105512638A
Face recognition method and device
CN109117725A
Multi-modal face recognition method based on feature fusion neural network
CN111401107A
Living body detection method based on face recognition, electronic equipment and storage medium
CN111488756A
Face recognition device and face recognition method
CN113128259A
Cited By
Intelligent face recognition identity verification system and method for examination environment
CN119495119A