Facial recognition detection method and system for health monitor

By dividing facial images into N×N pixel sub-regions in a health monitor, calculating grayscale changes to generate contour curves and construct vectors, and combining this with cosine similarity calculation, the problem of accurate identity recognition in multi-user shared scenarios is solved, achieving precise binding of facial recognition and data reliability.

CN121884409APending Publication Date: 2026-04-17KASHGAR ELECTRONIC INFORMATION IND TECH RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing health monitoring devices lack effective user identification and binding mechanisms in multi-user shared scenarios, resulting in a mismatch between detection data and user identities. Furthermore, facial recognition technology is susceptible to environmental interference, leading to a decrease in the accuracy of identity recognition and affecting data reliability.

Method used

By dividing facial images into N×N pixel sub-regions, calculating multi-directional grayscale variation values ​​to filter boundary regions, generating contour curves and constructing vectors, and combining cosine similarity calculations to achieve accurate feature matching, reducing interference from environmental factors and ensuring the accuracy of identity recognition.

Benefits of technology

It improves the accuracy and anti-interference ability of health monitoring devices in multi-user scenarios, ensures that detection data is accurately bound to user identity, and enhances the user experience and data reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121884409A_ABST
    Figure CN121884409A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of face recognition, and particularly discloses a face recognition detection method for a health monitor, which comprises the following steps: S1, dividing a face picture into sub-regions, calculating a gray value mean value in the sub-regions, and screening boundary regions based on the mean value; s2, establishing a rectangular coordinate system, and generating a contour curve according to coordinate points corresponding to the boundary region; s3, acquiring a main calibration point and an auxiliary calibration point, and generating a class of vectors based on the main calibration point and the auxiliary calibration point; and S4, generating a first-class vector corresponding to the face image of the database, recording the first-class vector as a second-class vector, calculating the cosine similarity between the first-class vector and the second-class vector, and taking a mean value for analysis. According to the vector cosine similarity recognition method provided by the scheme, the problem of data confusion is solved by extracting facial contour features, resisting interference of illumination, postures and the like, improving the recognition accuracy, guaranteeing binding of detection data and a user and adapting to the computing power of portable equipment, and support is provided for one person to one level in health monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of facial recognition technology, and more specifically to a facial recognition detection method and system for a health monitoring device. Background Technology

[0002] With the popularization of health management awareness and the rapid development of portable medical devices, health monitors have gradually entered home life and community medical scenarios, becoming an important tool for users to monitor their physiological status in real time. Currently, most mainstream health monitors have multiple detection functions such as heart rate, blood oxygen saturation, and skin condition. However, most devices lack effective user identification and binding mechanisms. In scenarios shared by multiple users, mismatches between detection data and user identities are prone to occur, leading to health data confusion, difficulties in tracing historical records, and an inability to achieve personalized health management for each individual. To address this pain point, some manufacturers have begun to introduce facial recognition technology into health monitors, using the uniqueness of biometric features to quickly confirm user identity and provide a basic guarantee for data ownership.

[0003] However, the application of facial recognition technology in health monitoring devices still has significant shortcomings, becoming a key bottleneck restricting the accuracy of user identification. Facial recognition is susceptible to external environmental interference; factors such as changes in lighting, facial occlusion, and pose shifts can lead to a decrease in accuracy. Relying solely on traditional facial recognition solutions may result in misclassification of detection data, further affecting data reliability. Therefore, optimizing facial recognition algorithms to reduce identification errors caused by environmental interference, ensuring accurate binding of user identity with detection data, and avoiding data confusion have become crucial issues that urgently need to be addressed in the development of current health monitoring device technology. Summary of the Invention

[0004] The purpose of this invention is to provide a facial recognition detection method and system for health monitoring devices, thereby solving the above-mentioned technical problems.

[0005] The objective of this invention can be achieved through the following technical solutions: A facial recognition detection method for a health monitoring device includes the following steps: S1: Capture a picture of the user's face, divide the face picture into several N×N pixel sub-regions, where N represents the preset number of pixels, obtain the grayscale value of each pixel in the sub-region and calculate the mean G, and the method for filtering the boundary region based on the mean G includes: Take any sub-region as the judgment region, and calculate the gray change value above the judgment region B_up=G_up / G_mid, where G_mid represents the average gray value of the judgment region, and G_up represents the average gray value of the adjacent sub-regions above the judgment region. Similarly, calculate the grayscale change values ​​B_down, B_left, and B_right in the remaining three directions. Set a judgment threshold b. If there is a grayscale change value greater than or equal to the judgment threshold b, the judgment area is recorded as the boundary area. S2: Establish a Cartesian coordinate system, with the width of the facial image as the X-axis and the length as the Y-axis, and N pixels as one unit length. Generate the coordinate points corresponding to the boundary region. If the distance between coordinate points s ≤ Each unit length is connected in pairs to generate a contour curve; S3: After scaling the contour curve proportionally to the preset size, perform the following steps: Find the center point of the contour curve with the largest area, and denote it as the primary coordinate point R. Denote the center points of the remaining contour curves as secondary coordinate points r. Generate a class of vectors with the primary coordinate point R as the starting point and the secondary coordinate point r as the ending point. Repeat the above steps to generate all vectors of the same class; S4: Repeat the above operation to generate a first-class vector from the facial images in the database, denoted as the second-class vector. Calculate the cosine similarity between the first-class vector and the second-class vector in turn, and calculate the mean of the cosine similarity. The facial image in the database corresponding to the maximum mean is the current user.

[0006] As a further aspect of the present invention: in step S1, when dividing the sub-regions, if the remaining pixels of the facial image do not meet the N×N specification of the sub-region, they are recorded as invalid regions, and the invalid regions are removed and not included in subsequent steps.

[0007] As a further aspect of the present invention: in step S1, the ambient light intensity L when the user's facial image is captured is obtained, and the light intensity Lx is preset. If the ambient light intensity L is less than the preset light intensity Lx, the auxiliary light is turned on to make the ambient light intensity equal to Lx. If the ambient light intensity L is greater than the preset illumination intensity Lx, the grayscale value of the facial image will be reduced to Lx / L of the original grayscale value.

[0008] As a further aspect of the present invention: in step S4, the number of first-class vectors M1 and the number of second-class vectors M2 are obtained. If M1≠M2, the corresponding facial images in the database are directly removed and do not participate in the subsequent steps of calculating cosine similarity.

[0009] As a further aspect of the present invention: in step S4, when there are cases where the mean cosine similarity values ​​are equal, the overlap length of the contour curves is compared, and the facial image in the database with the longer overlap length is the current user.

[0010] As a further aspect of the present invention: in step S1, when the number of vectors of a certain type is less than a preset comparison threshold, the face recognition is stopped and the user is prompted to retake the face image.

[0011] As a further aspect of the present invention: in step S1, if the number of grayscale change values ​​corresponding to the judgment area is less than 4, the judgment area is excluded and does not participate in the subsequent screening of boundary areas.

[0012] A facial recognition detection system for a health monitoring device includes: Preprocessing module: Captures a user's facial image, divides the image into several N×N pixel sub-regions, where N represents the preset number of pixels, obtains the grayscale value of each pixel in the sub-region and calculates the mean G, and uses the mean G to filter boundary regions. Take any sub-region as the judgment region, and calculate the gray change value above the judgment region B_up=G_up / G_mid, where G_mid represents the average gray value of the judgment region, and G_up represents the average gray value of the adjacent sub-regions above the judgment region. Similarly, calculate the grayscale change values ​​B_down, B_left, and B_right in the remaining three directions. Set a judgment threshold b. If there is a grayscale change value greater than or equal to the judgment threshold b, the judgment area is recorded as the boundary area. Curves module: Establishes a Cartesian coordinate system, with the width of the face image as the X-axis and the length as the Y-axis, and N pixels as one unit length, generating coordinate points corresponding to the boundary region. If the distance s between coordinate points ≤ Each unit length is connected in pairs to generate a contour curve; Vector module: After scaling the contour curve to a preset size proportionally, perform the following steps: Find the center point of the contour curve with the largest area, and denote it as the primary coordinate point R. Denote the center points of the remaining contour curves as secondary coordinate points r. Generate a class of vectors with the primary coordinate point R as the starting point and the secondary coordinate point r as the ending point. Repeat the above steps to generate all vectors of the same class; Recognition Module: Repeat the above operations to generate a first-class vector from the facial images in the database, denoted as the second-class vector. Calculate the cosine similarity between the first-class vector and the second-class vector, and calculate the mean of the cosine similarity. The facial image in the database corresponding to the maximum mean is the current user.

[0013] The beneficial effects of this invention are as follows: The identity recognition method proposed in this solution, based on the grayscale features of facial sub-regions and the cosine similarity of vectors, is suitable for multi-user scenarios of health monitoring devices. It combines recognition accuracy with anti-interference capabilities. By dividing the facial image into N×N pixel sub-regions and calculating multi-directional grayscale change values ​​to filter boundary areas, it accurately captures facial contour features, effectively reducing interference from environmental factors such as illumination changes and pose shifts, and avoiding the problem of inaccurate feature extraction in traditional recognition. After generating a contour curve based on the connection of coordinate points, a vector is constructed using primary and secondary calibration points. Combined with cosine similarity calculation, accurate feature matching is achieved, significantly improving the accuracy of identity recognition and ensuring that the detection data is accurately bound to the user's identity.

[0014] Meanwhile, the solution's computational logic is simple and efficient, requiring no complex preprocessing or massive parameter calculations. It is compatible with the hardware performance of portable health monitors, enabling rapid identity verification without adding extra burden to the device's operation. Its core advantage lies in its dual optimization of grayscale features and vector matching, which solves the data confusion problem in multi-user scenarios from the source, providing reliable identity binding for one-person-one-file health monitoring, and significantly improving the device's user experience and data reliability. Attached Figure Description

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

[0016] Figure 1 This is a flowchart illustrating a facial recognition detection method for a health monitoring device according to the present invention. Detailed Implementation

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

[0018] Please see Figure 1 As shown, the present invention is a facial recognition detection method for a health monitoring device, comprising: S1: Capture a picture of the user's face, divide the face picture into several N×N pixel sub-regions, where N represents the preset number of pixels, obtain the grayscale value of each pixel in the sub-region and calculate the mean G, and the method for filtering the boundary region based on the mean G includes: Take any sub-region as the judgment region, and calculate the gray change value above the judgment region B_up=G_up / G_mid, where G_mid represents the average gray value of the judgment region, and G_up represents the average gray value of the adjacent sub-regions above the judgment region. Similarly, calculate the grayscale change values ​​B_down, B_left, and B_right in the remaining three directions. Set a judgment threshold b. If there is a grayscale change value greater than or equal to the judgment threshold b, the judgment area is recorded as the boundary area. S2: Establish a Cartesian coordinate system, with the width of the facial image as the X-axis and the length as the Y-axis, and N pixels as one unit length. Generate the coordinate points corresponding to the boundary region. If the distance between coordinate points s ≤ Each unit length is connected in pairs to generate a contour curve; S3: After scaling the contour curve proportionally to the preset size, perform the following steps: Find the center point of the contour curve with the largest area, and denote it as the primary coordinate point R. Denote the center points of the remaining contour curves as secondary coordinate points r. Generate a class of vectors with the primary coordinate point R as the starting point and the secondary coordinate point r as the ending point. Repeat the above steps to generate all vectors of the same class; S4: Repeat the above operation to generate a first-class vector from the facial images in the database, denoted as the second-class vector. Calculate the cosine similarity between the first-class vector and the second-class vector in turn, and calculate the mean of the cosine similarity. The facial image in the database corresponding to the maximum mean is the current user.

[0019] It should be noted that, firstly, the image acquisition module of the health monitor captures a clear image of the user's face, ensuring that the user's face is not significantly obstructed during the shooting process, and that the lighting is uniform and without strong reflections, thus avoiding errors in subsequent feature extraction due to poor shooting conditions. After the shooting is completed, the acquired facial image is preprocessed to remove redundant background information and retain only the core facial area, laying the foundation for subsequent sub-region segmentation.

[0020] Subsequently, the preprocessed facial core area is evenly divided into several square sub-regions of the same size. The side length of each sub-region corresponds to a preset number of pixels. This preset number needs to be reasonably set according to the hardware resolution and recognition accuracy requirements of the health monitor, ensuring that the sub-regions can accurately capture local facial features while avoiding redundant computation or feature fragmentation due to excessively small sub-regions. After the division is completed, the grayscale values ​​of all pixels in each sub-region are extracted one by one. The mean grayscale value of each sub-region is calculated using the arithmetic mean method, and this mean is used as the core feature parameter of that sub-region. The calculation of the mean must ensure that it covers all pixels in the sub-region without missing any valid data.

[0021] Based on the average grayscale value of each sub-region, the boundary region filtering process is initiated. During filtering, an arbitrary sub-region is selected as the region to be judged. First, the adjacent sub-region directly above the region to be judged is found, and the average grayscale value of the two regions is retrieved. The grayscale change value in the upward direction is calculated by the ratio of the two values. Using the same method, the grayscale change values ​​of the adjacent sub-regions directly below, to the left, and to the right of the region to be judged are calculated sequentially to ensure that the adjacent sub-regions in the four directions are accurately found and there are no mismatches.

[0022] Simultaneously, a reasonable grayscale change judgment threshold needs to be pre-set based on the statistical results of a large amount of facial sample data. This threshold needs to be calibrated through multiple tests to effectively distinguish significant grayscale differences at the facial contours, while avoiding missed detections of boundary areas due to an excessively high threshold and misjudgments of irrelevant areas due to an excessively low threshold. For each judgment area, if the grayscale change value in any of its four directions reaches or exceeds the preset judgment threshold, the area is determined to be a boundary area of ​​the face.

[0023] Throughout the process, it is important to ensure that the sub-region division remains complete and continuous, without overlap or omission; the collection of grayscale values ​​and the calculation of the mean must strictly follow a unified standard to ensure data accuracy; and the matching of adjacent sub-regions must accurately correspond to the direction to avoid affecting the calculation results of grayscale change values ​​due to directional confusion.

[0024] After completing the boundary region selection, the process of building a Cartesian coordinate system begins. The width of the preprocessed facial image is used as the horizontal coordinate axis, and the length as the vertical coordinate axis. The origin is set at the top left corner of the image to ensure a precise correspondence between the coordinate system and the spatial position of the facial region. Simultaneously, the coordinate unit length is clearly defined, using the number of pixels corresponding to the side length of the previously divided sub-regions as a unit length. This ensures that the coordinate values ​​directly reflect the actual position of the boundary region in the facial image, avoiding errors caused by unit conversion. Based on this coordinate system, the geometric center of each boundary region is extracted one by one. Its corresponding horizontal and vertical coordinates are combined to generate a unique coordinate point for each boundary region. The coordinate point calculation must be accurate to one decimal place to ensure the accuracy of the position representation.

[0025] Iterate through all the coordinate points corresponding to the boundary regions, calculate the straight-line distance between any two coordinate points, and connect the two coordinate points directly if the distance is less than or equal to two units. Following this rule, connect all coordinate points that meet the conditions sequentially, ultimately forming a continuous closed facial contour curve. During the connection process, it is important to follow the actual distribution order of the coordinate points on the face to avoid overlapping connections or breakpoints, ensuring that the contour curve accurately reproduces the key facial contour features.

[0026] After the contour curves are generated, they are scaled up proportionally according to a preset uniform size standard. During the scaling process, the shape of the curves and the relative positions of each coordinate point must remain unchanged to ensure the comparability of contour curves for different users. After scaling, the area enclosed by each contour curve is calculated, and the contour curve with the largest area is selected, with its geometric center point designated as the primary calibration point; the geometric center points of the remaining contour curves are used as secondary calibration points. Starting from the primary calibration point, feature vectors are constructed sequentially with each secondary calibration point as the endpoint. Each vector must completely record the coordinate difference between the starting and ending points to ensure that the vector can represent the positional relationship between the primary and secondary calibration points, until all feature vectors are generated.

[0027] For all user facial images stored in the database, repeat the complete operations of coordinate construction, contour generation, and vector construction to obtain the feature vector set corresponding to each user. Compare the current user's feature vector set with the feature vector sets of all users in the database one by one, calculate the cosine similarity of corresponding vectors in the two sets, and then take the arithmetic mean of all similarity results. Compare the mean similarity of all users, and determine the user with the highest mean as the current matching target.

[0028] In another preferred embodiment of the present invention, when dividing the sub-regions, if the remaining pixels of the facial image do not meet the N×N specification of the sub-region, they are recorded as invalid regions and removed from the subsequent steps.

[0029] It is worth noting that if, when dividing to the edge, the remaining pixels cannot form a complete sub-region of the preset size, this part of the region is directly recorded as an invalid region. To avoid invalid data interfering with subsequent analysis, all invalid regions need to be removed uniformly, and only complete valid sub-regions are retained for grayscale mean calculation and subsequent boundary region screening processes.

[0030] In another preferred embodiment of the present invention, the ambient light intensity L is obtained when the user's facial image is captured, and the light intensity Lx is preset. If the ambient light intensity L is less than the preset light intensity Lx, the auxiliary light is turned on to make the ambient light intensity equal to Lx. If the ambient light intensity L is greater than the preset illumination intensity Lx, the grayscale value of the facial image will be reduced to Lx / L of the original grayscale value.

[0031] Understandably, supplemental lighting or grayscale calibration is used to bring facial images under a uniform lighting standard. This avoids feature blurring caused by low light and prevents detail loss caused by strong light, ensuring that the average grayscale value of sub-regions reflects the true facial features and improving the stability and accuracy of identity recognition.

[0032] In another preferred embodiment of the present invention, the number of first-class vectors M1 and the number of second-class vectors M2 are obtained. If M1≠M2, the corresponding facial images in the database are directly removed and do not participate in the subsequent cosine similarity calculation step.

[0033] It is important to note that database images with mismatched feature dimensions can be pre-filtered to avoid distortion in similarity calculations due to differences in vector counts. Only samples with the same number of vectors as the current user are retained for comparison, avoiding recognition errors caused by inconsistent dimensions and further ensuring the accuracy of identity matching results.

[0034] In another preferred embodiment of the present invention, when there are cases where the mean cosine similarity values ​​are equal, the overlap length of the contour curves is compared, and the facial image in the database with the longer overlap length is the current user.

[0035] It should be noted that to resolve the ambiguity in identity matching when the mean cosine similarity is equal, a secondary verification dimension of the overlap length of contour curves is added to further refine the feature matching criteria. Relying on the unique characteristics of facial contours, the accuracy of identity recognition is improved, avoiding misjudgments caused by the convergence of feature vector means, and providing dual protection for identity verification in multi-user shared scenarios.

[0036] In another preferred embodiment of the present invention, when the number of vectors of a certain type is less than a preset comparison threshold, the face recognition is stopped and the user is prompted to retake the face image.

[0037] It is understandable that filtering out invalid recognition samples with insufficient feature vectors is necessary to avoid matching errors caused by incomplete facial feature extraction.

[0038] In another preferred embodiment of the present invention, if the number of grayscale change values ​​corresponding to the judgment area is less than 4, the judgment area is excluded and does not participate in the subsequent screening of boundary areas.

[0039] It is worth noting that the system effectively filters out regions at the edges of the face that do not have complete four-way adjacent sub-regions, thus avoiding boundary misjudgments caused by missing dimensions of grayscale change values.

[0040] A facial recognition detection system for a health monitoring device includes: Preprocessing module: Captures a user's facial image, divides the image into several N×N pixel sub-regions, where N represents the preset number of pixels, obtains the grayscale value of each pixel in the sub-region and calculates the mean G, and uses the mean G to filter boundary regions. Take any sub-region as the judgment region, and calculate the gray change value above the judgment region B_up=G_up / G_mid, where G_mid represents the average gray value of the judgment region, and G_up represents the average gray value of the adjacent sub-regions above the judgment region. Similarly, calculate the grayscale change values ​​B_down, B_left, and B_right in the remaining three directions. Set a judgment threshold b. If there is a grayscale change value greater than or equal to the judgment threshold b, the judgment area is recorded as the boundary area. Curves module: Establishes a Cartesian coordinate system, with the width of the face image as the X-axis and the length as the Y-axis, and N pixels as one unit length, generating coordinate points corresponding to the boundary region. If the distance s between coordinate points ≤ Each unit length is connected in pairs to generate a contour curve; Vector module: After scaling the contour curve to a preset size proportionally, perform the following steps: Find the center point of the contour curve with the largest area, and denote it as the primary coordinate point R. Denote the center points of the remaining contour curves as secondary coordinate points r. Generate a class of vectors with the primary coordinate point R as the starting point and the secondary coordinate point r as the ending point. Repeat the above steps to generate all vectors of the same class; Recognition Module: Repeat the above operations to generate a first-class vector from the facial images in the database, denoted as the second-class vector. Calculate the cosine similarity between the first-class vector and the second-class vector, and calculate the mean of the cosine similarity. The facial image in the database corresponding to the maximum mean is the current user.

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

Claims

1. A facial recognition detection method for a health monitoring device, characterized in that, Includes the following steps: S1: Capture a picture of the user's face, divide the face picture into several N×N pixel sub-regions, where N represents the preset number of pixels, obtain the grayscale value of each pixel in the sub-region and calculate the mean G, and the method for filtering the boundary region based on the mean G includes: Take any sub-region as the judgment region, and calculate the gray change value above the judgment region B_up=G_up / G_mid, where G_mid represents the average gray value of the judgment region, and G_up represents the average gray value of the adjacent sub-regions above the judgment region; Similarly, calculate the grayscale change values ​​B_down, B_left, and B_right in the remaining three directions. Set a pre-defined judgment threshold b. If there is a grayscale change value greater than or equal to the judgment threshold b, the judgment area is recorded as the boundary area. S2: Establish a Cartesian coordinate system, with the width of the facial image as the X-axis and the length as the Y-axis, and N pixels as one unit length. Generate the coordinate points corresponding to the boundary region. If the distance between coordinate points s ≤ Each unit length is then connected in pairs to generate a contour curve; S3: After scaling the contour curve proportionally to the preset size, perform the following steps: Find the center point of the contour curve with the largest area, and denote it as the primary coordinate point R. Denote the center points of the remaining contour curves as secondary coordinate points r. Generate a class of vectors with the primary coordinate point R as the starting point and the secondary coordinate point r as the ending point. Repeat the above steps to generate all vectors of the same class; S4: Repeat the above operation to generate a first-class vector from the facial images in the database, denoted as the second-class vector. Calculate the cosine similarity between the first-class vector and the second-class vector in turn, and calculate the mean of the cosine similarity. The facial image in the database corresponding to the maximum mean is the current user.

2. The facial recognition detection method for a health monitoring device according to claim 1, characterized in that, In step S1, when dividing the sub-regions, if the remaining pixels of the facial image do not meet the N×N specification of the sub-region, they are recorded as invalid regions and removed from subsequent steps.

3. The facial recognition detection method for a health monitoring device according to claim 1, characterized in that, In step S1, the ambient light intensity L is obtained when the user's face image is captured, and the light intensity Lx is preset. If the ambient light intensity L is less than the preset light intensity Lx, the auxiliary light is turned on to make the ambient light intensity equal to Lx. If the ambient light intensity L is greater than the preset illumination intensity Lx, the grayscale value of the facial image will be reduced to Lx / L of the original grayscale value.

4. The facial recognition detection method for a health monitoring device according to claim 1, characterized in that, In step S4, the number of vectors of class I, M1, and the number of vectors of class II, M2 are obtained. If M1 ≠ M2, the corresponding facial images in the database are directly removed and do not participate in the subsequent calculation of cosine similarity.

5. The facial recognition detection method for a health monitoring device according to claim 1, characterized in that, In step S4, when there are cases where the mean cosine similarity values ​​are equal, the overlap length of the contour curves is compared, and the facial image in the database with the longer overlap length is the current user.

6. The facial recognition detection method for a health monitoring device according to claim 1, characterized in that, In step S1, when the number of vectors of a certain type is less than a preset comparison threshold, the face recognition is stopped and the user is prompted to retake a face image.

7. The facial recognition detection method for a health monitoring device according to claim 1, characterized in that, In step S1, if the number of grayscale change values ​​corresponding to the judgment area is less than 4, the judgment area is removed and does not participate in the subsequent selection of boundary areas.

8. A facial recognition detection system for a health monitoring device, characterized in that, include: Preprocessing module: Captures a user's facial image, divides the image into several N×N pixel sub-regions, where N represents the preset number of pixels, obtains the grayscale value of each pixel in the sub-region and calculates the mean G, and uses the mean G to filter boundary regions. Take any sub-region as the judgment region, and calculate the gray change value above the judgment region B_up=G_up / G_mid, where G_mid represents the average gray value of the judgment region, and G_up represents the average gray value of the adjacent sub-regions above the judgment region; Similarly, calculate the grayscale change values ​​B_down, B_left, and B_right in the remaining three directions. Set a pre-defined judgment threshold b. If there is a grayscale change value greater than or equal to the judgment threshold b, the judgment area is recorded as the boundary area. Curves module: Establishes a Cartesian coordinate system, with the width of the face image as the X-axis and the length as the Y-axis, and N pixels as one unit length, generating coordinate points corresponding to the boundary region. If the distance s between coordinate points ≤ Each unit length is then connected in pairs to generate a contour curve; Vector module: After scaling the contour curve to a preset size proportionally, perform the following steps: Find the center point of the contour curve with the largest area, and denote it as the primary coordinate point R. Denote the center points of the remaining contour curves as secondary coordinate points r. Generate a class of vectors with the primary coordinate point R as the starting point and the secondary coordinate point r as the ending point. Repeat the above steps to generate all vectors of the same class; Recognition Module: Repeat the above operations to generate a first-class vector from the facial images in the database, denoted as the second-class vector. Calculate the cosine similarity between the first-class vector and the second-class vector, and calculate the mean of the cosine similarity. The facial image in the database corresponding to the maximum mean is the current user.