A smart charging pile with face recognition function and face recognition control method
By integrating face recognition function and shielding on the charging pile, the problem of using the charging card after loss is solved, the safety and practicality of the smart charging pile is improved, and the equipment life is extended.
Patent Information
- Application Number
- CN202210867220.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2042-07-22
AI Technical Summary
The existing charging piles lack smart face recognition devices, which leads to the loss of charging cards and are easily used by others, causing economic losses and troubles to users.
Design a smart charging pile with face recognition function, equipped with a face recognition device and a touch display screen, control the charging function by obtaining and identifying the user's face information, and a shield is set on the top of the charging pile body to prevent sunlight. and rainwater corrosion.
It improves the intelligence and practical value of the charging pile, prevents economic losses after the loss of the charging card, improves the safety and user experience of the charging operation, and extends the service life of the charging pile.
Smart Images

Figure CN115439982B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of charging piles, and in particular to an intelligent charging pile with a face recognition function and a face recognition control method. Background Art
[0002] The function of the charging pile is similar to that of the gas pump in a gas station. It can be fixed on the ground or on the wall, installed in public buildings and residential parking lots or charging stations, and can charge various types of electric vehicles according to different voltage levels. The input end of the charging pile is directly connected to the AC power grid, and the output end is equipped with a charging plug for charging electric vehicles. The charging pile generally provides two charging methods: conventional charging and fast charging. People can use a specific charging card to swipe the card on the human-computer interaction interface provided by the charging pile to perform corresponding charging methods, charging time, and cost data printing. The charging pile display can display data such as charging amount, cost, and charging time. However, the existing charging piles do not have intelligent face recognition devices, and charging cards are required for charging. Once the charging card is lost, outsiders can use the user's charging card at will, which will cause economic losses to the user and cause great trouble to the user. Summary of the invention
[0003] In order to overcome the above problems or at least partially solve the above problems, the embodiments of the present invention provide a smart charging pile with face recognition function and a face recognition control method. By optimizing the charging pile structure and the face recognition control method thereof, the intelligence of the charging pile can be effectively improved and its practical value can be improved.
[0004] The embodiment of the present invention is achieved as follows:
[0005] In the first aspect, an embodiment of the present application provides a smart charging pile with a face recognition function, which includes a charging pile body, a face recognition device, a touch screen and a code scanning device, and also includes a charging gun head. The above-mentioned face recognition device and the above-mentioned code scanning device are both arranged on the front side of the above-mentioned charging pile body. The above-mentioned charging gun head is connected to the above-mentioned charging pile body through a connecting line. A placement seat for placing the above-mentioned charging gun head is provided on the side of the above-mentioned charging pile body. The above-mentioned touch screen is arranged on the front side of the above-mentioned charging pile body. The above-mentioned face recognition device is arranged on the front side of the above-mentioned charging pile body. The above-mentioned face recognition device is used to obtain and identify face data. A shielding plate is provided on the top of the above-mentioned charging pile body, and the front end of the above-mentioned shielding plate is higher than the rear end of the above-mentioned shielding plate.
[0006] Based on the first aspect, in some embodiments of the present invention, it also includes a hanging member for hanging the above-mentioned connecting line, one end of the above-mentioned hanging member is connected to the side wall of the above-mentioned charging pile body, and the other end is provided with a limiting portion.
[0007] In some embodiments of the present invention, a support member is provided at the bottom of the charging pile body, and heat dissipation slots are also provided at the bottom and side walls of the charging pile body.
[0008] In some embodiments of the present invention, the charging gun head is provided with a handle.
[0009] In a second aspect, an embodiment of the present application provides a face recognition control method, which comprises the following steps:
[0010] Acquire the facial information of the current user through the above-mentioned facial recognition device;
[0011] Compare the facial information of the current user with the facial information of the registered user collected by the facial recognition device. If the comparison result is a registered user, read the corresponding user information;
[0012] In response to the current user's charging request, the charging pile body is controlled to start charging, and after charging is completed, the user information of the current user is updated, and the charging pile body is controlled to stop charging.
[0013] Based on the second aspect, in some embodiments of the present invention, the step of comparing the facial information of the current user with the facial information of the registered user collected by the facial recognition device specifically includes:
[0014] The face position in the face information of the current user is obtained by the face recognition device, and a target face detection image is obtained;
[0015] Performing face alignment processing on the target face detection image by determining the positions of calibration points in the face to obtain a face alignment image, wherein the calibration points include the eyes, nose, and both ends of the mouth corners;
[0016] Convert the pixel points of the face alignment image into feature vectors to obtain a face feature image;
[0017] The facial feature image is judged for similarity one by one with the facial feature images of all registered users uploaded by the above-mentioned face recognition device and stored in the server. If the similarity between the two is lower than a preset threshold, it is judged to be a registered user.
[0018] In some embodiments of the present invention, the alignment process includes processing by matrix translation, scaling and rotation, wherein the target face detection image that does not need to be aligned is processed by matrix Processing, x, y are the values of the target face detection image at the corresponding position, u, v are the values of the target face detection image at the corresponding position after alignment processing, a1, a2, b1, b2, c1, c2 are the values corresponding to the calibration points in the target face detection image; through the matrix The target face detection image is translated, c1 and c2 are the translation amounts; through the matrix Scale the target face detection image, a1 and b2 are the scaling amounts; through the matrix Rotate the target face detection image, θ is the rotation angle.
[0019] In some embodiments of the present invention, before the step of converting the pixels of the face alignment image into feature vectors to obtain the face feature image, the step further includes:
[0020] Get the values corresponding to all channels of the face alignment image in RGB coordinates, and divide the face alignment image into multiple area blocks;
[0021] Get the mean of the corresponding channels of all regional blocks under RGB coordinates, and subtract the mean of the corresponding channels of the corresponding regional blocks from the values of the three channels corresponding to each pixel of all regional blocks to obtain a new face alignment image.
[0022] In some embodiments of the present invention, the step of judging the similarity of the facial feature image with the facial feature images of all registered users stored in the server uploaded by the facial recognition device one by one, and judging the facial feature image as a registered user if the similarity between the two is lower than a preset threshold, specifically includes:
[0023] By formula The similarity between the facial feature image and the facial feature image of any registered user uploaded by the above-mentioned face recognition device and stored in the server is calculated, where cosθ is the similarity value between the two, is the feature vector corresponding to the face feature image, is the feature vector of the facial feature image of any registered user;
[0024] The obtained cosθ is compared with a preset threshold. If cosθ is less than the preset threshold, the user is determined to be a registered user.
[0025] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory for storing one or more programs; and a processor. When the one or more programs are executed by the processor, the method described in any one of the first aspects is implemented.
[0026] Compared with the prior art, the embodiments of the present invention have at least the following advantages or beneficial effects:
[0027] First, an embodiment of the present invention provides a smart charging pile with a face recognition function. By arranging a face recognition device on the front side of the charging pile body, it can be used to obtain or recognize the user's facial information, thereby realizing the function of controlling the corresponding charging pile equipment. In addition, by arranging a shielding plate on the top of the charging pile body, the charging pile body can be protected from sunlight exposure and rain corrosion, reducing the risk of rust, thereby effectively reducing its aging process. Moreover, since the front end of the shielding plate is higher than the rear end of the shielding plate, the water source falling on the shielding plate will flow along the shielding plate to the rear side of the charging pile body, thereby not only preventing water from accumulating above the shielding plate, but also preventing the water source from being directed to the front side of the charging pile body, thereby affecting its normal operation.
[0028] In addition, an embodiment of the present invention also provides a face recognition control method applied to the above-mentioned smart charging pile. By optimizing the algorithm, the face recognition accuracy of the charging pile can be effectively improved, so that the charging pile can be better operated and the user experience can be enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 This is a structural schematic diagram of an embodiment of a smart charging pile with a face recognition function of the present invention;
[0031] Figure 2 This is a flow chart of an embodiment of a face recognition control method according to an embodiment of the present invention;
[0032] Figure 3 A specific flow chart of the step of comparing the facial information of the current user with the facial information of the registered user collected by the facial recognition device in an embodiment of the present invention;
[0033] Figure 4 A specific flow chart of the steps included before the step of converting the pixel points of the face alignment image into feature vectors to obtain the face feature image in the embodiment of the present invention;
[0034] Figure 5 A structural block diagram of an electronic device provided by an embodiment of the present invention.
[0035] Icons: 1. Charging pile body; 2. Face recognition device; 3. Touch screen; 4. Code scanning device; 5. Charging gun head; 6. Connecting wire; 7. Placement seat; 8. Shielding plate; 9. Suspension part; 10. Limiting part; 11. Support part; 12. Handle; 13. Memory; 14. Processor; 15. Communication interface. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0037] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0039] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0040] Example
[0041] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0042] Please refer to Figure 1An embodiment of the present invention provides an intelligent charging pile with a face recognition function, which includes a charging pile body 1, a face recognition device 2, a touch screen 3 and a code scanning device 4, and also includes a charging gun head 5. The face recognition device 2 and the code scanning device 4 are both arranged on the front side of the charging pile body 1. The charging gun head 5 is connected to the charging pile body 1 through a connecting line 6. A placement seat 7 for placing the charging gun head 5 is provided on the side of the charging pile body 1. The touch screen 3 is arranged on the front side of the charging pile body 1. The face recognition device 2 is arranged on the front side of the charging pile body 1. The face recognition device 2 is used to obtain and identify face data. A shielding plate 8 is provided on the top of the charging pile body 1, and the front end of the shielding plate 8 is higher than the rear end of the shielding plate 8.
[0043] In traditional charging piles, since some elderly people cannot operate mobile phones, they basically choose to charge by swiping cards. However, if the user's charging card is lost, the charging card may be used by other people for consumption, which will cause certain economic losses to the user and cause great trouble to him. In the above embodiment, by setting a face recognition device 2 on the front side of the charging pile body 1, it can be used to obtain or identify the user's facial information, so as to realize the function of controlling the corresponding charging pile equipment. The face recognition device 2 includes a camera for obtaining facial data, and the mirror of the camera can be set flush with the front side surface of the charging pile body 1, so as to avoid the protruding camera from being easily damaged by collision. In addition, by setting a shielding plate 8 on the top of the charging pile body 1, the charging pile body 1 can be protected from sunlight exposure and rain corrosion, reducing the risk of rusting, thereby effectively reducing its aging process. Furthermore, since the front end of the shielding plate 8 is higher than the rear end of the shielding plate 8, the water falling on the shielding plate 8 will flow along the shielding plate 8 to the rear side of the charging pile body 1, thereby not only preventing water from accumulating above the shielding plate 8, but also preventing the water from being directed to the front side of the charging pile body 1, thereby affecting its normal operation.
[0044] Please refer to Figure 1 In some embodiments of the present invention, a hanging member 9 for hanging the connecting line 6 is further included, one end of the hanging member 9 is connected to the side wall of the charging pile body 1, and the other end is provided with a limiting portion 10.
[0045] In the above embodiment, by setting a hanging member 9 on the side wall of the charging pile body 1, it can be used to hang the connecting line 6 of the charging gun head 5, that is to say, the connecting line 6 of the charging gun head 5 can be set longer, so that the electric vehicle can be charged more conveniently, avoiding the phenomenon of being unable or inconvenient to charge because the connecting line 6 is not long enough.
[0046] For example, a movable clamp structure can be provided on the hanging member 9, so that after the connecting wire 6 is hung on the hanging member 9, the connecting wire 6 can be bundled by closing the clamp to prevent it from scattering, and when the connecting wire 6 needs to be removed, the clamp can be opened to quickly remove the connecting wire 6.
[0047] Please refer to Figure 1 In some embodiments of the present invention, a support member 11 is provided at the bottom of the charging pile body 1, and heat dissipation slots are also provided at the bottom and side walls of the charging pile body 1.
[0048] In the above embodiment, by providing heat dissipation notches at the bottom and side walls of the charging pile, the heat generated by the charging pile during operation can be discharged in a timely and effective manner, thereby cooling the charging pile. In addition, by providing a support member 11 at the bottom of the charging pile body 1, the charging pile can be better placed in its working position, and there is a certain space between the bottom of the charging pile body 1 and the ground, so that the heat can be better dissipated.
[0049] For example, the support member 11 can be configured as a retractable structure, so that the charging pile can be placed more stably in the target area. In addition, a fixing hole can be provided at the bottom of the support member 11, and then the support member 11 can be fixed to the ground with a fixing member such as a screw, so that the charging pile can be stably and effectively fixed in its working position to prevent it from shaking around and affecting its normal operation.
[0050] Please refer to Figure 1 In some embodiments of the present invention, the charging gun head 5 is provided with a handle 12 .
[0051] In the above embodiment, the handle 12 is provided on the charging gun head 5 so that the user can operate the charging gun head 5 more conveniently.
[0052] See also Figure 2 The present invention also proposes a face recognition control method. The face recognition control method comprises the following steps:
[0053] Step S101: Acquire the facial information of the current user through the above-mentioned face recognition device 2.
[0054] In the above steps, the facial information of users within the proximity range is obtained by the facial recognition device 2 disposed on the front side of the charging pile body 1, which can provide raw data for subsequent processing.
[0055] Step S102: Compare the facial information of the current user with the facial information of the registered user collected by the above-mentioned face recognition device 2. If the comparison result is a registered user, read the corresponding user information.
[0056] In the above steps, the user registers information in advance using his or her own facial information to generate corresponding registration information. Then, when the subsequent user uses the charging pile again, the facial recognition device 2 can recognize the facial information of the currently collected user, and then compare it with the facial information of all registered users one by one, so as to determine whether the current user is a registered user. If it is a registered user, the corresponding user information can be read, and then it is convenient to respond to the user's subsequent operations.
[0057] See also Figure 3 The step of comparing the facial information of the current user with the facial information of the registered user collected by the facial recognition device 2 specifically includes:
[0058] Step S201: Obtain the face position in the face information of the current user through the face recognition device 2, and obtain a target face detection image.
[0059] In the above steps, the face recognition device 2 obtains the position of the face in the face information of the current user through the target detection algorithm, and obtains the target face detection image, which can provide original data support for subsequent face information judgment and comparison and other processing.
[0060] Exemplarily, the face information contained in the image data collected by the face recognition device 2 can be obtained by using the Viola-Joness algorithm or by directly training a face classifier.
[0061] Step S202: performing face alignment processing on the target face detection image by determining the positions of the calibration points in the face to obtain a face alignment image, wherein the calibration points include the eyes, nose, and both ends of the mouth corners.
[0062] In the above steps, the purpose of face alignment processing is to use one or more groups of reference points located at fixed positions in the image to scale and crop the face image, so as to adjust the face posture to the target posture. By selecting the two ends of the eyes, nose, and mouth corners as calibration points (reference points), the target face detection image can be better affine transformed (that is, the face posture can be better adjusted to the target posture). In other words, through the above processing, the face can be better recognized in the future, thereby effectively improving the subsequent detection accuracy.
[0063] See also Figure 3 The above alignment process includes translation, scaling and rotation through moments, wherein the target face detection image that does not need alignment is processed through the matrix Processing, x, y are the values of the target face detection image at the corresponding position, u, v are the values of the target face detection image at the corresponding position after alignment processing, a1, a2, b1, b2, c1, c2 are the values corresponding to the calibration points in the target face detection image; through the matrix The target face detection image is translated, c1 and c2 are the translation amounts; through the matrix Scale the target face detection image, a1 and b2 are the scaling amounts; through the matrix Rotate the target face detection image, θ is the rotation angle.
[0064] In the above steps, the target face detection image is aligned with an affine transformation through the corresponding matrix, that is, a linear transformation from two-dimensional coordinates to two-dimensional coordinates is performed on it, and the image's flatness and parallelism can be well maintained during the transformation process (the relative position relationship between the straight lines in the image remains unchanged, parallel lines remain parallel lines after affine transformation, and the position order of the points on the straight lines does not change). matrix and matrix The target face detection image is subjected to moment translation, scaling and rotation processing, which can effectively transform it without losing image information, making it easier to process it later.
[0065] For example, the target face detection image may be subjected to affine transformations such as flipping and shearing according to actual needs.
[0066] Step S203: convert the pixels of the face alignment image into feature vectors to obtain a face feature image.
[0067] In the above steps, by converting each pixel of the face alignment image into a compact and discriminable feature vector, it is convenient to perform similarity judgment thereon, that is, it is possible to judge whether the face information therein is that of a registered user.
[0068] Step S204: The facial feature image is judged for similarity one by one with the facial feature images of all registered users uploaded by the above-mentioned face recognition device 2 and stored in the server. If the similarity between the two is lower than a preset threshold, it is judged to be a registered user.
[0069] See also Figure 3 The above-mentioned step of judging the similarity of the facial feature image with the facial feature images of all registered users stored in the server uploaded by the above-mentioned face recognition device 2 one by one, and judging the facial feature image as a registered user if the similarity between the two is lower than a preset threshold, specifically includes:
[0070] By formula The similarity between the facial feature image and the facial feature image of any registered user uploaded by the above-mentioned face recognition device 2 and stored in the server is calculated, where cosθ is the similarity value between the two, is the feature vector corresponding to the face feature image, is the feature vector of the facial feature image of any registered user;
[0071] The obtained cosθ is compared with a preset threshold. If cosθ is less than the preset threshold, the user is determined to be a registered user.
[0072] In the above steps, by obtaining the cosine value cosθ between the feature vector corresponding to the facial feature image and the feature vector of the facial feature image of any registered user, it can be used to determine the distance between the two feature vectors. That is to say, by setting a preset threshold, cosθ is compared with the preset threshold, which can be used to determine the similarity between the two, that is, whether it is a registered user.
[0073] Step S103: In response to the current user's charging request, the charging pile body 1 is controlled to start charging, and after charging is completed, the user information of the current user is updated, and the charging pile body 1 is controlled to stop charging.
[0074] See also Figure 4 , before the step of converting the pixels of the face alignment image into feature vectors to obtain the face feature image, the following steps are also included:
[0075] Step S301: Obtain the values corresponding to all channels of the face alignment image under RGB coordinates, and divide the face alignment image into multiple area blocks;
[0076] Step S302: Obtain the mean of the corresponding channels of all regional blocks under the RGB coordinates, and subtract the mean of the corresponding channel of the corresponding regional block from the value of the three channels corresponding to each pixel of all regional blocks to obtain a new face alignment image.
[0077] In the above steps, by dividing the face image into multiple regional blocks, and then subtracting the mean of the corresponding channel of the corresponding regional block from the value of the three channels corresponding to each pixel of all regional blocks, a new face alignment image that is not affected by illumination can be obtained. In other words, the influence of different illumination on the face alignment image can be avoided, thereby improving its recognition accuracy. The basic principle is to process each pixel accordingly with the help of the information of the neighboring pixels around it, and then obtain the new value corresponding to the pixel to reduce the influence of illumination on it.
[0078] See also Figure 5 , Figure 5A block diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device includes a memory 13, a processor 14 and a communication interface 15, and the memory 13, the processor 14 and the communication interface 15 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The memory 13 can be used to store software programs and modules, such as program instructions / modules corresponding to a face recognition control method provided in an embodiment of the present application. The processor 14 executes various functional applications and data processing by executing software programs and modules stored in the memory 13. The communication interface 15 can be used to communicate signaling or data with other node devices.
[0079] Among them, the memory 13 can be but is not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable read-only memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0080] The processor 14 may be an integrated circuit chip with signal processing capability. The processor 14 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0081] Understandably, Figure 5 The structure shown is for illustration only. The electronic device may also include Figure 5 More or fewer components as shown, or with Figure 5 Different configurations are shown. Figure 5 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0082] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0083] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present application. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A face recognition control method using an intelligent charging pile, characterized in that: The smart charging pile includes a charging pile body, a face recognition device, a touch screen, a code scanning device and a charging gun head; the face recognition device and the code scanning device are both arranged on the front side of the charging pile body, the charging gun head is connected to the charging pile body through a connecting line, a placement seat for placing the charging gun head is arranged on the side of the charging pile body, the touch screen is arranged on the front side of the charging pile body, the face recognition device is arranged on the front side of the charging pile body, the face recognition device is used to obtain and identify face data, and a shielding plate is arranged on the top of the charging pile body, and the front end of the shielding plate is higher than the rear end of the shielding plate; The face recognition control method comprises the following steps: Acquiring facial information of the current user through the facial recognition device; Compare the facial information of the current user with the facial information of the registered user collected by the facial recognition device, and if the comparison result is a registered user, read the corresponding user information; In response to the current user's charging request, the charging pile body is controlled to start charging, and after charging is completed, the user information of the current user is updated, and the charging pile body is controlled to stop charging; Among them, the step of comparing the facial information of the current user with the facial information of the registered user collected by the facial recognition device specifically includes: obtaining the position of the face in the facial information of the current user through the facial recognition device, and obtaining a target face detection image; performing face alignment processing on the target face detection image by determining the position of the calibration points in the face to obtain a face alignment image, wherein the calibration points include the eyes, the nose, and the two ends of the mouth corners; obtaining the values corresponding to all channels of the face alignment image under the RGB coordinates, and dividing the face alignment image into a plurality of regional blocks; obtaining the mean of the corresponding channels of all regional blocks under the RGB coordinates, and subtracting the mean of the corresponding channels of the corresponding regional blocks from the values of the three channels corresponding to each pixel of all regional blocks to obtain a new face alignment image; converting the pixel points of the face alignment image into feature vectors to obtain a face feature image; performing similarity judgment one by one between the face feature image and the face feature images of all registered users uploaded by the face recognition device and stored in the server, and if the similarity between the two is lower than a preset threshold, it is judged as a registered user; The alignment process includes processing by matrix translation, scaling and rotation, wherein the target face detection image that does not need to be aligned is processed by matrix Processing, x, y are the values of the target face detection image at the corresponding position, u, v are the values of the target face detection image at the corresponding position after alignment processing, a1, a2, b1, b2, c1, c2 are the values corresponding to the calibration points in the target face detection image; through the matrix The target face detection image is translated, c1 and c2 are the translation amounts; through the matrix Scale the target face detection image, a1 and b2 are the scaling amounts; through the matrix Rotate the target face detection image, θ is the rotation angle; The step of judging the similarity of the facial feature image with the facial feature images of all registered users stored in the server uploaded by the facial recognition device one by one, and judging the facial feature image as a registered user if the similarity between the two is lower than a preset threshold, specifically includes: The similarity between the facial feature image and the facial feature image of any registered user uploaded by the facial recognition device and stored in the server is calculated, where cosθ is the similarity value between the two. is the feature vector corresponding to the face feature image, is the feature vector of the facial feature image of any registered user; the obtained cosθ is compared with the preset threshold, and if cosθ is less than the preset threshold, it is judged to be a registered user.
2. An electronic device, characterized in that: include: A memory for storing one or more programs; processor; When the one or more programs are executed by the processor, the method according to claim 1 is implemented.
