Heart rate measurement stabilization method, device and equipment based on facial image processing
By using facial image processing technology and combining the depth calculation model to correct the forehead position, the problem of large forehead position tracking errors in the existing technology is solved, and the accuracy and adaptability of heart rate measurement are improved.
Patent Information
- Application Number
- CN202410881480.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-07-03
AI Technical Summary
Existing non-contact heart rate measurement methods based on PPG have large forehead position tracking errors when faced with rapid movements, severe illumination changes, or occlusion, resulting in low heart rate measurement accuracy.
A method based on facial image processing is used to obtain real-time images for face detection and tracking, and the depth calculation model is used to correct the forehead position and determine the target forehead position information for heart rate analysis.
It improves the accuracy of heart rate measurement and reduces the positioning error of the forehead area. It is adaptable to different angles and expression changes, and provides more stable PPG signal collection.
Smart Images

Figure CN118411751B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent nursing technology, and in particular to a heart rate measurement stabilization method, device and equipment based on facial image processing. Background Art
[0002] With the development and popularization of computer technology, more and more computer theories are applied to various aspects such as medical diagnosis and daily health monitoring, playing a powerful auxiliary role. Heart rate is one of the indicators reflecting the health status of the human body and one of the most basic physiological indicators for judging cardiovascular disease.
[0003] Heart rate analysis methods are divided into contact measurement and non-contact measurement according to whether they are in contact with the person being tested. Non-contact methods can be roughly divided into electromagnetic detection methods, detection methods based on ultrasonic Doppler, and detection methods based on PPG. The detection method based on PPG has achieved good results in laboratory environments. Its detection principle is: when light passes through skin tissue and then reflects to the photosensitive sensor, the light has a certain attenuation. The absorption of light by muscles, bones, veins and other connecting tissues is basically unchanged, because there is no large-scale movement in the measurement site, but blood is different. Since the blood flows faster in the artery, the absorption of light naturally changes. When the light is converted into an electrical signal, it is precisely because the absorption of light by the artery changes while the absorption of light by other tissues remains basically unchanged. The obtained signal can be divided into a DC signal and an AC signal. Extracting the AC signal can reflect the characteristics of blood flow, thereby realizing heart rate analysis. The forehead area is generally used as the target area for heart rate analysis, mainly because the skin here is thin and rich in blood vessels, which enables photoplethysmography (PPG) to more effectively detect changes in blood flow. Compared with other parts of the body, the forehead is less affected by motion interference, the skin is relatively smooth, and can provide more stable and accurate signals. In addition, the arterial blood flow on the forehead is closer to the heart, which can more directly reflect the rhythm and intensity of the heartbeat, thereby providing accurate measurement of the heart rate.
[0004] The existing Chinese patent CN112233813A discloses a PPG-based non-contact non-invasive heart rate and breathing measurement method and system, which includes the following steps: step one: image acquisition, step two: acquisition of region of interest ROI, step three: ICA and consistency analysis, step four: change signal acquisition, step five: Gaussian filtering and multi-scale analysis, step six: fast Fourier transform. The Adaboost facial detection algorithm is used to detect the face area of the first frame, and the forehead part is extracted as the ROI area in the facial area. The method combining Mean-Shift and Kalman filtering is used to track the feature area. Although the above patent discloses measuring the heart rate and breathing through the forehead part of the face, and also discloses continuous tracking of the forehead area through filtering processing, the tracking solution combining Mean-Shift and Kalman filtering is insufficient in adaptability and accuracy in the face of fast movements, drastic lighting changes or occlusion. Although Mean-Shift can perform stable target tracking based on color histograms and Kalman filtering can predict the target position, this combination still lacks processing of depth information and has a weak response capability to complex deformations, resulting in tracking errors.
[0005] Therefore, how to stabilize the forehead position, reduce the tracking error in the forehead area, and improve the accuracy of heart rate measurement is an urgent problem to be solved. Summary of the invention
[0006] In view of this, the present invention provides a heart rate measurement stabilization method, device and equipment based on facial image processing, which are used to solve the problems of large forehead area tracking error and low heart rate measurement accuracy in the prior art.
[0007] The technical solution adopted by the present invention is:
[0008] In a first aspect, the present invention provides a heart rate measurement stabilization method based on facial image processing, the method comprising:
[0009] Obtain real-time images containing human faces in nursing scenarios;
[0010] Performing face detection and face tracking on the real-time image to determine initial forehead position information and facial key point position information;
[0011] Determine reference point position information and reference point depth information based on the facial key point position information and a preset depth calculation model;
[0012] Correcting the initial forehead position information according to the reference point position information and the reference point depth information to determine the target forehead position information;
[0013] Based on the target forehead position information, a heart rate analysis is performed on the forehead area to determine the heart rate of the subject to be measured.
[0014] Preferably, the performing face detection and face tracking on the real-time image to determine the initial forehead position information and the face key point position information comprises:
[0015] Input the real-time image into a pre-trained face detection model, and output the face frame position information and the face key point position information;
[0016] Using a preset target tracking algorithm, the face frame position information in each frame of real-time image is tracked to output a face frame position sequence;
[0017] The face frame position sequence is calculated to determine the initial forehead position information in each frame of real-time image.
[0018] Preferably, the determining of the reference point position information and the reference point depth information based on the facial key point position information and in combination with a preset depth calculation model comprises:
[0019] Obtain the nose key point position information and the mouth key point position information in the face key point position information;
[0020] Determine the reference point position information according to the nose key point position information and the mouth key point position information;
[0021] Input the real-time image into the depth calculation model, and output the depth information of the key points of the nose and the mouth;
[0022] The reference point depth information is determined based on the nose key point depth information and the mouth key point depth information.
[0023] Preferably, the correcting the initial forehead position information based on the reference point position information and the reference point depth information to determine the target forehead position information includes:
[0024] Acquire a first image and a second image adjacent to each other in a real-time image;
[0025] Determine the displacement and depth change of the reference point in adjacent frame images based on the first reference point position information and the first reference point depth information in the first image and in combination with the second reference point position information and the second reference point depth information in the second image;
[0026] Determining the face state according to the displacement and the depth change, and determining a determination result;
[0027] According to the determination result, if it is determined that the human face is deformed, the initial forehead position information is corrected to determine the target forehead position information;
[0028] If it is determined that the human face has not been deformed, the initial forehead position information is directly used as the target forehead position information.
[0029] Preferably, judging the face state based on the displacement and the depth change, and determining the judgment result includes:
[0030] Obtaining a preset displacement change threshold and depth change threshold;
[0031] If the displacement is less than the displacement change threshold and the depth change is less than the depth change threshold, then the determination result is that the face is not deformed;
[0032] If the displacement is greater than or equal to the displacement change threshold and / or the depth change is greater than or equal to the depth change threshold, then the determination result is that the face is deformed.
[0033] Preferably, according to the determination result, if it is determined that the human face is deformed, the initial forehead position information is corrected, and the target forehead position information is determined, including:
[0034] Determining a depth change ratio according to the first reference point depth information and the second reference point depth information;
[0035] If it is determined that the face is deformed, the face deformation is classified to determine the deformation category;
[0036] According to the deformation type, combined with the depth change ratio and the displacement, the initial forehead position information is corrected to determine the target forehead position information.
[0037] Preferably, the correcting the initial forehead position information based on the deformation type, in combination with the depth change ratio and the displacement, and determining the target forehead position information includes:
[0038] According to the deformation category, if the displacement is less than the displacement change threshold and the depth change is greater than or equal to the depth change threshold, the target forehead position information is calculated by using the depth change ratio and the initial forehead position information;
[0039] If the displacement is greater than or equal to the displacement change threshold and the depth change is less than the depth change threshold, the target forehead position information is calculated by using the displacement and the initial forehead position information;
[0040] If the displacement is greater than or equal to the displacement change threshold and the depth change is greater than or equal to the depth change threshold, the target forehead position information is calculated through the displacement, the depth change ratio and the initial forehead position information.
[0041] In a second aspect, the present invention provides a heart rate measurement stabilization device based on facial image processing, the device comprising:
[0042] An image acquisition module is used to acquire real-time images containing human faces in nursing scenarios;
[0043] A face detection and tracking module, used to perform face detection and face tracking on the real-time image, and determine initial forehead position information and face key point position information;
[0044] A reference point information acquisition module, used to determine reference point position information and reference point depth information based on the facial key point position information and in combination with a preset depth calculation model;
[0045] A position correction module, used to correct the initial forehead position information according to the reference point position information and the reference point depth information, and determine the target forehead position information;
[0046] The heart rate analysis module is used to perform heart rate analysis on the forehead area according to the target forehead position information to determine the heart rate of the subject to be measured.
[0047] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method of the first aspect in the above-mentioned embodiment.
[0048] In a fourth aspect, an embodiment of the present invention further provides a storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the method of the first aspect in the above-mentioned embodiment is implemented.
[0049] In summary, the beneficial effects of the present invention are as follows:
[0050] The present invention provides a heart rate measurement stabilization method, device and equipment based on facial image processing, the method comprising: obtaining a real-time image containing a face in a nursing scene; performing face detection and face tracking on the real-time image to determine the initial forehead position information and the face key point position information; according to the face key point position information, combined with a preset depth calculation model, determining the reference point position information and the reference point depth information; according to the reference point position information and the reference point depth information, correcting the initial forehead position information to determine the target forehead position information; according to the target forehead position information, performing heart rate analysis on the forehead area to determine the heart rate of the object to be measured. The present invention greatly improves the measurement accuracy and reduces the positioning error of the forehead area by stabilizing the heart rate measurement. First, the initial forehead position and the face key points are quickly determined through real-time image acquisition and efficient face detection and tracking technology, which provides a basic spatial positioning for heart rate measurement. Secondly, by combining the facial key point information and the depth calculation model, the reference point position and depth information are accurately calculated. This step takes into account the three-dimensional structure of the face, which helps to more accurately adjust and estimate the actual position of the forehead to adapt to changes in different angles and expressions. Then, using this precise reference information, the initial forehead position is corrected to ensure more accurate positioning, which is crucial for the acquisition of PPG signals because PPG signals are very sensitive to the accuracy of the detection position. Finally, by accurately correcting the forehead position and performing heart rate analysis, the subtle optical changes caused by blood flow can be more effectively captured, thereby improving the accuracy of heart rate measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings required for use in the embodiment of the present invention will be briefly introduced below. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work, and these are all within the protection scope of the present invention.
[0052] Figure 1 This is a schematic diagram of the overall working process of the heart rate measurement stabilization method based on facial image processing in Example 1 of the present invention;
[0053] Figure 2 This is a schematic diagram of the process of performing face detection and face tracking on a real-time image in Embodiment 1 of the present invention;
[0054] Figure 3 It is a schematic diagram of a process for determining reference point position information and reference point depth information in Embodiment 1 of the present invention;
[0055] Figure 4 This is a schematic diagram of a process for correcting initial forehead position information in Embodiment 1 of the present invention;
[0056] Figure 5 This is a schematic diagram of a process for determining a face state in Embodiment 1 of the present invention;
[0057] Figure 6 This is a flow chart of correcting the initial forehead position information and determining the target forehead position information according to the determination result in Embodiment 1 of the present invention if it is determined that the face is deformed;
[0058] Figure 7 This is a schematic diagram of a process of correcting the initial forehead position information according to the deformation type, combined with the depth change ratio and the displacement in Embodiment 1 of the present invention;
[0059] Figure 8 This is a structural block diagram of a heart rate measurement stabilization device based on facial image processing in Example 2 of the present invention;
[0060] Fig. 9 It is a schematic diagram of the structure of the electronic device in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described in conjunction with the drawings in the embodiment of the present invention. It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. In the description of the present invention, it should be understood that the orientation or position relationship indicated by the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such a process, method, article or device. In the absence of further restrictions, the elements defined by the phrase "comprising..." do not exclude the existence of other identical elements in the process, method, article or device comprising the elements. If there is no conflict, the embodiments of the present invention and the various features in the embodiments can be combined with each other, all within the protection scope of the present invention.
[0062] Example 1
[0063] See also Figure 1 Embodiment 1 of the present invention discloses a heart rate measurement stabilization method based on facial image processing, the method comprising:
[0064] Obtain real-time images containing human faces in nursing scenarios;
[0065] Specifically, in daily care scenarios, a color video stream containing a human face is obtained, and a camera or other image acquisition device is used to record the facial expressions and dynamic changes of the subject to be tested in real time. By capturing color video, the subtle changes in skin color and optical properties are recorded in detail, which is crucial for subsequent facial recognition, emotion analysis, and extraction of physiological signals, such as heart rate measurement. In addition, the color video stream also provides enough details to support complex image processing and analysis techniques, so that faces can still be accurately identified and tracked in dynamic and changing environments, ensuring the quality and accuracy of care.
[0066] Performing face detection and face tracking on the real-time image to determine initial forehead position information and facial key point position information;
[0067] Specifically, in the care scenario, face detection technology is first used to identify faces in real-time images, and the position and size of the face are located by analyzing the real-time image data. Subsequently, face tracking technology is used to continuously monitor the detected face to ensure that the movement of the face can be tracked even in dynamic scenes. In addition, through advanced image processing algorithms, the positions of key points on the face, such as the eyes, nose, and mouth, can also be identified. The accurate identification of these key points is crucial to determining the position information of the forehead, because the forehead area is usually used for further physiological signal analysis, such as heart rate measurement.
[0068] In one embodiment, see Figure 2 The performing of face detection and face tracking on the real-time image to determine the initial forehead position information and the face key point position information includes:
[0069] Input the real-time image into a pre-trained face detection model, and output the face frame position information and the face key point position information;
[0070] Specifically, the real-time image is first input into a pre-trained face detection model, such as MTCNN. MTCNN is an efficient face detection method designed for accurately identifying faces and their key feature points in images. MTCNN accurately detects the face position and size in sequence through three cascaded convolutional neural networks, outputs the face frame F(x, y, w, h), and identifies the structural key points of the face such as the position of the eyes, nose and mouth. This step not only provides the necessary initial data for subsequent tracking and analysis, but also ensures the accurate capture of facial features, thus laying the foundation for accurate physiological signal analysis.
[0071] Using a preset target tracking algorithm, the face frame position information in each frame of real-time image is tracked to output a face frame position sequence;
[0072] Specifically, a target tracking algorithm such as the KCF algorithm is used to continuously track the detected face. KCF uses Fourier transform to perform correlation calculations in the frequency domain, which can efficiently handle changes in the face position in the video frame and maintain continuous tracking of the target face. By continuously updating the tracking information, a time series of face positions is output, which is crucial for maintaining stable monitoring of faces in dynamic environments, especially when the target has slight movements or the video quality changes.
[0073] The face frame position sequence is calculated to determine the initial forehead position information in each frame of real-time image.
[0074] Specifically, the position of the forehead is determined according to the face frame position sequence obtained from the face tracking process. According to the preset formula, starting from the position F(x, y, w, h) of the face frame, the approximate position E(x, y, w, h) of the forehead is calculated. The calculation formula is as follows: This calculation takes into account the geometric structure characteristics of the human face. For example, the forehead is usually located in the central area above the face. The specific position and size are determined by the size ratio of the face frame. In this way, the forehead position in each frame of the image can be accurately calculated and updated, thereby ensuring that the data collection area is accurate and consistent in the subsequent heart rate analysis, increasing the accuracy and reliability of heart rate measurement.
[0075] Determine reference point position information and reference point depth information based on the facial key point position information and a preset depth calculation model;
[0076] In one embodiment, see Figure 3 The method of determining the reference point position information and the reference point depth information based on the facial key point position information and the preset depth calculation model includes:
[0077] Obtain the nose key point position information and the mouth key point position information in the face key point position information;
[0078] Specifically, through the above MTCNN model, the key points of the face are accurately detected, including the position information of the nose and mouth, and the position information of the nose key point N(x,y) and the position information of the two key points of the mouth M1(x,y) and M2(x,y) are output. The position information of these key points is crucial for the subsequent calculation of the reference position.
[0079] Determine the reference point position information according to the nose key point position information and the mouth key point position information;
[0080] Specifically, according to the position information of the nose and mouth key points, their coordinate centers are calculated as the reference position Ref(x, y). The reference position is calculated by taking the average value of the coordinate positions of the nose and mouth. The calculation formula is as follows: In this way, the reference point position information in the center of the face is obtained for subsequent depth calculation.
[0081] Input the real-time image into the depth calculation model, and output the depth information of the key points of the nose and the mouth;
[0082] Specifically, a real-time image containing a human face is fed into a pre-trained depth calculation model, such as the MobileDepth monocular depth field model. The model can predict the depth information of each key point in the image based on the input image data, including the depth value D_N of the nose key point and the depth values D_M1 and D_M2 of the mouth key points.
[0083] The reference point depth information is determined based on the nose key point depth information and the mouth key point depth information.
[0084] Specifically, according to the depth information of the nose and mouth key points obtained from the depth calculation model, their average depth value is calculated as the depth information of the reference point. The depth value of the reference point can be obtained by taking the average of the depth values of the nose and mouth key points, that is, D_ref=(D_N+D_M1+D_M2) / 3. This average depth value will be used as a reference for subsequent forehead correction to ensure the accuracy and stability of the forehead position.
[0085] Correcting the initial forehead position information according to the reference point position information and the reference point depth information to determine the target forehead position information;
[0086] Specifically, the initial forehead position information is corrected according to the reference point position information and the reference point depth information to determine the target forehead position information. This correction process is based on the position and depth of the reference point. By adjusting the initial forehead position to ensure the stability and accuracy of the forehead position in dynamic scenes, the corrected target forehead position information will better adapt to the posture and position changes of the face, thereby improving the accuracy and reliability of subsequent heart rate analysis. This correction method takes into account the geometric structure and depth characteristics of the face, and can effectively optimize the forehead position under different conditions, providing more reliable data support for heart rate measurement.
[0087] In one embodiment, see Figure 4 The method of correcting the initial forehead position information based on the reference point position information and the reference point depth information to determine the target forehead position information includes:
[0088] Acquire a first image and a second image adjacent to each other in a real-time image;
[0089] Specifically, in real-time images, a first image and a second image that are continuously captured and considered to be adjacent are obtained. These images are usually captured continuously at a certain frame rate, such as 30 frames per second or 60 frames per second, to ensure sufficient temporal resolution to capture the movement and changes of the face and key points. The two adjacent images are continuous in time and may have slight changes in space, such as the movement of the person or the adjustment of the posture.
[0090] Determine the displacement and depth change of the reference point in adjacent frame images based on the first reference point position information and the first reference point depth information in the first image and in combination with the second reference point position information and the second reference point depth information in the second image;
[0091] Specifically, first, the position information and depth information of the first reference point are obtained from the first image, and then the position information and depth information of the second reference point are obtained from the second image. Next, by comparing the position and depth information of the reference points in the two frames of images, the displacements Δx and Δy of the reference points on the image plane and the change ΔD in the depth direction are calculated. The calculation formula is as follows: The displacement Δx and Δy of the reference point on the image plane and the change ΔD in the depth direction reflect the movement and position adjustment of the reference point in adjacent frame images, which is of great significance for the subsequent forehead position correction. Such analysis helps to track the changes of the face in time and space, thereby achieving more accurate posture estimation and depth analysis.
[0092] Determining the face state according to the displacement and the depth change, and determining a determination result;
[0093] Specifically, the face state is determined based on the displacement and depth change to determine the determination result. By analyzing the movement and posture changes of the face between consecutive frames, the state evaluation and decision-making are carried out. By analyzing the displacement and depth change, the movement state of the face is inferred, such as whether offset, rotation or scaling has occurred. At the same time, the depth change can also provide information about the changes in the distance of the face. Based on these data, the face state is divided into different categories, such as whether deformation has occurred, or further subdivided into more specific states as needed, such as smiling, closing eyes, turning the head, etc. This state determination can provide an important reference for subsequent processing. For example, in heart rate measurement, a suitable feature area adjustment strategy is selected according to the face state, thereby improving the accuracy and stability of the measurement.
[0094] In one embodiment, see Figure 5, determining the face state based on the displacement amount and the depth change amount, and the determination result includes:
[0095] Obtain a preset displacement change threshold and a depth change threshold;
[0096] Specifically, obtain a preset displacement change threshold (Theta1) and a depth change threshold (Theta2). The displacement change threshold and the depth change threshold are usually based on the understanding of the application scenario and the analysis of experimental results. The displacement change threshold reflects the maximum allowable range of the position change of the face in the image, while the depth change threshold represents the maximum allowable range of the distance change of the face. Usually, the displacement change threshold and the depth change threshold need to be adjusted according to specific application requirements and actual data to ensure accurate determination of the face state.
[0097] If the displacement amount is less than the displacement change threshold and the depth change amount is less than the depth change threshold, the determination result is that the face has not deformed;
[0098] Specifically, when the calculated displacement amount and depth change amount are both less than the preset threshold, that is, |Δx| + |Δy| < Theta1, ΔD < Theta2, it is determined that the face has not deformed. At this time, it is considered that the position and shape of the face area remain stable and no adjustment of the forehead area is required.
[0099] If the displacement amount is greater than or equal to the displacement change threshold and / or the depth change amount is greater than or equal to the depth change threshold, the determination result is that the face has deformed.
[0100] Specifically, if the calculated displacement amount is greater than or equal to the displacement change threshold and / or the depth change amount is greater than or equal to the depth change threshold, that is, |Δx| + |Δy| >= Theta1 and / or ΔD >= Theta2, it is determined that the face has deformed. This indicates that a large change has occurred in the position or depth of the face area, and corresponding adjustments are required to ensure the accuracy of subsequent processing. In this case, the forehead area is corrected accordingly to adapt to the change of the face, so as to ensure reliable results for subsequent biometric signal measurement.
[0101] According to the determination result, if it is determined that the face has deformed, correct the initial forehead position information to determine the target forehead position information;
[0102] Specifically, according to the judgment result, if it is determined that the face has deformed, the initial forehead position information needs to be corrected to determine the target forehead position information. This means applying a preset correction strategy to adjust the current forehead position to adapt it to the new position and shape of the face. The correction strategy includes transformations such as translation, scaling or rotation of the forehead area to ensure that the forehead area remains stable and aligned at the new face position. Through this correction, the accuracy of face tracking and posture estimation is improved, thereby ensuring that subsequent biosignal measurements can obtain reliable results under dynamic face conditions.
[0103] In one embodiment, see Figure 6 According to the determination result, if it is determined that the face is deformed, the initial forehead position information is corrected, and the target forehead position information is determined to include:
[0104] Determining a depth change ratio according to the first reference point depth information and the second reference point depth information;
[0105] Specifically, the depth information of the first and second reference points is used to calculate the depth change ratio, and the calculation formula is: The depth change ratio (Ratio) indicates the degree of depth change in the second frame image relative to the depth change in the first frame image. By comparing the depth information of the reference points in the two frames of images, the depth change ratio is calculated, which will become an important parameter for subsequent forehead position correction.
[0106] If it is determined that the face is deformed, the face deformation is classified to determine the deformation category;
[0107] Specifically, if the system determines that the face is deformed, that is, the corresponding displacement and depth change threshold conditions are met, then the system needs to classify the deformation. This includes deformations in different directions, such as horizontal, vertical, or depth changes. According to the size and direction of the displacement and depth changes, the deformation is classified into different situations, such as only depth movement, only horizontal / vertical movement, or depth and translation at the same time.
[0108] According to the deformation type, combined with the depth change ratio and the displacement, the initial forehead position information is corrected to determine the target forehead position information.
[0109] Specifically, the initial forehead position information is corrected according to the deformation type, depth change ratio and displacement to determine the target forehead position information. The correction process makes different adjustments according to different deformation situations. For example, if only depth movement occurs, the size and position of the forehead will be adjusted using the depth change ratio; if horizontal or vertical movement occurs, the position of the forehead will be adjusted using the displacement. Through such a correction process, the deformation of the face is adapted and the forehead position is ensured to remain stable and accurate in continuous frame images, thereby improving the accuracy and reliability of subsequent biosignal measurements.
[0110] In one embodiment, see Figure 7 The initial forehead position information is corrected based on the deformation type, combined with the depth change ratio and the displacement, and the target forehead position information is determined, including:
[0111] According to the deformation category, if the displacement is less than the displacement change threshold and the depth change is greater than or equal to the depth change threshold, the target forehead position information is calculated by using the depth change ratio and the initial forehead position information;
[0112] Specifically, when the displacement is less than the displacement change threshold and the depth change is greater than or equal to the depth change threshold, and the deformation category is determined to be a case where the displacement is small, the depth change ratio and the initial forehead position information are used to calculate the target forehead position information. The depth change ratio is used to determine the degree of change in the depth of the face, and then the new target forehead position is calculated based on the initial forehead position information and the influence of the depth change. The calculation formula is: This correction process ensures that the position of the forehead area in the depth direction is consistent with the changes in the face, thereby improving the stability and accuracy of the forehead position.
[0113] If the displacement is greater than or equal to the displacement change threshold and the depth change is less than the depth change threshold, the target forehead position information is calculated by using the displacement and the initial forehead position information;
[0114] Specifically, when the displacement is greater than or equal to the displacement change threshold and the depth change is less than the depth change threshold, the deformation category is horizontal or vertical movement, but the depth change is small, the displacement and the initial forehead position information are used to calculate the target forehead position information. The displacement is used to determine the degree of horizontal or vertical movement of the face, and then the new target forehead position is calculated based on the initial forehead position information and the influence of the displacement. The calculation formula is: This correction process ensures that the forehead area is consistent with the changes in the human face in the horizontal or vertical direction, thereby improving the stability and accuracy of the forehead position.
[0115] If the displacement is greater than or equal to the displacement change threshold and the depth change is greater than or equal to the depth change threshold, the target forehead position information is calculated through the displacement, the depth change ratio and the initial forehead position information.
[0116] Specifically, when the displacement is greater than or equal to the displacement change threshold and the depth change is greater than or equal to the depth change threshold, that is, when the deformation category is depth movement and the displacement is large, the displacement, depth change ratio and initial forehead position information are considered simultaneously to calculate the target forehead position information. The displacement and depth change ratio are used to comprehensively consider the degree of change of the face in the horizontal, vertical and depth directions, and then the new target forehead position is calculated based on the initial forehead position information. The calculation formula is: This correction process that takes different factors into consideration can more accurately adapt to the deformation of the face, thereby improving the stability and accuracy of the forehead position.
[0117] Specifically, the advantage of the above-mentioned forehead area correction scheme over forehead area tracking by filtering is that it can more accurately adapt to the deformation and posture changes of the face. By comprehensively considering the displacement, depth change ratio and initial forehead position information, the changes in the face area can be captured more comprehensively, so that the target forehead position can be calculated more accurately. In comparison, for example, the filtering method combining Mean-Shift and Kalman is more susceptible to noise interference, and the forehead area cannot be effectively tracked when the face deformation is large or the posture changes are large. Therefore, this correction scheme can provide more stable and accurate forehead position information, thereby obtaining more reliable results in applications such as heart rate measurement.
[0118] If it is determined that the human face has not been deformed, the initial forehead position information is directly used as the target forehead position information.
[0119] Based on the target forehead position information, a heart rate analysis is performed on the forehead area to determine the heart rate of the subject to be measured.
[0120] Specifically, according to the target forehead position information, the forehead area is accurately located and used as the area of interest for heart rate analysis. By using non-contact optical technology, such as photoplethysmography (PPG), the tiny blood flow in the forehead area is captured and the heartbeat signal is extracted from it. By analyzing the frequency and change pattern of these heartbeat signals, the heart rate of the subject to be measured is accurately calculated. This method does not require direct contact with the skin, is non-invasive, convenient and fast, and is suitable for real-time monitoring of the heart rate of the subject to be measured in daily care scenarios.
[0121] Example 2
[0122] See also Figure 8 Embodiment 2 of the present invention further provides a heart rate measurement stabilization device based on facial image processing, the device comprising:
[0123] An image acquisition module is used to acquire real-time images containing human faces in nursing scenarios;
[0124] A face detection and tracking module, used to perform face detection and face tracking on the real-time image, and determine initial forehead position information and face key point position information;
[0125] A reference point information acquisition module, used to determine reference point position information and reference point depth information based on the facial key point position information and in combination with a preset depth calculation model;
[0126] A position correction module, used to correct the initial forehead position information according to the reference point position information and the reference point depth information, and determine the target forehead position information;
[0127] The heart rate analysis module is used to perform heart rate analysis on the forehead area according to the target forehead position information to determine the heart rate of the subject to be measured.
[0128] Specifically, a heart rate measurement stabilization device based on facial image processing provided by an embodiment of the present invention is used, and the device includes: an image acquisition module, which is used to acquire a real-time image containing a face in a nursing scene; a face detection and tracking module, which is used to perform face detection and face tracking on the real-time image, and determine the initial forehead position information and the face key point position information; a reference point information acquisition module, which is used to determine the reference point position information and the reference point depth information based on the face key point position information and the preset depth calculation model; a position correction module, which is used to correct the initial forehead position information based on the reference point position information and the reference point depth information, and determine the target forehead position information; a heart rate analysis module, which is used to perform heart rate analysis on the forehead area based on the target forehead position information, and determine the heart rate of the object to be measured. This device greatly improves the measurement accuracy and reduces the positioning error of the forehead area by stabilizing the heart rate measurement. First, through real-time image acquisition and efficient face detection and tracking technology, the initial forehead position and face key points are quickly determined, which provides a basic spatial positioning for heart rate measurement. Secondly, by combining the facial key point information and the depth calculation model, the reference point position and depth information are accurately calculated. This step takes into account the three-dimensional structure of the face, which helps to more accurately adjust and estimate the actual position of the forehead to adapt to changes in different angles and expressions. Then, using this precise reference information, the initial forehead position is corrected to ensure more accurate positioning, which is crucial for the acquisition of PPG signals because PPG signals are very sensitive to the accuracy of the detection position. Finally, by accurately correcting the forehead position and performing heart rate analysis, the subtle optical changes caused by blood flow can be more effectively captured, thereby improving the accuracy of heart rate measurement.
[0129] Example 3
[0130] In addition, combined Figure 1 The heart rate measurement stabilization method based on facial image processing of the embodiment 1 of the present invention described above can be implemented by an electronic device. Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in Embodiment 3 of the present invention is shown.
[0131] The electronic device may include a processor and a memory storing computer program instructions.
[0132] Specifically, the processor may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.
[0133] The memory may include a large capacity memory for data or instructions. By way of example and not limitation, the memory may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory may include a removable or non-removable (or fixed) medium. Where appropriate, the memory may be inside or outside the data processing device. In a particular embodiment, the memory is a non-volatile solid-state memory. In a particular embodiment, the memory includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.
[0134] The processor implements any one of the heart rate measurement stabilization methods based on facial image processing in the above embodiments by reading and executing computer program instructions stored in the memory.
[0135] In one example, the electronic device may further include a communication interface and a bus. Fig. 9 As shown, the processor, memory, and communication interface are connected via a bus and communicate with each other.
[0136] The communication interface is mainly used to implement communication between the modules, devices, units and / or equipment in the embodiments of the present invention.
[0137] The bus includes hardware, software or both, and the components of the device are coupled to each other. For example, but not limitation, the bus may include an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-side bus (FSB), a hypertransport (HT) interconnection, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnection, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable bus or a combination of two or more of these. Where appropriate, the bus may include one or more buses. Although the embodiments of the present invention describe and illustrate a specific bus, the present invention contemplates any suitable bus or interconnection.
[0138] Example 4
[0139] In addition, in combination with the heart rate measurement stabilization method based on facial image processing in the above embodiment 1, embodiment 4 of the present invention can also provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the heart rate measurement stabilization methods based on facial image processing in the above embodiments is implemented.
[0140] In summary, the embodiments of the present invention provide a method, apparatus and device for stabilizing heart rate measurement based on facial image processing.
[0141] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0142] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0143] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0144] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0145] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.
Claims
1. A heart rate measurement stabilization method based on facial image processing, characterized in that: The method comprises: Obtain real-time images containing human faces in nursing scenarios; Performing face detection and face tracking on the real-time image to determine initial forehead position information and facial key point position information; Determine reference point position information and reference point depth information based on the facial key point position information and a preset depth calculation model; Correcting the initial forehead position information according to the reference point position information and the reference point depth information to determine the target forehead position information; According to the target forehead position information, a heart rate analysis is performed on the forehead area to determine the heart rate of the subject to be measured; The determining of the reference point position information and the reference point depth information based on the facial key point position information and in combination with a preset depth calculation model includes: Obtain the nose key point position information and the mouth key point position information in the face key point position information; Determine the reference point position information according to the nose key point position information and the mouth key point position information; Input the real-time image into the depth calculation model, and output the depth information of the key points of the nose and the mouth; Determine the reference point depth information according to the nose key point depth information and the mouth key point depth information; The correcting the initial forehead position information based on the reference point position information and the reference point depth information to determine the target forehead position information includes: Acquire a first image and a second image adjacent to each other in a real-time image; Determine the displacement and depth change of the reference point in adjacent frame images based on the first reference point position information and the first reference point depth information in the first image and in combination with the second reference point position information and the second reference point depth information in the second image; Determining the face state according to the displacement and the depth change, and determining a determination result; According to the determination result, if it is determined that the human face is deformed, the initial forehead position information is corrected to determine the target forehead position information; If it is determined that the face has not been deformed, the initial forehead position information is directly used as the target forehead position information; According to the determination result, if it is determined that the face is deformed, the initial forehead position information is corrected, and the target forehead position information is determined, including: Determining a depth change ratio according to the first reference point depth information and the second reference point depth information; If it is determined that the face is deformed, the face deformation is classified to determine the deformation category; According to the deformation type, combined with the depth change ratio and the displacement, the initial forehead position information is corrected to determine the target forehead position information; The method of correcting the initial forehead position information based on the deformation type, combining the depth change ratio and the displacement, and determining the target forehead position information includes: According to the deformation category, if the displacement is less than the displacement change threshold and the depth change is greater than or equal to the depth change threshold, the target forehead position information is calculated by using the depth change ratio and the initial forehead position information; If the displacement is greater than or equal to the displacement change threshold and the depth change is less than the depth change threshold, the target forehead position information is calculated by using the displacement and the initial forehead position information; If the displacement is greater than or equal to the displacement change threshold and the depth change is greater than or equal to the depth change threshold, the target forehead position information is calculated through the displacement, the depth change ratio and the initial forehead position information.
2. The heart rate measurement stabilization method based on facial image processing according to claim 1, characterized in that: The performing face detection and face tracking on the real-time image to determine the initial forehead position information and the face key point position information comprises: Input the real-time image into a pre-trained face detection model, and output the face frame position information and the face key point position information; Using a preset target tracking algorithm, the face frame position information in each frame of real-time image is tracked to output a face frame position sequence; The face frame position sequence is calculated to determine the initial forehead position information in each frame of real-time image.
3. The heart rate measurement stabilization method based on facial image processing according to claim 1, characterized in that: The facial state is determined based on the displacement and the depth change, and the determination result includes: Obtaining a preset displacement change threshold and depth change threshold; If the displacement is less than the displacement change threshold and the depth change is less than the depth change threshold, then the determination result is that the face is not deformed; If the displacement is greater than or equal to the displacement change threshold and / or the depth change is greater than or equal to the depth change threshold, then the determination result is that the face is deformed.
4. A heart rate measurement stabilization device based on facial image processing, characterized in that: The device comprises: An image acquisition module is used to acquire real-time images containing human faces in nursing scenarios; A face detection and tracking module, used to perform face detection and face tracking on the real-time image, and determine initial forehead position information and face key point position information; A reference point information acquisition module, used to determine reference point position information and reference point depth information based on the facial key point position information and in combination with a preset depth calculation model; A position correction module, used to correct the initial forehead position information according to the reference point position information and the reference point depth information, and determine the target forehead position information; A heart rate analysis module, used to perform heart rate analysis on the forehead area according to the target forehead position information to determine the heart rate of the subject to be measured; The determining of the reference point position information and the reference point depth information based on the facial key point position information and in combination with a preset depth calculation model includes: Obtain the nose key point position information and the mouth key point position information in the face key point position information; Determine the reference point position information according to the nose key point position information and the mouth key point position information; Input the real-time image into the depth calculation model, and output the depth information of the key points of the nose and the mouth; Determine the reference point depth information according to the nose key point depth information and the mouth key point depth information; The correcting the initial forehead position information based on the reference point position information and the reference point depth information to determine the target forehead position information includes: Acquire a first image and a second image adjacent to each other in a real-time image; Determine the displacement and depth change of the reference point in adjacent frame images based on the first reference point position information and the first reference point depth information in the first image and in combination with the second reference point position information and the second reference point depth information in the second image; Determining the face state according to the displacement and the depth change, and determining a determination result; According to the determination result, if it is determined that the human face is deformed, the initial forehead position information is corrected to determine the target forehead position information; If it is determined that the face has not been deformed, the initial forehead position information is directly used as the target forehead position information; According to the determination result, if it is determined that the face is deformed, the initial forehead position information is corrected, and the target forehead position information is determined, including: Determining a depth change ratio according to the first reference point depth information and the second reference point depth information; If it is determined that the face is deformed, the face deformation is classified to determine the deformation category; According to the deformation type, combined with the depth change ratio and the displacement, the initial forehead position information is corrected to determine the target forehead position information; The method of correcting the initial forehead position information based on the deformation type, combining the depth change ratio and the displacement, and determining the target forehead position information includes: According to the deformation category, if the displacement is less than the displacement change threshold and the depth change is greater than or equal to the depth change threshold, the target forehead position information is calculated by using the depth change ratio and the initial forehead position information; If the displacement is greater than or equal to the displacement change threshold and the depth change is less than the depth change threshold, the target forehead position information is calculated by using the displacement and the initial forehead position information; If the displacement is greater than or equal to the displacement change threshold and the depth change is greater than or equal to the depth change threshold, the target forehead position information is calculated through the displacement, the depth change ratio and the initial forehead position information.
5. An electronic device, characterized in that: include: At least one processor, at least one memory and computer program instructions stored in the memory, when the computer program instructions are executed by the processor, implement the method according to any one of claims 1 to 3.
6. A storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
PPG-based non-contact non-invasive heart rate and respiration measuring method and system
CN112233813A
Non-contact heart rate estimation method fusing IPPG and depth information to resist noise interference
CN110276271A
Heart rate detection method and device
CN112819790A
Non-contact intelligent human body heart rate prediction method based on deep learning
CN114092855A
Face recognition system and physiological information generation method
CN118279950A
