Real-time non-contact heart rate detection method based on improved FastICA algorithm
Through the improved third-order two-factor adaptive FastICA algorithm and sliding window technology, non-contact heart rate detection is improved, solving the problems of sensitivity to initial values, slow iteration speed and susceptible to motion artifacts in the prior art, achieving high accuracy and real-time heart rate detection.
Patent Information
- Application Number
- CN202410469498.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-03-15
- Filing Date
- 2024-04-18
- Publication Date
- 2025-04-25
AI Technical Summary
The existing non-contact heart rate detection methods are sensitive to initial values and slow iteration speed, are susceptible to motion artifacts, cannot adapt to all scenarios, and are not very real-time and accurate.
The improved third-order two-factor adaptive FastICA algorithm is used to blindly separate the original three-channel time signal. The periodic analysis is performed in the time domain with sliding window technology, which reduces the sensitivity to the initial value, improves the iteration speed, and reduces noise through wavelet packet decomposition, reduces high-frequency noise, and improves the accuracy of detection.
Real-time non-contact detection of heart rate is realized, the impact of motion artifacts is reduced, the accuracy and real-time detection is improved, and the error caused by abnormal heart rate values is reduced.
Smart Images

Figure CN119867690A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of biological information processing, and in particular relates to a real-time non-contact heart rate detection method based on an improved FastICA algorithm. Background Art
[0002] The physiological indicators of the human body can be used to evaluate the level of body function. Among them, heart rate is the most important basic physiological indicator reflecting the human cardiovascular system. Heart rate detection has been widely used in medical care, sports training, sleep research, and psychological and physiological examinations.
[0003] At present, the heart rate detection method is divided into contact and non-contact methods according to whether it needs to contact with the human body. The traditional contact heart rate measurement method has high measurement accuracy, but it has some defects. First, the contact heart rate measurement method requires the subject's skin to directly contact the sensor, which may cause a certain degree of discomfort or pain; secondly, the contact heart rate measurement method cannot monitor certain special populations (such as skin burn patients, the elderly, etc.) for a long time; in addition, this method is also limited by complex equipment and cumbersome operation.
[0004] With the rapid development of computer vision technology, it has become possible to use ordinary cameras to achieve non-contact heart rate measurement. Non-contact heart rate measurement does not require direct contact with the skin of the person being measured, thus eliminating the discomfort of traditional contact measurement, and can effectively reduce the probability of transmission of certain infectious diseases; and non-contact heart rate measurement has low equipment requirements and low cost, and has broad application prospects in the fields of medical care, human-computer interaction, etc. Non-contact heart rate detection technology based on computer vision mainly obtains heartbeat information by extracting subtle changes in blood vessels under the skin of the face, but this detection technology is easily affected by environmental noise and has high real-time requirements. Therefore, how to achieve accurate and fast real-time heart rate detection has always been a hot topic and difficulty in research.
[0005] In 2010, Poh et al. first used face videos to realize non-contact heart rate measurement, and used independent component analysis (ICA) to extract blood volume pulse waves from RGB channel (red channel Red, green channel Green, blue channel Blue) videos. ICA is a statistical method used to separate independent components from mixed signals. After years of development, ICA has derived a variety of algorithms, among which FastICA (Fast Independent components analysis, also known as fixed point algorithm) has attracted much attention. FastICA uses Newton iteration method and maximizing negative entropy as the objective function to find the maximum value of non-Gaussianity. It is an ICA algorithm based on fixed iteration theory. Although FastICA is an effective method for blind source separation, its convergence speed is limited, it is sensitive to initial values, and its iteration stability is poor. In 2012, Wu et al. used the Euler video magnification method to amplify the blood flow under the skin of the face in visible light videos. They decomposed the video sequence into different spatial frequency bands and used bandpass filtering to amplify the desired frequency band to extract heart rate information. The Euler video magnification method has high accuracy, but it is easily affected by motion artifacts and cannot adapt to all scenarios. In addition, the patent document "A non-contact driver heart rate detection method" (Application No.: 202211623118.0) uses ICA and bandpass filters to process signals and analyze signal periodicity in the frequency domain. The invention uses a Kalman filter to combine the predicted and historical heart rate values to obtain the current heart rate value, which has a certain inhibitory effect on abnormal values. However, since the predicted values and historical heart rate values contain less information about the heart rate, the estimated value may be inaccurate for continuous abnormal heart rate values.
[0006] In summary, the existing non-contact heart rate detection methods have the following main problems: they are sensitive to initial values and have slow iteration speeds; they are easily affected by motion artifacts, cannot adapt to all scenarios, and have low real-time and accuracy. Summary of the invention
[0007] The present invention provides a real-time non-contact heart rate detection method and system based on an improved FastICA algorithm, aiming to solve at least one of the problems existing in the prior art. The technical problem to be solved by the present invention is achieved by the following technical solutions:
[0008] In a first aspect, the present invention proposes a real-time non-contact heart rate detection method based on an improved FastICA algorithm, comprising:
[0009] Acquire a video stream including facial information of the object to be tested, detect and extract a facial region of interest in the video stream, and obtain an original three-channel time signal;
[0010] Using an improved third-order dual-factor adaptive FastICA algorithm to perform blind source separation on the original three-channel time signal to obtain an estimated PPG (Photoplethysmography) physiological signal;
[0011] Based on the sliding window, the PPG physiological signal is periodically analyzed in the time domain to obtain the average heart rate in each sliding window, so as to realize real-time non-contact detection of the heart rate.
[0012] In a second aspect, the present invention proposes a real-time non-contact heart rate detection system based on an improved FastICA algorithm, which is used to implement the method proposed in the first aspect of the present invention, including:
[0013] A data acquisition module is used to acquire a video stream including facial information of the object to be tested, detect and extract a facial region of interest in the video stream, and obtain an original three-channel time signal;
[0014] A data separation module, used for performing blind source separation on the original three-channel time signal by using an improved third-order double relaxation factor adaptive FastICA algorithm to obtain an estimated PPG physiological signal;
[0015] The data analysis module is used to perform periodic analysis on the PPG physiological signal in the time domain based on a sliding window to obtain the average heart rate in each sliding window to achieve real-time non-contact detection of the heart rate.
[0016] Beneficial effects of the present invention:
[0017] 1. The real-time non-contact heart rate detection method based on the improved FastICA algorithm proposed in the present invention first detects and extracts the face interest region in the video stream to obtain the original three-channel time signal containing the heart rate information; then an improved third-order dual-factor adaptive FastICA algorithm is designed to perform blind source separation on the original three-channel time signal to obtain the estimated PPG physiological signal; wherein the introduced adaptive factor can constrain the initial value to converge in the direction of gradient descent, reducing the sensitivity to the initial value, and at the same time improving the iterative formula in the algorithm to the third order, thereby increasing the iteration speed; finally, the idea of a sliding window is introduced to perform periodic analysis on the signal in the time domain, and only the signal within the sliding window is processed each time. Since the sliding window contains both the historical time signal and the newly sampled signal, the present invention not only achieves the effect of real-time heart rate calculation, but also ensures the detection accuracy;
[0018] 2. Before using the improved third-order dual-factor adaptive FastICA algorithm to perform blind source separation on the original three-channel time signal, the present invention also performs upsampling processing on the original three-channel time signal, thereby reducing the influence of motion artifacts on the algorithm to a certain extent;
[0019] 3. Before analyzing the PPG physiological signal based on the sliding window, the present invention also performs wavelet packet decomposition and noise reduction on the PPG physiological signal, which can reduce high-frequency noise and make the signal smoother;
[0020] 4. When calculating the average heart rate in the window, the present invention also sets a threshold value for heart rate change for judgment, thereby reducing the error caused by abnormal heart rate values and further improving the accuracy of measurement.
[0021] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flow chart of a real-time non-contact heart rate detection method based on an improved FastICA algorithm provided in an embodiment of the present invention;
[0023] Figure 2 is another flow chart of a real-time non-contact heart rate detection method based on an improved FastICA algorithm provided by an embodiment of the present invention;
[0024] Figure 3 It is a flow chart of blind source separation using the improved FastICA algorithm provided by an embodiment of the present invention;
[0025] Figure 4 It is a schematic diagram of the implementation principle of the ICA algorithm provided by an embodiment of the present invention;
[0026] Figure 5 It is a performance comparison diagram of the improved FastICA algorithm of the present invention and the traditional FastICA algorithm;
[0027] Figure 6 It is a heart rate waveform and operation result diagram extracted by using the improved FastICA algorithm of the present invention;
[0028] Figure 7 It is a data comparison diagram of the measured heart rate and the reference heart rate obtained by using the improved FastICA algorithm of the present invention;
[0029] Figure 8 It is a structural block diagram of a real-time non-contact heart rate detection system based on an improved FastICA algorithm provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] Embodiment 1
[0032] Please see the joint Figure 1 and Figure 2 , Figure 1 is a flow chart of a real-time non-contact heart rate detection method based on an improved FastICA algorithm provided by an embodiment of the present invention, Figure 2 1 is another flow chart of a real-time non-contact heart rate detection method based on an improved FastICA algorithm provided by an embodiment of the present invention. The real-time non-contact heart rate detection method based on an improved FastICA algorithm provided by this embodiment mainly includes the following steps:
[0033] Step 1: Obtain a video stream including the face information of the object to be tested, detect and extract the face region of interest in the video stream, and obtain the original three-channel time signal.
[0034] Specifically, this embodiment can obtain a video stream including facial information of the object to be measured through a camera, etc., and simultaneously obtain information such as video frame rate and resolution.
[0035] Then, the face region of interest (ROI) is detected and extracted from the video stream, where the face region of interest may be a pixel region containing skin information such as cheeks and forehead.
[0036] Optionally, as an implementation method, this embodiment first uses the Viola-Jones algorithm to create a detector to detect objects; then uses the KLT (Kanade-Lucas-Tomasi) optical flow tracking algorithm to create a tracker, tracks the face and extracts the face ROI, and obtains the ROI area pixels in each frame.
[0037] The detailed implementation process of the Viola-Jones algorithm and the KLT optical flow tracking algorithm can be referred to the existing related technical implementation, and will not be specifically introduced in this embodiment.
[0038] It is understandable that after extracting the pixels in the ROI area of each frame, it is also necessary to perform averaging processing on the pixels in the ROI area of each frame to obtain the original three-channel time signal, and use it as the source signal to be separated for subsequent blind source separation operations.
[0039] It should be noted that, before blind source separation is performed in this embodiment, up-sampling and high-pass filtering are required to be performed on the original three-channel time signal.
[0040] Among them, the upsampling process reduces the impact of motion artifacts on the algorithm to a certain extent, which mainly includes two operations: signal screening and signal interpolation.
[0041] Specifically, first, the points with amplitude NaN (overflow or underflow) in the original three-channel time signal are filtered out, and an index between the number of frames and the number of seconds is established; then the signal is interpolated and resampled to 60Hz to obtain the resampled signal as the input of the subsequent high-pass filtering algorithm.
[0042] High-pass filtering can filter out low-frequency noise in the signal. Specifically, it can be implemented in the following way: first, the resampled signal is low-pass filtered to obtain a signal containing a low-frequency part; then the resampled signal is subtracted from the low-pass filtered signal to achieve high-pass filtering of the signal.
[0043] Step 2: Use the improved third-order dual-factor adaptive FastICA algorithm to perform blind source separation on the original three-channel time signal to obtain the estimated PPG physiological signal.
[0044] The FastICA algorithm is mainly based on the Gaussian maximization theorem, uses the fixed point iteration theory to find the non-Gaussian maximum value, and uses the Newton iteration method to batch process a large number of sampling points of the observed variables, with maximizing the negative entropy as the objective function to separate independent components from the observed signal. This embodiment introduces two adaptive relaxation factors on the existing FastICA algorithm, and changes the algorithm's iterative formula to the third order, and designs an improved third-order dual-factor adaptive FastICA algorithm for blind source separation.
[0045] See also Figure 3 , Figure 3 : is a flow chart of blind source separation using the improved FastICA algorithm provided by an embodiment of the present invention. Specifically, the improved third-order dual-factor adaptive FastICA algorithm is used to perform blind source separation on the original three-channel time signal to obtain an estimated PPG physiological signal, which can be implemented according to the following sub-steps:
[0046] a) De-average and whiten the original three-channel time signal.
[0047] Performing de-averaging and whitening processing on the signal is an existing conventional operation, and its implementation process can refer to the existing related technology, which will not be described in detail in this embodiment.
[0048] b) Take a random initial weight vector w0, set the convergence error 0<ε≤1, and initialize two relaxation factors α1 and α2.
[0049] It should be noted that after obtaining the two relaxation factors α1 and α2, it is still necessary to determine whether the relaxation factors α1 and α2 meet the constraints. If not, update the relaxation factors α1 and α2 and re-determine until the constraints are met, and execute step c).
[0050] The constraints are expressed as:
[0051]
[0052] In the formula, w k represents the calculated weight vector corresponding to the kth source signal to be separated, α1 and α2 represent relaxation factors, and F(·) represents the optimal value expression of the objective function, which is E[xg(w T x)]-βw=0,J F (·) represents the Jacobian matrix of F(·), and ||·|| represents the matrix norm.
[0053] Specifically, when the two relaxation factors α1 and α2 do not satisfy the constraint conditions shown in formula (1), the relaxation factors α1 and α2 need to be updated, and after the update, the judgment is made again until formula (1) is established.
[0054] Optionally, the updating method adopted in this embodiment is to set α1=0.5α1, α2=0.5α2.
[0055] c) The Newton iteration formula of the traditional FastICA algorithm is changed to the third order, and the relaxation factors α1 and α2 are introduced. The weight vector w is calculated using the improved third-order dual-factor adaptive FastICA algorithm iteration formula k+1 ; Wherein, k represents the sequence number of the source signal to be separated.
[0056] See also Figure 4 , Figure 4 It is a schematic diagram of the implementation principle of the ICA algorithm provided by an embodiment of the present invention.
[0057] Specifically, the ICA algorithm is based on the assumption that each source signal vector is statistically independent of each other, and its purpose is to find a separation matrix W, through the formula y = w T x unmixes the observed vector to obtain the source signal vector in reverse, where w T is the vector in the separation matrix W, x=[x1, x2…x n ] is the observation vector, y=[y1, y2…y n ] is the separated source signal vector.
[0058] The specific derivation process of the improved three-order dual-factor adaptive FastICA algorithm proposed in the present invention is introduced below.
[0059] The objective function used by the FastICA algorithm is the following approximate negative entropy:
[0060] J(y)∝[E{G(y)}-E{G(y gauss )}] 2 (2);
[0061] Where E{·} is the mean, G{·} is a non-square nonlinear function, and y = w T x is an output variable with zero mean and unit variance, y gauss is a Gaussian random variable with zero mean and unit variance.
[0062] In order to maximize the non-Gaussianity between components, it is necessary to maximize the objective function. The constraint condition of the function is E{(w T x) 2}=||w|| 2 = 1. Through Lagrange multiplication, we get E{G(w T The expression for the optimal value of x)} is:
[0063] F(w)=E[xg(w T x)]-βw=0 (3);
[0064] In the formula, β is a constant factor, w0 is the optimal value of w.
[0065] Differentiating w in equation (3) yields the Jacobian matrix JF(w) of F(w):
[0066] JF(w)=E{xx T g'(w T x)}-βI=E{g'(w T x)}-β (4);
[0067] Next, we find the optimal value of formula (4), using the Newton iteration formula
[0068]
[0069] Substituting F(w) and JF(w) into (5), we obtain the following equation:
[0070]
[0071] Simplifying equation (6), we get
[0072]
[0073] Formula (7) is the classic FastICA algorithm iteration formula.
[0074] Since the Newton iteration method is second-order convergent, formula (5) is modified from the second-order to the third-order Newton iteration formula, and we get
[0075]
[0076] In formula (8), λ is an adjustable sliding factor.
[0077] Substituting formula (7) into the third-order convergent Newton iteration formula, the improved FastICA algorithm formula is obtained:
[0078]
[0079] Due to the sensitivity of the algorithm to the initial weights, two different relaxation factors are further introduced into the third-order improved FastICA algorithm to ensure that the objective function has the property of decreasing according to the given norm. The derivation process is as follows:
[0080] Introduce two relaxation factors α1 and α2 into the third-order formula, that is,
[0081]
[0082] The relaxation factor is required to satisfy the following constraints
[0083]
[0084] Take the initial values α1=1, α2=1, then the algorithm is restored to the third-order FastICA. When the given constraints are not met, take α1=0.5α1, α2=0.5α2 until the constraints are met.
[0085] Furthermore, in order to make the algorithm more stable, different relaxation factors are introduced to achieve better results.
[0086]
[0087] Substituting into the third-order FastICA algorithm, the improved third-order dual-factor adaptive FastICA algorithm iteration formula is obtained:
[0088]
[0089] Where E[·] represents the mean, α1 and α2 represent relaxation factors, β represents a constant factor, x represents the whitened observation vector, g(·) represents a non-square nonlinear function, g'(·) represents the derivative of g(·), T represents the transposition operation, λ1 and λ2 represent adjustable sliding factors, which are hyperparameters set according to the experimental results, and ||·|| represents the matrix norm.
[0090] So far, the improved third-order dual-factor adaptive FastICA algorithm iteration formula is obtained. The weight vector w is iteratively updated using this formula k+1 .
[0091] The improved third-order dual-factor adaptive FastICA algorithm designed in this embodiment can constrain the initial value to converge in the direction of gradient descent by introducing an adaptive factor, thereby reducing the sensitivity to the initial value. At the same time, the iterative formula in the algorithm is improved to the third order, thereby increasing the iteration speed.
[0092] d) For the weight vector w k+1 Perform orthogonalization and normalization, and determine whether ||w is satisfied k+1 -w k ||<ε; if not satisfied, return to step c); if satisfied, the weight vector w k+1 Separate them as a group of independent components and return to step b) to extract the next group of independent components.
[0093] Specifically, when ||w k+1 -w k When ||<ε, it is considered that w k+1 Converged, that is, the algorithm has converged, then one of the vectors of the unmixing matrix can be obtained, and k is added by 1, and the next set of independent components is extracted by returning to step b). If the algorithm does not converge, it is necessary to return to step d) to repeat the separation of the weight vector w k+1 .
[0094] e) Repeat steps b)-d) until all independent components are separated and a complete separation matrix is obtained.
[0095] When the number k of separated independent components is greater than m, it is considered that all independent components have been separated, where m is the number of channels of the observed signal.
[0096] In this embodiment, steps b) to d) are repeated to obtain a complete m×m separation matrix W.
[0097] f) multiplying the separation matrix by the signal obtained in step a) to obtain an estimated PPG physiological signal.
[0098] At this point, the blind source separation of the original three-channel time signal is achieved.
[0099] Step 3: Perform periodic analysis on the PPG physiological signal in the time domain based on the sliding window to obtain the average heart rate in each sliding window to achieve real-time non-contact detection of the heart rate.
[0100] In order to further reduce the noise of the signal, before analyzing the PPG physiological signal based on the sliding window, this embodiment introduces a wavelet packet decomposition algorithm to smooth the signal and reduce high-frequency noise.
[0101] Wavelet packet denoising is to classify the wavelet coefficients obtained by decomposition. After wavelet decomposition, the wavelet decomposition coefficients of the useful signal are larger, and the wavelet decomposition coefficients of the noise are smaller. By setting the threshold function for denoising, the decomposition coefficients greater than the threshold are retained, while the decomposition coefficients less than the threshold are eliminated by zeroing. Wavelet packet analysis has a higher frequency resolution, which can further eliminate the noise margin in the high-frequency part and improve the denoising accuracy.
[0102] In the process of wavelet packet threshold denoising, the most critical parts are the threshold processing, the selection of decomposition levels and the selection of wavelet basis functions.
[0103] When performing wavelet packet decomposition and denoising on the PPG physiological signal, this embodiment specifically adopts 6 decomposition layers for wavelet packet decomposition, and determines the threshold according to each wavelet packet decomposition coefficient; at the same time, an eighth-order db function is used as the wavelet packet basis to achieve wavelet packet decomposition and denoising.
[0104] First, the selection of threshold is directly related to the effect of signal smoothing. In order to better adapt to the signal characteristics, the present invention generates a threshold selection scheme for wavelet packet denoising based on the input signal characteristics. In the selection of the number of decomposition layers, it can be seen from the theory of multi-resolution analysis that the higher the number of signal decomposition layers, the more high-frequency components in the signal are filtered out, and at the same time, the more signal distortion components are, so it is not advisable to select too high a number of decomposition layers. Based on this, this embodiment selects the number of decomposition layers to be 6. Finally, in the selection of wavelet basis functions, it is necessary to consider the compact support, orthogonality, pair formation, regularity, etc. of the wavelet basis functions. The higher the similarity between the wavelet basis functions and the signals, the better the signal denoising effect. For the heart rate signal sampled in this embodiment, the eighth-order db function is selected as the wavelet basis.
[0105] Specifically, the PPG physiological signal is decomposed and denoised by wavelet packet decomposition, which is implemented according to the following sub-steps:
[0106] First, the signal is decomposed by wavelet packet. For the PPG physiological signal obtained in step 2, a wavelet is selected and the required decomposition level is determined to be 6 layers, and the signal is decomposed by wavelet packet accordingly.
[0107] Then, the eighth-order db function is used as the optimal wavelet packet basis to calculate the optimal tree for a given entropy criterion.
[0108] Next, threshold quantization of wavelet packet decomposition coefficients is performed. For each wavelet packet decomposition coefficient, an appropriate threshold is selected and the coefficient is threshold quantized.
[0109] Finally, wavelet packet reconstruction is performed. Specifically, wavelet packet reconstruction is performed based on the wavelet packet decomposition coefficients at the bottom layer and the coefficients after quantization to obtain a smoothed signal.
[0110] The present invention uses wavelet packet decomposition and noise reduction to perform smoothing processing on the signal, thereby reducing high-frequency noise.
[0111] Finally, a sliding window is introduced to perform periodic analysis on the PPG physiological signal after wavelet packet decomposition to achieve real-time non-contact detection of heart rate, as follows:
[0112] First, the baseline drift in the PPG physiological signal is removed, and a low-pass filter is applied to perform filtering to obtain a filtered signal.
[0113] Then, based on the preset sliding window length, the signal peaks are screened from the filtered signal in the current sliding window, and points with amplitudes greater than 0 and intervals between adjacent peaks greater than half the sampling frequency are selected to obtain the number of heart rate signal peaks and interval time in the window.
[0114] Among them, the selection of sliding window length has a great influence on the estimation of heart rate. A sliding window that is too short contains too little heartbeat information, resulting in a decrease in calculation accuracy; a sliding window that is too long will increase the amount of calculation of the algorithm and has limited improvement in the accuracy of heart rate calculation. After weighing the real-time performance and accuracy, this embodiment preferably uses 15s as the sliding window length.
[0115] When selecting peak points, this embodiment screens out points whose intervals are less than the minimum heartbeat interval and whose amplitude strengths are less than 0, thereby preventing false peaks from affecting the calculation results.
[0116] Next, the instantaneous heart rate is calculated according to the interval time and the sampling frequency, and the average value of all instantaneous heart rates in the current sliding window is calculated to obtain the average heart rate in the current sliding window.
[0117] Specifically, the interval time Δt between adjacent peaks in the sliding window i =t i -t i-1 , where i = 1, 2, 3, ..., n, n is the number of peaks. From this, we can know the interval between two adjacent heartbeats. Divide the interval by the sampling frequency and then take the inverse and multiply by 60 to calculate the instantaneous heart rate. Finally, take the average of all instantaneous heart rates in the sliding window to get the average heart rate in the sliding window. The calculation formula is shown in formula (14):
[0118]
[0119] Where fs is the sampling frequency.
[0120] So far, the average heart rate in the current sliding window is obtained.
[0121] As new signals are input, the sliding window slides backward to calculate the average heart rate in the next sliding window. Since the new sliding window contains both the historical time signal and the newly sampled signal, it not only ensures the effect of real-time calculation of heart rate, but also ensures the accuracy of prediction, thereby realizing real-time non-contact detection of heart rate.
[0122] Furthermore, since there is a certain uncertainty in the signal waveform obtained by the Newton iteration method, in order to prevent the occurrence of abnormal heart rate values, this embodiment sets a threshold (for example, it can be set to 5bpm) between two average heart rate calculation values to judge abnormal values.
[0123] Specifically, after calculating the average heart rate in the current sliding window, it is determined whether the average heart rate in the current sliding window is an abnormal value based on a preset threshold:
[0124] If the difference between the average heart rate in the current sliding window and the average heart rate in the previous sliding window is greater than a preset threshold, the average heart rate in the current sliding window is regarded as an abnormal value, and the signal in the current sliding window is re-blind source separated, and the average heart rate is calculated again and judged;
[0125] If the average heart rate in the current sliding window is determined to be an abnormal value three times in a row, the one with the smallest difference between the average heart rate in the previous sliding window and the three calculation results is selected as the average heart rate in the current sliding window.
[0126] If it is determined that the average heart rate in the current sliding window is not an abnormal value, or after the average heart rate of the current sliding window is determined after three judgments, the next sliding window is entered to calculate the average heart rate.
[0127] When calculating the average heart rate in the window, the present invention sets a threshold value for heart rate change to perform abnormal value judgment, thereby reducing errors caused by abnormal heart rate values and further improving measurement accuracy.
[0128] The present invention proposes a real-time non-contact heart rate detection method based on an improved FastICA algorithm. First, a face region of interest is detected and extracted in a video stream to obtain an original three-channel time signal containing heart rate information. Then, an improved third-order dual-factor adaptive FastICA algorithm is designed to perform blind source separation on the original three-channel time signal to obtain an estimated PPG physiological signal. The adaptive factor introduced can constrain the initial value to converge in the direction of gradient descent, thereby reducing the sensitivity to the initial value. Meanwhile, the iterative formula in the algorithm is improved to the third order, thereby increasing the iteration speed. Finally, the idea of a sliding window is introduced to perform periodic analysis on the signal in the time domain, and only the signal within the sliding window is processed each time. Since the sliding window contains both the historical time signal and the newly sampled signal, the present invention not only achieves the effect of real-time heart rate calculation, but also ensures the detection accuracy.
[0129] In order to verify the effectiveness of the method proposed in the present invention, simulation experiments are carried out using the algorithm proposed in the present invention and the traditional FastICA algorithm to compare their iterative performance and heart rate detection results.
[0130] In this simulation experiment, both algorithms are run on Intel(R) Core(TM) i5-8500 CPU@3.00GHz and NVIDIA GeForce GTX1070Ti in Matlab environment. The simulation results are shown in Figure 5-7 shown.
[0131] in, Figure 5 This is a performance comparison chart of the improved FastICA algorithm of the present invention and the traditional FastICA algorithm. It can be found that the third-order FastICA algorithm using the present invention to introduce a double relaxation factor reduces the average number of iterations by 31.1 times, improves by 64.1%, and reduces the iteration standard deviation by 5.21, while ensuring the separation accuracy. That is to say, the number of iterations of the algorithm each time is more stable, and the iteration stability is improved by 64.3%. It can be obtained through analysis that the improved FastICA algorithm has better separation performance and separation speed.
[0132] Figure 6 The figure is the heart rate waveform and operation result diagram extracted by the improved FastICA algorithm of the present invention. It can be seen from the experimental results that the heart rate signal extracted from the video, excluding video acquisition and face signal extraction, has an average processing time of 0.64 seconds for every 10s face signal; for a 180s video, the algorithm processing time is 11.6 seconds, and the video frame rate is 35fps, that is, the algorithm can process about 547 frames per second on average. For a real-time monitoring system, it fully meets the requirements.
[0133] Figure 7 This is a data comparison chart of the measured heart rate and the reference heart rate obtained by using the improved FastICA algorithm of the present invention. Among them, the data set used for the test of the present invention is UBFC-RPPG. In the figure, the blue solid line is the measured heart rate value, and the red solid line is the reference heart rate value extracted from the bvp signal given in the data set. Figure 7 It can be seen that, except for a few abnormal heart rates, the reference heart rate and the measured heart rate have good consistency. After analysis, it can be seen that the average error of the heart rate is 1.77bpm and the standard deviation is 2.07. Therefore, it can be considered that the improved FastICA algorithm can better reflect the human heart rate information.
[0134] Therefore, the effectiveness of the present invention is verified.
[0135] Embodiment 2
[0136] On the basis of the above-mentioned first embodiment and based on the same inventive concept, this embodiment provides a real-time non-contact heart rate detection system based on an improved FastICA algorithm.
[0137] See also Figure 8 , Figure 8 : is a structural block diagram of a real-time non-contact heart rate detection system based on an improved FastICA algorithm provided by an embodiment of the present invention, specifically comprising:
[0138] A data acquisition module is used to acquire a video stream including facial information of the object to be tested, detect and extract the facial region of interest in the video stream, and obtain an original three-channel time signal;
[0139] A data separation module is used to perform blind source separation on the original three-channel time signal using an improved third-order double relaxation factor adaptive FastICA algorithm to obtain an estimated PPG physiological signal;
[0140] The data analysis module is used to perform periodic analysis on the PPG physiological signal in the time domain based on the sliding window to obtain the average heart rate in each sliding window to achieve real-time non-contact detection of the heart rate.
[0141] The device provided in this embodiment can implement the method provided in the above-mentioned embodiment 1, thereby, the device can also realize real-time non-contact detection of heart rate with high detection accuracy.
[0142] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A real-time non-contact heart rate detection method based on an improved FastICA algorithm, characterized in that: include: Acquire a video stream including facial information of the object to be tested, detect and extract a facial region of interest in the video stream, and obtain an original three-channel time signal; Using an improved third-order dual-factor adaptive FastICA algorithm to perform blind source separation on the original three-channel time signal to obtain an estimated PPG physiological signal; Based on the sliding window, the PPG physiological signal is periodically analyzed in the time domain to obtain the average heart rate in each sliding window, so as to realize real-time non-contact detection of the heart rate.
2. The real-time non-contact heart rate detection method based on the improved FastICA algorithm according to claim 1, characterized in that: Before using the improved third-order dual-factor adaptive FastICA algorithm to perform blind source separation on the original three-channel time signal, the method further includes: The original three-channel time signal is subjected to upsampling processing and high-pass filtering processing.
3. The real-time non-contact heart rate detection method based on the improved FastICA algorithm according to claim 1, characterized in that: The improved third-order dual-factor adaptive FastICA algorithm is used to perform blind source separation on the original three-channel time signal to obtain an estimated PPG physiological signal, specifically including: a) performing de-averaging and whitening processing on the original three-channel time signal; b) Take a random initial weight vector w0, set the convergence error 0<ε≤1, and initialize two relaxation factors α1 and α2; c) The Newton iteration formula of the traditional FastICA algorithm is changed to the third order, and the relaxation factors α1 and α2 are introduced, and the weight vector w is calculated using the improved third-order dual-factor adaptive FastICA algorithm iteration formula k+1 ; Wherein, k represents the sequence number of the source signal to be separated; d) For the weight vector w k+1 Perform orthogonalization and normalization, and determine whether ||w is satisfied k+1 -w k ||<ε; if not satisfied, return to step c); if satisfied, the weight vector w k+1 Separate them as a group of independent components, and return to step b) to extract the next group of independent components; e) Repeat steps b)-d) until all independent components are separated and a complete separation matrix is obtained; f) multiplying the separation matrix by the signal obtained in step a) to obtain an estimated PPG physiological signal.
4. The real-time non-contact heart rate detection method based on the improved FastICA algorithm according to claim 3, characterized in that: After step b) and before step c), the method further comprises: Determine whether the relaxation factors α1 and α2 satisfy the constraint conditions. If not, update the relaxation factors α1 and α2 and re-determine until the constraint conditions are satisfied. The constraints are: In the formula, w k represents the calculated weight vector corresponding to the kth source signal to be separated, α1 and α2 represent relaxation factors, F(·) represents the optimal value expression of the objective function, and J F (·) represents the Jacobian matrix of F(·), and ||·|| represents the matrix norm.
5. The real-time non-contact heart rate detection method based on the improved FastICA algorithm according to claim 3, characterized in that: The improved three-order dual-factor adaptive FastICA algorithm iteration formula is: Where E[·] represents the mean, α1 and α2 represent relaxation factors, β represents a constant factor, x represents the whitened observation vector, g(·) represents a non-square nonlinear function, g'(·) represents the derivative of g(·), T represents the transposition operation, λ1 and λ2 represent adjustable sliding factors, which are hyperparameters set according to the experimental results, and ||·|| represents the matrix norm.
6. The real-time non-contact heart rate detection method based on the improved FastICA algorithm according to claim 1, characterized in that: Before analyzing the PPG physiological signal based on the sliding window, the method further includes: The PPG physiological signal is subjected to wavelet packet decomposition and noise reduction to make the signal smooth.
7. The real-time non-contact heart rate detection method based on the improved FastICA algorithm according to claim 6, characterized in that: When performing wavelet packet decomposition and denoising on the PPG physiological signal, 6 decomposition layers are specifically used for wavelet packet decomposition, and a threshold is determined according to each wavelet packet decomposition coefficient; at the same time, an eighth-order db function is used as a wavelet packet basis to achieve wavelet packet decomposition and denoising.
8. The real-time non-contact heart rate detection method based on the improved FastICA algorithm according to claim 1, characterized in that: Based on the sliding window, the PPG physiological signal is periodically analyzed in the time domain to obtain the average heart rate in each sliding window, so as to realize the real-time non-contact detection of the heart rate, which specifically includes: Removing the baseline drift in the PPG physiological signal and filtering it with a low-pass filter to obtain a filtered signal; Based on the preset sliding window length, filter the signal peaks from the filtered signal in the current sliding window, select points whose amplitude is greater than 0 and whose interval between adjacent peaks is greater than half the sampling frequency, so as to obtain the number of heart rate signal peaks and interval time in the window; Calculating the instantaneous heart rate according to the interval time and the sampling frequency, and calculating the average value of all instantaneous heart rates in the current sliding window to obtain the average heart rate in the current sliding window; The sliding window is slid backward, and the average heart rate in the next sliding window is calculated, thereby achieving real-time non-contact detection of the heart rate.
9. The real-time non-contact heart rate detection method based on the improved FastICA algorithm according to claim 8, characterized in that: After obtaining the average heart rate in the current sliding window, it also includes: Determine whether the average heart rate in the current sliding window is an abnormal value: If the difference between the average heart rate in the current sliding window and the average heart rate in the previous sliding window is greater than a preset threshold, the average heart rate in the current sliding window is regarded as an abnormal value, and the signal in the current sliding window is re-blind source separated, and the average heart rate is calculated again and judged; If the average heart rate in the current sliding window is determined to be an abnormal value three times in a row, the one with the smallest difference between the average heart rate in the previous sliding window and the three calculation results is selected as the average heart rate in the current sliding window.
10. A real-time non-contact heart rate detection system based on an improved FastICA algorithm, used to implement the method described in any one of claims 1 to 9, characterized in that: include: A data acquisition module is used to acquire a video stream including facial information of the object to be tested, detect and extract a facial region of interest in the video stream, and obtain an original three-channel time signal; A data separation module, used for performing blind source separation on the original three-channel time signal by using an improved third-order double relaxation factor adaptive FastICA algorithm to obtain an estimated PPG physiological signal; The data analysis module is used to perform periodic analysis on the PPG physiological signal in the time domain based on a sliding window to obtain the average heart rate in each sliding window to achieve real-time non-contact detection of the heart rate.
Citation Information
Patent Citations
A non-contact driver heart rate detection method
CN116012820B
Method for eliminating EEG signal noise artifact
CN109009092A
Fault diagnosis method for switching current circuit based on improved FastICA
CN109188244A
Non-contact heart rate measurement method and system based on face video
CN114387479A
Non-contact heart rate detection method and device based on millimeter wave radar
CN116616736A