CN115376179A - Non-contact heart rate measuring method and system - Google Patents
Non-contact heart rate measuring method and system Download PDFInfo
- Publication number
- CN115376179A CN115376179A CN202210416920.6A CN202210416920A CN115376179A CN 115376179 A CN115376179 A CN 115376179A CN 202210416920 A CN202210416920 A CN 202210416920A CN 115376179 A CN115376179 A CN 115376179A
- Authority
- CN
- China
- Prior art keywords
- signal
- heart rate
- face
- modal
- interest
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 71
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 76
- 238000009532 heart rate measurement Methods 0.000 claims abstract description 41
- 238000000354 decomposition reaction Methods 0.000 claims abstract description 35
- 238000001514 detection method Methods 0.000 claims abstract description 23
- 238000001228 spectrum Methods 0.000 claims abstract description 20
- 238000004364 calculation method Methods 0.000 claims description 28
- 230000006870 function Effects 0.000 claims description 23
- 239000003550 marker Substances 0.000 claims description 22
- 239000013598 vector Substances 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 19
- 230000003190 augmentative effect Effects 0.000 claims description 15
- 230000007613 environmental effect Effects 0.000 claims description 15
- 238000000605 extraction Methods 0.000 claims description 7
- VYZAMTAEIAYCRO-UHFFFAOYSA-N Chromium Chemical compound [Cr] VYZAMTAEIAYCRO-UHFFFAOYSA-N 0.000 abstract description 17
- 230000001121 heart beat frequency Effects 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 20
- 238000005457 optimization Methods 0.000 description 19
- 238000012545 processing Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 11
- 230000033001 locomotion Effects 0.000 description 7
- 238000003860 storage Methods 0.000 description 7
- 238000013186 photoplethysmography Methods 0.000 description 6
- 238000012935 Averaging Methods 0.000 description 4
- 239000000284 extract Substances 0.000 description 4
- 229910052736 halogen Inorganic materials 0.000 description 4
- 150000002367 halogens Chemical class 0.000 description 4
- 230000000717 retained effect Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000003384 imaging method Methods 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 239000013589 supplement Substances 0.000 description 3
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 2
- 238000010521 absorption reaction Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 239000008280 blood Substances 0.000 description 2
- 210000004369 blood Anatomy 0.000 description 2
- 230000017531 blood circulation Effects 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 2
- 238000005314 correlation function Methods 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 230000001815 facial effect Effects 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 102000001554 Hemoglobins Human genes 0.000 description 1
- 108010054147 Hemoglobins Proteins 0.000 description 1
- 206010024500 Limb malformation Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 210000000748 cardiovascular system Anatomy 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000000691 measurement method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000000047 product Substances 0.000 description 1
- 102000004169 proteins and genes Human genes 0.000 description 1
- 108090000623 proteins and genes Proteins 0.000 description 1
- 230000000284 resting effect Effects 0.000 description 1
- 231100000075 skin burn Toxicity 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/0059—Measuring for diagnostic purposes; Identification of persons using light, e.g. diagnosis by transillumination, diascopy, fluorescence
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/02—Detecting, measuring or recording for evaluating the cardiovascular system, e.g. pulse, heart rate, blood pressure or blood flow
- A61B5/024—Measuring pulse rate or heart rate
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Engineering & Computer Science (AREA)
- Medical Informatics (AREA)
- Surgery (AREA)
- Biophysics (AREA)
- Pathology (AREA)
- Veterinary Medicine (AREA)
- Biomedical Technology (AREA)
- Heart & Thoracic Surgery (AREA)
- Public Health (AREA)
- Molecular Biology (AREA)
- Physics & Mathematics (AREA)
- Animal Behavior & Ethology (AREA)
- General Health & Medical Sciences (AREA)
- Cardiology (AREA)
- Physiology (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Psychiatry (AREA)
- Signal Processing (AREA)
- Measuring And Recording Apparatus For Diagnosis (AREA)
Abstract
本发明提供一种非接触式心率测量方法及系统,属于生理参数检测设备技术领域,获取待测者的多帧人脸图像;确定每一帧人脸图像中的人脸感兴趣区域;对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;基于IPPG信号获取色度信号;对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。本发明通过CHROM算法可将像素值的强度和光强以及颜色分离,消除噪声;对信号进行VMD算法,根据心跳频率特征,使用VMD算法将主要信号分解为不同模态,保证了各模态之间信号频率范围互不重叠,分离出较为完整且无谐波残留的心跳信号。
The invention provides a non-contact heart rate measurement method and system, belonging to the technical field of physiological parameter detection equipment, which acquires multiple frames of human face images of a person to be tested; determines the face area of interest in each frame of human face images; The skin pixels in the area of interest of the face are accumulated and averaged to obtain the IPPG signal; the chrominance signal is obtained based on the IPPG signal; the variational mode decomposition algorithm is performed on the chrominance signal to obtain multiple modal components, and the one with the largest peak in the spectrum The modal component is the heart rate signal. The invention can separate the intensity of the pixel value from the light intensity and the color through the CHROM algorithm, and eliminate the noise; the signal is subjected to the VMD algorithm, and according to the heartbeat frequency characteristics, the main signal is decomposed into different modes by using the VMD algorithm, which ensures the accuracy of each mode. The frequency ranges of the signals do not overlap each other, and a relatively complete heartbeat signal without harmonic residue is separated.
Description
技术领域technical field
本发明涉及生理参数检测设备技术领域,具体涉及一种非接触式心率测量方法及系统。The invention relates to the technical field of physiological parameter detection equipment, in particular to a non-contact heart rate measurement method and system.
背景技术Background technique
传统的心率测量需要通过胸前导联的心电图技术进行检查。该方法需要将多个电极准确安置在身体指定部位,为降低接触阻抗电极往往要打入导电膏以增强导电性,致使检测过程费时费力,且无法在受试者运动状态下进行检测。Conventional heart rate measurement requires checking with electrocardiographic techniques through the chest leads. This method requires multiple electrodes to be accurately placed on designated parts of the body. In order to reduce the contact impedance, the electrodes are often filled with conductive paste to enhance conductivity, which makes the detection process time-consuming and laborious, and it cannot be detected while the subject is in motion.
光电容积脉搏波描记技术(Photoplethysmography,PPG)检测心率,其原理是:心血管系统中传播的脉动血液改变了皮肤组织中的血量,含氧血液循环导致血红蛋白分子和蛋白质数量的波动,从而导致整个光谱的光学吸收的波动,而这种光学吸收波动随时间变化的曲线就是脉搏波,可对其处理从而提取出心率信号。但由于PPG监测区域位置单一、需要与待测者的皮肤进行接触等问题,限制了其应用范围。Photoplethysmography (PPG) detects heart rate. The principle is that the pulsating blood traveling in the cardiovascular system changes the blood volume in the skin tissue, and the oxygenated blood circulation causes fluctuations in the number of hemoglobin molecules and proteins, resulting in The fluctuation of optical absorption across the spectrum, and the curve of this optical absorption fluctuation with time is the pulse wave, which can be processed to extract the heart rate signal. However, due to the single location of the PPG monitoring area and the need to contact the skin of the test subject, its application range is limited.
成像式光电容积描记技术(Imaging Photoplethysmography,IPPG),是一种以成像为基础的脉搏波测量方法,该技术的原理是利用RGB摄像头来捕获皮肤反射的微小颜色变化从而识别血液循环的阶段,提取出脉搏波信号,具有不与被测试部位接触、操作简单易行等优点,可以解决皮肤烧伤或者肢体残缺的病人以及婴幼儿难以使用接触式仪器测量生理参数的难题。但成像式光电容积描记技术对光照和运动比较敏感,只能在光源充足和静息状态下才能较为准确的测量心率。Imaging Photoplethysmography (IPPG) is an imaging-based pulse wave measurement method. The principle of this technology is to use an RGB camera to capture small color changes reflected in the skin to identify the stage of blood circulation and extract The pulse wave signal output has the advantages of no contact with the tested part, simple and easy operation, etc., which can solve the problem that patients with skin burns or limb defects and infants are difficult to use contact instruments to measure physiological parameters. However, imaging photoplethysmography technology is sensitive to light and motion, and can only measure heart rate more accurately when the light source is sufficient and in a resting state.
发明内容Contents of the invention
本发明的目的在于提供一种基于色度远程光电容积描记技术(Chrominance-Based RPPG,CHROM)和变分模态分解(Variational Mode Decomposition,VMD)的非接触式心率测量方法及系统,以解决上述背景技术中存在的至少一项技术问题。为了实现上述目的,本发明采取了如下技术方案:The object of the present invention is to provide a non-contact heart rate measurement method and system based on chromaticity remote photoplethysmography (Chrominance-Based RPPG, CHROM) and variational mode decomposition (Variational Mode Decomposition, VMD), to solve the above-mentioned At least one technical problem exists in the background technology. In order to achieve the above object, the present invention has taken the following technical solutions:
一方面,本发明提供一种非接触式心率测量方法,包括:In one aspect, the present invention provides a non-contact heart rate measurement method, comprising:
获取待测者的多帧人脸图像;Obtain multiple frames of face images of the person to be tested;
确定每一帧人脸图像中的人脸感兴趣区域;Determine the face region of interest in each frame of face image;
对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;Accumulate and average the skin pixels in the region of interest of all faces to obtain the IPPG signal;
基于IPPG信号获取色度信号;Obtain a chrominance signal based on the IPPG signal;
对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。A variational mode decomposition algorithm is performed on the chrominance signal to obtain multiple modal components, and the modal component with the largest peak value in the spectrum is the heart rate signal.
优选的,获取人脸感兴趣区域包括:利用landmark人脸识别模型获取人脸标记点,设定人脸感兴趣区域,使用肤色检测器剔除掉人脸边缘的环境信息。Preferably, obtaining the ROI of the human face includes: using a landmark face recognition model to obtain facial landmarks, setting the ROI of the human face, and using a skin color detector to remove the environmental information of the edge of the human face.
优选的,所述肤色检测器使用多色彩空间肤色检测算法。Preferably, the skin color detector uses a multi-color space skin color detection algorithm.
优选的,获取色度信号包括:Preferably, obtaining the chrominance signal includes:
对IPPG信号进行RGB三通道提取,再对RGB通道信号进行归一化处理;RGB three-channel extraction is performed on the IPPG signal, and then the RGB channel signal is normalized;
将归一化后的RGB值投射到两个正交色度向量;Project the normalized RGB values to two orthogonal chrominance vectors;
对两个正交向量经过巴特沃斯带通滤波器滤波,得到滤波后的信号;Filter the two orthogonal vectors with a Butterworth bandpass filter to obtain the filtered signal;
基于滤波后的信号计算色度信号。A chrominance signal is calculated based on the filtered signal.
优选的,采用交替方向乘子算法更新迭代求解正交色度向量计算中的鞍点,在频域利用增广Lagrange函数以及约束变分模型迭代更新模态分量和增广Lagrange函数乘子,直至满足迭代终止条件,得到模态分量。Preferably, the alternate direction multiplier algorithm is used to update and iteratively solve the saddle point in the orthogonal chromaticity vector calculation, and the modal component and the augmented Lagrange function multiplier are iteratively updated in the frequency domain by using the augmented Lagrange function and the constrained variational model until satisfying Iterate the termination condition to obtain the modal components.
优选的,变分模态分解算法中涉及的约束变分模型为:Preferably, the constrained variational model involved in the variational mode decomposition algorithm is:
其中,{uk}表示第k个模态分量,{wk}表示第k个模态分量的中心频率,K表示模态分量的个数,表示偏导运算,δ(t)表示单位脉冲函数,j表示虚数单位,*表示卷积运算,f表示目标信号;Among them, {u k } represents the kth modal component, {w k } represents the center frequency of the kth modal component, K represents the number of modal components, Represents the partial derivative operation, δ(t) represents the unit pulse function, j represents the imaginary number unit, * represents the convolution operation, and f represents the target signal;
引入惩罚因子α和Lagrange乘子λ以求解变分约束问题,增广Lagrange函数表达式如下:The penalty factor α and the Lagrange multiplier λ are introduced to solve the variational constraint problem, and the expression of the augmented Lagrange function is as follows:
优选的,在频域利用下式更新模态分量的中心频率:Preferably, the center frequency of the modal component is updated using the following formula in the frequency domain:
其中,ω表示频率,i表示第i模态分量,d表示求导。Among them, ω represents the frequency, i represents the i-th modal component, and d represents the derivative.
结合下式更新λ:Combine the following formula to update λ:
其中,τ表示保真系数,∧表示傅里叶变换,n表示迭代次数。Among them, τ represents the fidelity coefficient, ∧ represents the Fourier transform, and n represents the number of iterations.
优选的,迭代终止条件为:Preferably, the iteration termination condition is:
其中,ε表示判别精度,且ε>0。Among them, ε represents the discrimination accuracy, and ε>0.
第二方面,本发明提供一种非接触式心率测量系统,包括:In a second aspect, the present invention provides a non-contact heart rate measurement system, comprising:
获取模块,用于获取待测者的多帧人脸图像;An acquisition module, configured to acquire multiple frames of human face images of the person to be tested;
识别模块,用于确定每一帧人脸图像中的人脸感兴趣区域;A recognition module, configured to determine the face region of interest in each frame of face images;
第一计算模块,用于对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;The first calculation module is used to accumulate and average the skin pixels in the region of interest of all faces to obtain the IPPG signal;
第二计算模块,用于基于IPPG信号获取色度信号;The second calculation module is used to obtain the chrominance signal based on the IPPG signal;
第三计算模块,用于对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。The third calculation module is used to perform a variational mode decomposition algorithm on the chrominance signal to obtain multiple mode components, and the mode component with the largest peak value in the frequency spectrum is the heart rate signal.
第三方面,本发明提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质用于存储计算机指令,所述计算机指令被处理器执行时,实现如上所述的非接触式心率测量方法。In a third aspect, the present invention provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the above-mentioned non-transitory Contact heart rate measurement method.
第四方面,本发明提供一种电子设备,包括:处理器、存储器以及计算机程序;其中,处理器与存储器连接,计算机程序被存储在存储器中,当电子设备运行时,所述处理器执行所述存储器存储的计算机程序,以使电子设备执行实现如上所述的非接触式心率测量方法的指令。In a fourth aspect, the present invention provides an electronic device, including: a processor, a memory, and a computer program; wherein, the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the The computer program stored in the memory, so that the electronic device executes the instructions for realizing the above-mentioned non-contact heart rate measurement method.
本发明有益效果:Beneficial effects of the present invention:
通过CHROM算法可将像素值的强度和光强以及颜色分离,消除噪声;对信号进行VMD算法,根据心跳频率特征,使用VMD算法将主要信号分解为不同模态,保证了各模态之间信号频率范围互不重叠,分离出较为完整且无谐波残留的心跳信号。Through the CHROM algorithm, the intensity, light intensity and color of the pixel value can be separated to eliminate noise; the signal is subjected to the VMD algorithm, and according to the heartbeat frequency characteristics, the main signal is decomposed into different modes by using the VMD algorithm to ensure the signal between the modes The frequency ranges do not overlap with each other, and a relatively complete heartbeat signal without harmonic residue is separated.
针对复杂的面部条件,特别是当存在着头发、眼镜或者胡子等非皮肤像素干扰信息时,采用多色彩空间肤色检测算法进行非肤色像素的剔除,获得高稳定性、高信噪比的ROI。For complex facial conditions, especially when there is non-skin pixel interference information such as hair, glasses or beard, the multi-color space skin color detection algorithm is used to remove non-skin color pixels to obtain ROI with high stability and high signal-to-noise ratio.
在进行脉搏波信号提取时,脉搏波中不可避免地存在由于人脸移动、光照方向改变而引入的噪声,为了进一步剔除这些噪声,采用自动寻优的变分模态分解算法,可实现噪声的剔除获得高信噪比的脉搏波信息,实现高准确性的非接触式心率检测。When extracting the pulse wave signal, there will inevitably be noise introduced in the pulse wave due to the movement of the face and the change of the light direction. Eliminate pulse wave information with high signal-to-noise ratio to achieve high-accuracy non-contact heart rate detection.
本发明附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in part in the description which follows, and will become apparent from the description, or may be learned by practice of the invention.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.
图1为本发明实施例所述的非接触式心率测量方法的流程图;Fig. 1 is the flowchart of the non-contact heart rate measurement method described in the embodiment of the present invention;
图2为本发明实施例所述人脸感兴趣区域示意图;FIG. 2 is a schematic diagram of a face region of interest according to an embodiment of the present invention;
图3为本发明实施例所述的人脸图像的处理过程示意图;Fig. 3 is a schematic diagram of the processing process of the face image described in the embodiment of the present invention;
图4为本发明实施例所述的获取模块的结构图;FIG. 4 is a structural diagram of an acquisition module according to an embodiment of the present invention;
图5为本发明实施例所述的模态分量的个数和惩罚因子自动寻优的流程图。Fig. 5 is a flowchart of the automatic optimization of the number of modal components and penalty factors according to the embodiment of the present invention.
具体实施方式Detailed ways
下面详细叙述本发明的实施方式,所述实施方式的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过附图描述的实施方式是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with the drawings are exemplary, and are only used to explain the present invention, but not to be construed as limiting the present invention.
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语)具有与本发明所属领域中的普通技术人员的一般理解相同的意义。Those skilled in the art can understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
还应该理解的是,诸如通用字典中定义的那些术语应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样定义,不会用理想化或过于正式的含义来解释。It should also be understood that terms such as those defined in commonly used dictionaries should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted in an idealized or overly formal sense unless defined as herein explain.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件和/或它们的组。Those skilled in the art will understand that unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the word "comprising" used in the description of the present invention refers to the presence of said features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements and/or groups thereof.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present invention. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other.
为便于理解本发明,下面结合附图以具体实施例对本发明作进一步解释说明,且具体实施例并不构成对本发明实施例的限定。In order to facilitate the understanding of the present invention, the present invention will be further explained below with specific embodiments in conjunction with the accompanying drawings, and the specific embodiments are not intended to limit the embodiments of the present invention.
本领域技术人员应该理解,附图只是实施例的示意图,附图中的部件并不一定是实施本发明所必须的。Those skilled in the art should understand that the drawings are only schematic diagrams of the embodiments, and the components in the drawings are not necessarily necessary for implementing the present invention.
实施例1Example 1
本实施例1提供一种非接触式心率测量系统,使用该系统实现了非接触式的心率测量,无需对皮肤涂抹导电膏,无需利用电极接触身体的指定部位,其通过精准定位人脸检测,结合光强以及颜色信息的剔除和噪声去除,来提取心率信号。This
本实施例1中,所述的非接触式心率测量系统,其主要包括如下功能模块:In the
获取模块,用于获取待测者的多帧人脸图像;An acquisition module, configured to acquire multiple frames of human face images of the person to be tested;
识别模块,用于确定每一帧人脸图像中的人脸感兴趣区域;A recognition module, configured to determine the face region of interest in each frame of face images;
第一计算模块,用于对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;The first calculation module is used to accumulate and average the skin pixels in the region of interest of all faces to obtain the IPPG signal;
第二计算模块,用于基于IPPG信号获取色度信号;The second calculation module is used to obtain the chrominance signal based on the IPPG signal;
第三计算模块,用于对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。The third calculation module is used to perform a variational mode decomposition algorithm on the chrominance signal to obtain multiple mode components, and the mode component with the largest peak value in the frequency spectrum is the heart rate signal.
本实施例1中,利用上述的非接触式心率测量系统,实现了非接触式心率测量方法,该方法包括:In the
使用获取模块来获取待测者的多帧人脸图像;Use the acquisition module to acquire multiple frames of face images of the person to be tested;
利用识别模块确定每一帧人脸图像中的人脸感兴趣区域;Utilize the recognition module to determine the region of interest of the face in each frame of face image;
使用第一计算模块对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;Use the first calculation module to accumulate and average the skin pixels in the region of interest of all faces to obtain an IPPG signal;
使用第二计算模块对IPPG信号进行处理获取色度信号;Use the second calculation module to process the IPPG signal to obtain a chrominance signal;
使用第三模块对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。The third module is used to perform a variational modal decomposition algorithm on the chrominance signal to obtain multiple modal components, and the modal component with the largest peak value in the spectrum is the heart rate signal.
本实施例1中,获取人脸感兴趣区域包括:利用landmark人脸识别模型获取人脸标记点,设定人脸感兴趣区域,使用肤色检测器剔除掉人脸边缘的环境信息。In
本实施例1中,获取色度信号包括:In
对IPPG信号进行RGB三通道提取,再对RGB通道信号进行归一化处理;RGB three-channel extraction is performed on the IPPG signal, and then the RGB channel signal is normalized;
将归一化后的RGB值投射到两个正交色度向量;Project the normalized RGB values to two orthogonal chrominance vectors;
对两个正交向量经过巴特沃斯带通滤波器滤波,得到滤波后的信号;Filter the two orthogonal vectors with a Butterworth bandpass filter to obtain the filtered signal;
基于滤波后的信号计算色度信号。A chrominance signal is calculated based on the filtered signal.
本实施例1中,采用交替方向乘子算法更新迭代求解正交色度向量计算中的鞍点,在频域利用增广Lagrange函数以及约束变分模型迭代更新模态分量和增广Lagrange函数乘子,直至满足迭代终止条件,得到模态分量。In this
本实施例1中,变分模态分解算法中涉及的约束变分模型为:In this
其中,{uk}表示第k个模态分量,{wk}表示第k个模态分量的中心频率,K表示模态分量的个数,表示偏导运算,δ(t)表示单位脉冲函数,j表示虚数单位,*表示卷积运算,f表示目标信号;Among them, {u k } represents the kth modal component, {w k } represents the center frequency of the kth modal component, K represents the number of modal components, Represents the partial derivative operation, δ(t) represents the unit pulse function, j represents the imaginary number unit, * represents the convolution operation, and f represents the target signal;
引入惩罚因子α和Lagrange乘子λ以求解变分约束问题,增广Lagrange函数表达式如下:The penalty factor α and the Lagrange multiplier λ are introduced to solve the variational constraint problem, and the expression of the augmented Lagrange function is as follows:
本实施例1中,在频域利用下式更新模态分量的中心频率:In
其中,ω表示频率,i表示第i模态分量,d表示求导。Among them, ω represents the frequency, i represents the i-th modal component, and d represents the derivative.
结合下式更新λ:Combine the following formula to update λ:
其中,τ表示保真系数,∧表示傅里叶变换,n表示迭代次数。Among them, τ represents the fidelity coefficient, ∧ represents the Fourier transform, and n represents the number of iterations.
本实施例1中,迭代终止条件为:In this
其中,ε表示判别精度,且ε>0。Among them, ε represents the discrimination accuracy, and ε>0.
本实施例1中,提出的非接触式心率测量系统及使用该系统实现的心率测量方法,基于色度远程光电容积描记技术(Chrominance-Based RPPG,CHROM)和变分模态分解(Variational Mode Decomposition,VMD),可用于复杂光照和大幅运动下的非接触式心率测量,对复杂环境下生命体征实时监测有重要的应用价值。In this
实施例2Example 2
本实施例2中,提供一种非接触式心率测量系统,通过获取人脸图像,对人脸图像进行信号处理,最终获得心率信号。In Embodiment 2, a non-contact heart rate measurement system is provided, which acquires a face image, performs signal processing on the face image, and finally obtains a heart rate signal.
本实施例2中,所述的非接触式心率测量系统,其主要包括如下功能模块:In Embodiment 2, the non-contact heart rate measurement system mainly includes the following functional modules:
获取模块,用于获取待测者的多帧人脸图像;An acquisition module, configured to acquire multiple frames of human face images of the person to be tested;
识别模块,用于确定每一帧人脸图像中的人脸感兴趣区域;A recognition module, configured to determine the face region of interest in each frame of face images;
第一计算模块,用于对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;The first calculation module is used to accumulate and average the skin pixels in the region of interest of all faces to obtain the IPPG signal;
第二计算模块,用于基于IPPG信号获取色度信号;The second calculation module is used to obtain the chrominance signal based on the IPPG signal;
第三计算模块,用于对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。The third calculation module is used to perform a variational mode decomposition algorithm on the chrominance signal to obtain multiple mode components, and the mode component with the largest peak value in the frequency spectrum is the heart rate signal.
本实施例2中,利用上述的非接触式心率测量系统,实现了非接触式心率测量方法,该方法包括:In Embodiment 2, the above-mentioned non-contact heart rate measurement system is used to realize a non-contact heart rate measurement method, which includes:
使用获取模块来获取待测者的多帧人脸图像;Use the acquisition module to acquire multiple frames of face images of the person to be tested;
利用识别模块确定每一帧人脸图像中的人脸感兴趣区域;Utilize the recognition module to determine the region of interest of the face in each frame of face image;
使用第一计算模块对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;Use the first calculation module to accumulate and average the skin pixels in the region of interest of all faces to obtain an IPPG signal;
使用第二计算模块对IPPG信号进行处理获取色度信号;Use the second calculation module to process the IPPG signal to obtain a chrominance signal;
使用第三模块对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。The third module is used to perform a variational modal decomposition algorithm on the chrominance signal to obtain multiple modal components, and the modal component with the largest peak value in the spectrum is the heart rate signal.
本实施例2中,获取模块包括工业相机,通过工业相机,结合卤素灯(其光波范围包括可见光和不可见光范围)用来对人脸进行补光,以获得较好图像质量。将捕捉到的人脸视频序列通过USB3.0数据传输线输入到PC端(计算机系统)中,利用该PC端中的识别模块、第一计算模块、第二计算模块、第三计算模块对图像进行处理,最终获得心率信号。In Embodiment 2, the acquisition module includes an industrial camera, which is used to supplement light on the human face in combination with a halogen lamp (its light wave range includes visible light and invisible light range) to obtain better image quality. The human face video sequence captured is input in the PC end (computer system) by USB3. processing, and finally obtain the heart rate signal.
首先对捕获到的视频进行帧处理,获取每一帧人脸图像。First, frame processing is performed on the captured video to obtain each frame of face image.
获取人脸感兴趣区域包括:利用landmark人脸识别模型获取人脸标记点,设定人脸感兴趣区域,使用肤色检测器剔除掉人脸边缘的环境信息。Obtaining the area of interest of the face includes: using the landmark face recognition model to obtain face marker points, setting the area of interest of the face, and using the skin color detector to remove the environmental information of the edge of the face.
识别模块中的人脸识别程序使用的是基于梯度提高学习的回归树方法(Ensembleof Regression Trees,ERT)生成的landmark模型。通过landmark模型获取68个人脸标记点,设定人脸感兴趣区域如图2所示,其中,左上角的图为人脸标记点掩膜图,右上角的图为实际人脸掩膜图,左下角的图为使用肤色检测器后的实际ROI图,右下角的图为实际ROI图的二值图。在检测过程中,难免会遇到人脸边缘包含少部分环境信息,在后续使用肤色检测器,将感兴趣区域通过肤色检测器剔除掉人脸边缘的环境信息。The face recognition program in the recognition module uses the landmark model generated by the regression tree method (Ensemble of Regression Trees, ERT) based on gradient improvement learning. Obtain 68 face marker points through the landmark model, and set the face interest area as shown in Figure 2. Among them, the picture in the upper left corner is the mask map of face marker points, the picture in the upper right corner is the actual face mask map, and the picture in the lower left corner The picture in the corner is the actual ROI map after using the skin color detector, and the picture in the lower right corner is the binary map of the actual ROI map. In the detection process, it is inevitable that the edge of the face contains a small amount of environmental information. In the subsequent use of the skin color detector, the area of interest is eliminated by the skin color detector to remove the environmental information of the edge of the face.
对处理过后的所有皮肤像素进行累加平均获得原始的IPPG信号。The original IPPG signal is obtained by accumulating and averaging all the processed skin pixels.
本实施例2中,使用第二计算模块获取色度信号包括:对IPPG信号进行RGB三通道提取,再对RGB通道信号进行归一化处理;将归一化后的RGB值投射到两个正交色度向量;对两个正交向量经过巴特沃斯带通滤波器滤波,得到滤波后的信号;基于滤波后的信号计算色度信号。具体的:In this embodiment 2, using the second calculation module to obtain the chrominance signal includes: performing RGB three-channel extraction on the IPPG signal, and then performing normalization processing on the RGB channel signal; projecting the normalized RGB value to two positive Intersecting chrominance vectors; filtering two orthogonal vectors with a Butterworth bandpass filter to obtain filtered signals; calculating chrominance signals based on the filtered signals. specific:
利用CHROM算法,对原始的IPPG信号进行处理,其步骤如下:Using the CHROM algorithm to process the original IPPG signal, the steps are as follows:
对原始IPPG信号进行RGB三通道提取,再对RGB通道信号进行归一化处理;将归一化的RGB值投射到两个正交色度向量Xchrom和Ychrom:Extract the RGB three-channel from the original IPPG signal, and then normalize the RGB channel signal; project the normalized RGB value to two orthogonal chrominance vectors X chrom and Y chrom :
Xchrom(t)=3xr(t)-2xg(t) (2)X chrom (t)=3x r (t)-2x g (t) (2)
Ychrom(t)=1.5xr(t)+xg(t)-1.5xb(t) (3)Y chrom (t)=1.5x r (t)+x g (t)-1.5x b (t) (3)
最后输出S(t)为:The final output S(t) is:
S(t)=Xf-αYf; (4)S(t)= Xf - αYf ; (4)
其中,xr表示原始IPPG信号的红色通道分量,xg表示原始IPPG信号的绿色通道分量,xb表示原始IPPG信号的蓝色通道分量,t表示时间,信号波形随时间t变化,Xf、Yf分别是Xchrom,Ychrom经过五阶0.7Hz-4Hz巴特沃斯带通滤波器滤波后的信号;α是Xf、Yf标准差的比值,S(t)为经过CHROM算法处理过的IPPG信号。Among them, x r represents the red channel component of the original IPPG signal, x g represents the green channel component of the original IPPG signal, x b represents the blue channel component of the original IPPG signal, t represents time, and the signal waveform changes with time t, X f , Y f are the signals of X chrom and Y chrom filtered by the fifth-order 0.7Hz-4Hz Butterworth bandpass filter; α is the ratio of the standard deviations of X f and Y f , and S(t) is the The IPPG signal.
在经过CHROM算法后,原始IPPG信号中大部分噪声得到消除。再对S(t)进行VMD算法以得到更精准的心率信号。After the CHROM algorithm, most of the noise in the original IPPG signal is eliminated. Then perform the VMD algorithm on S(t) to obtain a more accurate heart rate signal.
本实施例2中,采用交替方向乘子算法更新迭代求解正交色度向量计算中的鞍点,在频域利用增广Lagrange函数以及约束变分模型迭代更新模态分量和增广Lagrange函数乘子,直至满足迭代终止条件,得到模态分量。In this embodiment 2, the alternate direction multiplier algorithm is used to update and iteratively solve the saddle point in the calculation of the orthogonal chromaticity vector, and the augmented Lagrange function and the constrained variational model are used to iteratively update the modal component and the augmented Lagrange function multiplier in the frequency domain , until the iteration termination condition is met, and the modal components are obtained.
本实施例2中,变分模态分解算法中涉及的约束变分模型为:In Example 2, the constrained variational model involved in the variational mode decomposition algorithm is:
其中,{uk}={u1,u2,...,uk}表示第k个模态分量,{wk}={w1,w2,...,wk}表示第k个模态分量的中心频率,K表示模态分量的个数,表示偏导运算,δ(t)表示单位脉冲函数,j表示虚数单位,*表示卷积运算,f表示目标信号,e表示超越数。Among them, {u k }={u 1 ,u 2 ,...,u k } means the kth modal component, {w k }={w 1 ,w 2 ,...,w k } means the The center frequency of k modal components, K represents the number of modal components, Represents the partial derivative operation, δ(t) represents the unit impulse function, j represents the imaginary number unit, * represents the convolution operation, f represents the target signal, and e represents the transcendental number.
引入惩罚因子α和Lagrange乘子λ以求解变分约束问题,增广Lagrange函数表达式如下:The penalty factor α and the Lagrange multiplier λ are introduced to solve the variational constraint problem, and the expression of the augmented Lagrange function is as follows:
本实施例2中,采用交替方式乘子算法更新迭代求解(7)式中的鞍点,在频域迭代更新uk、wk、λ。In Embodiment 2, an alternate multiplier algorithm is used to update and iteratively solve the saddle point in formula (7), and u k , w k , and λ are iteratively updated in the frequency domain.
本实施例2中,VMD算法将信号分解为3个模态分量(模态分量数量由实验确定),惩罚因子α为2000,分解步骤如下:In this embodiment 2, the VMD algorithm decomposes the signal into 3 modal components (the number of modal components is determined by experiment), the penalty factor α is 2000, and the decomposition steps are as follows:
步骤1:初始化n为零;Step 1: Initialize n is zero;
步骤2:uk和wk分别由(8)式和(9)式迭代更新:Step 2: u k and w k are iteratively updated by formula (8) and formula (9) respectively:
其中,ω表示频率,i表示第i模态分量,d表示求导。Among them, ω represents the frequency, i represents the i-th modal component, and d represents the derivative.
步骤3:通过(10)式更新λ:Step 3: Update λ through formula (10):
其中,τ表示保真系数,∧表示傅里叶变换,n表示迭代次数。Among them, τ represents the fidelity coefficient, ∧ represents the Fourier transform, and n represents the number of iterations.
步骤4:重复步骤2和3,至满足迭代终止条件,终止条件由(11)式给出。Step 4: Repeat steps 2 and 3 until the iteration termination condition is met, which is given by (11).
其中,ε表示判别精度,且ε>0,上标n为迭代步数,下标k表示当前模态数。Among them, ε represents the discrimination accuracy, and ε>0, the superscript n is the number of iteration steps, and the subscript k represents the current mode number.
步骤5:输出3个模态分量。Step 5: Output 3 modal components.
VMD算法输出的3个模态分量中,其中频谱中具有最大峰值的模态分量即为心率信号。Among the three modal components output by the VMD algorithm, the modal component with the largest peak value in the frequency spectrum is the heart rate signal.
本实施例2中,提出的非接触式心率测量系统及使用该系统实现的心率测量方法,基于色度远程光电容积描记技术(Chrominance-Based RPPG,CHROM)和变分模态分解(Variational Mode Decomposition,VMD),可用于复杂光照和大幅运动下的非接触式心率测量,对复杂环境下生命体征实时监测有重要的应用价值。In Example 2, the proposed non-contact heart rate measurement system and the heart rate measurement method realized by using the system are based on Chrominance-Based RPPG (CHROM) and variational mode decomposition (Variational Mode Decomposition) , VMD), which can be used for non-contact heart rate measurement under complex lighting and large-scale motion, and has important application value for real-time monitoring of vital signs in complex environments.
实施例3Example 3
本实施例3中,提供一种非接触式心率测量系统,通过获取人脸图像,对人脸图像进行信号处理,最终获得心率信号。In Embodiment 3, a non-contact heart rate measurement system is provided, which acquires a face image, performs signal processing on the face image, and finally obtains a heart rate signal.
本实施例3中,所述的非接触式心率测量系统,其主要包括如下功能模块:In the third embodiment, the non-contact heart rate measurement system mainly includes the following functional modules:
获取模块,用于获取待测者的多帧人脸图像;An acquisition module, configured to acquire multiple frames of human face images of the person to be tested;
识别模块,用于确定每一帧人脸图像中的人脸感兴趣区域;A recognition module, configured to determine the face region of interest in each frame of face images;
第一计算模块,用于对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;The first calculation module is used to accumulate and average the skin pixels in the region of interest of all faces to obtain the IPPG signal;
第二计算模块,用于基于IPPG信号获取色度信号;The second calculation module is used to obtain the chrominance signal based on the IPPG signal;
第三计算模块,用于对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。The third calculation module is used to perform a variational mode decomposition algorithm on the chrominance signal to obtain multiple mode components, and the mode component with the largest peak value in the frequency spectrum is the heart rate signal.
本实施例3中,利用上述的非接触式心率测量系统,实现了非接触式心率测量方法,该方法包括:In this embodiment 3, the above-mentioned non-contact heart rate measurement system is used to realize a non-contact heart rate measurement method, which includes:
使用获取模块来获取待测者的多帧人脸图像;Use the acquisition module to acquire multiple frames of face images of the person to be tested;
利用识别模块确定每一帧人脸图像中的人脸感兴趣区域;Utilize the recognition module to determine the region of interest of the face in each frame of face image;
使用第一计算模块对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;Use the first calculation module to accumulate and average the skin pixels in the region of interest of all faces to obtain an IPPG signal;
使用第二计算模块对IPPG信号进行处理获取色度信号;Use the second calculation module to process the IPPG signal to obtain a chrominance signal;
使用第三模块对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。The third module is used to perform a variational modal decomposition algorithm on the chrominance signal to obtain multiple modal components, and the modal component with the largest peak value in the spectrum is the heart rate signal.
本实施例3中,如图4所示,获取模块包括工业相机A1,通过工业相机,结合卤素灯A2(其光波范围包括可见光和不可见光范围)用来对受试者A4的人脸进行补光,以获得较好图像质量。将捕捉到的人脸视频序列通过USB3.0数据传输线A5输入到PC端A3(计算机系统)中,利用该PC端中的识别模块、第一计算模块、第二计算模块、第三计算模块对图像进行处理,最终获得心率信号。In this embodiment 3, as shown in Figure 4, the acquisition module includes an industrial camera A1, which is used to complement the face of subject A4 through the industrial camera, combined with the halogen lamp A2 (its light wave range includes visible light and invisible light range). light for better image quality. The human face video sequence that captures is input in the PC end A3 (computer system) by USB3. The image is processed to finally obtain the heart rate signal.
首先对捕获到的视频进行帧处理,获取每一帧人脸图像。First, frame processing is performed on the captured video to obtain each frame of face image.
获取人脸感兴趣区域包括:利用landmark人脸识别模型获取人脸标记点,设定人脸感兴趣区域,使用肤色检测器剔除掉人脸边缘的环境信息。Obtaining the face area of interest includes: using the landmark face recognition model to obtain face marker points, setting the face area of interest, and using the skin color detector to remove the environmental information of the edge of the face.
识别模块中的人脸识别程序使用的是基于梯度提高学习的回归树方法(Ensembleof Regression Trees,ERT)生成的landmark模型。通过landmark模型获取68个人脸标记点,设定人脸感兴趣区域如图2中左上角的图所示,使用标记点0、8、16新生成标记点HL和标记点HR,其中HL和HR的坐标点计算如下:The face recognition program in the recognition module uses the landmark model generated by the regression tree method (Ensemble of Regression Trees, ERT) based on gradient improvement learning. Obtain 68 face marker points through the landmark model, set the area of interest of the face as shown in the upper left corner of Figure 2, use marker points 0, 8, and 16 to generate new marker points HL and marker points HR, where HL and HR The coordinate points of are calculated as follows:
其中,yp8为标记点8的纵坐标,yp0为标记点0的纵坐标,xp0为标记点0的横坐标,yp0为标记点0的纵坐标,xp16为标记点16的横坐标,yp16为标记点16的纵坐标;xHR、yHR和xHL、yHL分解为新标记点HR的横纵坐标和新标记点HL的横纵坐标;通过将标记点0到标记点16、HR、HL依次连接获得人脸区域,将标记点48到标记点59依次连接剔除嘴部区域,最后获得人脸掩膜图,即感兴趣区域。Among them, y p8 is the ordinate of marking point 8, y p0 is the ordinate of marking point 0, x p0 is the abscissa of marking point 0, y p0 is the ordinate of marking point 0, x p16 is the abscissa of marking point 16 Coordinates, y p16 is the vertical coordinate of the marker point 16; x HR , y HR and x HL , y HL are decomposed into the horizontal and vertical coordinates of the new marker point HR and the horizontal and vertical coordinates of the new marker point HL; Points 16, HR, and HL are sequentially connected to obtain the face area, and the mark point 48 to mark point 59 are sequentially connected to remove the mouth area, and finally the face mask map is obtained, that is, the region of interest.
在检测过程中,难免会遇到人脸边缘包含少部分环境信息,在后续使用肤色检测器,将感兴趣区域通过肤色检测器剔除掉人脸边缘的环境信息,具体的,肤色检测器使用多色彩空间肤色检测算法在保留皮肤区域信息的同时尽可能地剔除非皮肤干扰,其核心方法是:使用RGB、YcrCb和CMYK三种不同的色彩空间肤色阈值进行准确的肤色像素判断。In the detection process, it is inevitable that the edge of the face contains a small amount of environmental information. In the subsequent use of the skin color detector, the area of interest is removed by the skin color detector to remove the environmental information of the face edge. Specifically, the skin color detector uses more The color space skin color detection algorithm removes non-skin interference as much as possible while retaining skin area information. Its core method is: use RGB, YcrCb and CMYK three different color space skin color thresholds for accurate skin color pixel judgment.
多色彩空间肤色检测算法具体为:The multi-color space skin color detection algorithm is specifically:
(1)RGB色彩空间中肤色阈值条件如下:(1) Skin color threshold conditions in the RGB color space are as follows:
R>95∩G>40∩B>20∩R>G∩R>B∩|R-G|>15R>95∩G>40∩B>20∩R>G∩R>B∩|R-G|>15
其中,R为红色通道值,G为绿色通道值,B为蓝色通道值;Among them, R is the value of the red channel, G is the value of the green channel, and B is the value of the blue channel;
(2)YCrCb色彩空间中肤色阈值条件如下:(2) The skin color threshold condition in the YCrCb color space is as follows:
Cr>135∩Cb>85∩Yl>80∩Cr<=(1.5874*Cb)+20∩Cr>135∩Cb>85∩Yl>80∩Cr<=(1.5874*Cb)+20∩
Cr>=(0.3447*Cb)+76.2068∩Cr>=(-4.5653*Cb)+234.5652∩Cr>=(0.3447*Cb)+76.2068∩Cr>=(-4.5653*Cb)+234.5652∩
Cr<=(-1.15*Cb)+301.78∩Cr<=(-2.2868*Cb)+433.85Cr<=(-1.15*Cb)+301.78∩Cr<=(-2.2868*Cb)+433.85
其中,Yl为颜色亮度值,Cr为红色的浓度偏移量值,Cb为蓝色成分偏移量值;Wherein, Yl is the color brightness value, Cr is the concentration offset value of red, and Cb is the blue component offset value;
(3)CMYK色彩空间中肤色阈值条件如下:(3) Skin color threshold conditions in CMYK color space are as follows:
K<0.8∩0<=C<0.05∩0.1<=Y/M<4.8K<0.8∩0<=C<0.05∩0.1<=Y/M<4.8
∩0.088<Y<1∩0<C/Y<1∩0.088<Y<1∩0<C/Y<1
其中,C是青色通道值,M是品红色通道值,Y是黄色通道值,K是黑色通道值;Among them, C is the cyan channel value, M is the magenta channel value, Y is the yellow channel value, and K is the black channel value;
对人脸感兴趣区域,使用(1)-(3)的阈值进行计算,对人脸感兴趣区域中符合RGB色彩空间中肤色阈值条件、YCrCb色彩空间中肤色阈值条件和CMYK色彩空间中肤色阈值条件的像素给予保留,对不符合阈值条件的像素的RGB值设为(0,0,0),以剔除掉人脸边缘的环境信息,得到准确的人脸感兴趣区域。For the face area of interest, use the threshold value of (1)-(3) to calculate, and the skin color threshold condition in the RGB color space, the skin color threshold condition in the YCrCb color space and the skin color threshold in the CMYK color space in the face interest area Conditional pixels are reserved, and the RGB values of pixels that do not meet the threshold conditions are set to (0,0,0), so as to eliminate the environmental information of the edge of the face and obtain an accurate region of interest on the face.
对处理过后的所有皮肤像素进行累加平均获得原始的IPPG信号。The original IPPG signal is obtained by accumulating and averaging all the processed skin pixels.
本实施例3中,使用第二计算模块获取色度信号包括:对IPPG信号进行RGB三通道提取,再对RGB通道信号进行归一化处理;将归一化后的RGB值投射到两个正交色度向量;对两个正交向量经过巴特沃斯带通滤波器滤波,得到滤波后的信号;基于滤波后的信号计算色度信号。具体的:In this embodiment 3, using the second calculation module to obtain the chrominance signal includes: performing RGB three-channel extraction on the IPPG signal, and then performing normalization processing on the RGB channel signal; projecting the normalized RGB value to two normal channels Intersecting chrominance vectors; filtering two orthogonal vectors with a Butterworth bandpass filter to obtain filtered signals; calculating chrominance signals based on the filtered signals. specific:
利用CHROM算法,对原始的IPPG信号进行处理。Using the CHROM algorithm, the original IPPG signal is processed.
在经过CHROM算法后,原始IPPG信号中大部分噪声得到消除。再对S(t)进行VMD算法以得到更精准的心率信号。After the CHROM algorithm, most of the noise in the original IPPG signal is eliminated. Then perform the VMD algorithm on S(t) to obtain a more accurate heart rate signal.
本实施例3中,采用交替方向乘子算法更新迭代求解正交色度向量计算中的鞍点,在频域利用增广Lagrange函数以及约束变分模型迭代更新模态分量和增广Lagrange函数乘子,直至满足迭代终止条件,得到模态分量。In Example 3, the alternate direction multiplier algorithm is used to update and iteratively solve the saddle point in the calculation of the orthogonal chromaticity vector, and the augmented Lagrange function and the constrained variational model are used to iteratively update the modal component and the augmented Lagrange function multiplier in the frequency domain , until the iteration termination condition is met, and the modal components are obtained.
本实施例3中,VMD算法将信号分解为K个模态分量。In Embodiment 3, the VMD algorithm decomposes the signal into K modal components.
与实施例2的区别为,模态分量不再定值为3,惩罚因子α不再为定值为2000。在进行模态分解之前需要先设定参数,模态分量的个数K和惩罚因子α。不恰当的参数可能会导致信号的模态混叠,信号频率成分丢失等情况。为了解决以上情况,本发明提出了对模态分量的个数K和惩罚因子α自动寻优的算法,进行自动的参数确认。The difference from Embodiment 2 is that the modal component is no longer fixed at 3, and the penalty factor α is no longer fixed at 2000. Before the modal decomposition, it is necessary to set the parameters, the number of modal components K and the penalty factor α. Improper parameters may cause modal aliasing of the signal, loss of signal frequency components, etc. In order to solve the above situation, the present invention proposes an automatic optimization algorithm for the number K of modal components and the penalty factor α, and performs automatic parameter confirmation.
如图5所示,模态分量的个数K和惩罚因子α的自动寻优过程包括:As shown in Figure 5, the automatic optimization process of the number K of modal components and the penalty factor α includes:
①由于心率主要频域范围较小(大约在0.7-4Hz之间),所以,设置模态分量的个数K∈[1,4],步长为1,得到4个K值;设置惩罚因子α的范围为α∈[0,2000],惩罚因子α的步长为400,得到6个惩罚因子α值。α选择恰当,各模态分量之间的相关性较小,α选择不恰当,会导致各模态分量之间的相关性变大。①Because the main frequency domain range of heart rate is small (about 0.7-4Hz), so, set the number of modal components K∈[1, 4], and the step size is 1, and get 4 K values; set the penalty factor The range of α is α∈[0, 2000], the step size of penalty factor α is 400, and 6 values of penalty factor α are obtained. If α is properly selected, the correlation between the modal components is small, and if α is not selected properly, the correlation between the modal components will become larger.
②将4个K值和6个惩罚因子α值进行组合,得到24个参数对,判断每种参数对得到的模态分量是否满足寻优相关性限制条件和频率损失的限制条件,保留满足寻优相关性限制条件和频率损失的限制条件的参数对:②Combine 4 K values and 6 penalty factor α values to obtain 24 parameter pairs, judge whether the modal components obtained by each parameter pair meet the optimization correlation constraints and frequency loss constraints, and keep Parameter pairs for the optimal correlation constraint and the frequency loss constraint:
寻优相关性限制条件为:The optimal correlation constraints are:
其中,C(·)表示相关性函数,k是第k模态分量,K是模态分量的个数;MC是固定模态数K下相邻两个模态之间的相关性平均值;C表示参数α的寻优次数,公式表示第c次寻优和第c-1次寻优相关性的比值;当α设置过大后,或导致模态分量之间的相关性突然上升,所以,将判断阈值设定为了0.5,当相关性比值小于0.5时,保留c-1次寻优值α为该模态数K值下的α;最后得到4对参数对,即4对K和α。例如,[K=1,α=400],[K=2,α=400],[K=3,α=400],[K=4,α=400]。其中α是不确定的,当无法满足条件时,α迭代到2000停止,并使用2000为α值。Among them, C( ) represents the correlation function, k is the k-th modal component, and K is the number of modal components; MC is the average correlation value between two adjacent modes under a fixed modal number K; C represents the optimization times of parameter α, the formula Indicates the ratio of the correlation between the cth optimization and the c-1th optimization; when α is set too large, it may cause the correlation between the modal components to rise suddenly, so the judgment threshold is set to 0.5, when When the correlation ratio is less than 0.5, retain the c-1 optimization value α as the α under the value of the modal number K; finally get 4 pairs of parameters, that is, 4 pairs of K and α. For example, [K=1, α=400], [K=2, α=400], [K=3, α=400], [K=4, α=400]. Where α is uncertain, when the condition cannot be met, α iterations stop at 2000, and 2000 is used as the value of α.
在进行模态分解的过程中,可能会出现频率损失,频率损失的限制条件为:In the process of modal decomposition, frequency loss may occur, and the limiting conditions of frequency loss are:
其中,S(t)为色度算法处理过后的IPPG信号,||·||2为二范数;保留小于阈值条件的参数对。Among them, S(t) is the IPPG signal processed by the chroma algorithm, and ||·|| 2 is the two-norm; keep the parameter pairs smaller than the threshold condition.
③使用最大包络峰度的方法在步骤②保留下来的参数对中来选择最优的参数对:③Use the method of maximum envelope kurtosis to select the optimal parameter pair among the parameter pairs retained in step ②:
其中,k是第k模态分量,时模态数K下第k模态分量的希尔伯特变换的模;需要注意的是,因为步骤②保留下来的参数对中,每个模态数K下,只有一对参数对,所以在数量上,参数对的数量和模态数K的数量是等价的。where k is the kth modal component, The modulus of the Hilbert transform of the k-th modal component under the modal number K; it should be noted that, because of the parameter pairs retained in step ②, there is only one pair of parameter pairs under each modal number K, so Quantitatively, the number of parameter pairs is equivalent to the number of modal numbers K.
其中,分子为的四阶中心矩,σ(·)为平方差,ekk为第k模态分量希尔伯特变换取模后的峰度值;Among them, the molecule for The fourth-order central moment of , σ( ) is the square difference, ek k is the kurtosis value after the modulo Hilbert transform of the k-th modal component;
其中,为K模态数下,所有模态分量希尔伯特变换取模后的峰度值组成的向量,为中最大的峰度值,为所有参数对中最大峰度值;in, is a vector composed of the kurtosis values of all modal components Hilbert transform modulo under the K mode number, for The largest kurtosis value in , Maximum kurtosis value for all parameter pairs;
④最后返回中模态数K值和α,就完成了对参数的自动寻优。④ Return at last The automatic optimization of the parameters is completed when the K value and α of the mode number are determined.
自动寻优的VMD算法输出的K个模态分量中,其中,频谱中具有最大峰值的模态分量即为心率信号;通过傅里叶变换求解最大峰值频率,就可以得到最终的心率值。Among the K modal components output by the automatic optimization VMD algorithm, the modal component with the largest peak value in the frequency spectrum is the heart rate signal; the final heart rate value can be obtained by solving the maximum peak frequency through Fourier transform.
本实施例3涉及的具体步骤与实施例2一致,这里不再累述。The specific steps involved in Embodiment 3 are consistent with Embodiment 2, and will not be repeated here.
实施例4Example 4
本实施例4中,提供一种非接触式心率测量方法,该方法包括如下步骤:In
获取待测者的多帧人脸图像;Obtain multiple frames of face images of the person to be tested;
确定每一帧人脸图像中的人脸感兴趣区域;Determine the face region of interest in each frame of face image;
对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;Accumulate and average the skin pixels in the region of interest of all faces to obtain the IPPG signal;
基于IPPG信号获取色度信号;Obtain a chrominance signal based on the IPPG signal;
对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。A variational mode decomposition algorithm is performed on the chrominance signal to obtain multiple modal components, and the modal component with the largest peak value in the spectrum is the heart rate signal.
如图1所示,本实施例4所述的非接触是心率测量方法中,首先对获取的人脸图像通过landmark人脸识别模型进行人脸检测,获取感兴趣区域(ROI),然后再进行肤色检测剔去边缘环境像素,再获取得到原始脉搏波信号(IPPG),提取生成RGB三通道信号,再利用Chrom算法得到色度信号,利用变分模态分解(VDM算法)对色度信号得到去噪后的IPPG信号,最后进行傅里叶变换得到心率。As shown in Fig. 1, in the non-contact heart rate measuring method described in the
本实施例4中,通过工业相机获取受试者的人脸视频图像,结合卤素灯2(其光波范围包括可见光和不可见光范围)用来对人脸进行补光,以获得较好图像质量。将捕捉到的人脸视频序列通过USB3.0数据传输线输入到PC端3中等待PC端对图像进行处理。首先对捕获到的视频进行帧处理,获取每一帧人脸图像。In this
人脸识别程序使用的是基于梯度提高学习的回归树方法(Ensemble ofRegression Trees,ERT)生成的landmark人脸识别模型。然后通过landmark人脸识别模型获取68个人脸标记点,人脸感兴趣区域如图2所示。The face recognition program uses the landmark face recognition model generated by the regression tree method (Ensemble of Regression Trees, ERT) based on gradient enhancement learning. Then, 68 face marker points are obtained through the landmark face recognition model, and the face area of interest is shown in Figure 2.
在检测过程中,难免会遇到人脸边缘包含少部分环境信息,在后续使用肤色检测器,将感兴趣区域通过肤色检测器剔除掉人脸边缘的环境信息。In the detection process, it is inevitable that the edge of the face contains a small amount of environmental information. In the subsequent use of the skin color detector, the area of interest is eliminated by the skin color detector to remove the environmental information of the edge of the face.
对处理过后的所有皮肤像素进行累加平均获得IPPG信号。The IPPG signal is obtained by accumulating and averaging all the processed skin pixels.
利用CHROM算法,对原始的IPPG信号进行处理,其步骤如下:Using the CHROM algorithm to process the original IPPG signal, the steps are as follows:
对原始IPPG进行RGB三通道提取,再对RGB通道信号进行归一化处理。The RGB three-channel extraction is performed on the original IPPG, and then the RGB channel signal is normalized.
将归一化的RGB值投射到两个正交色度向量Xchrom和Ychrom,公式如下:Project the normalized RGB values to two orthogonal chrominance vectors X chrom and Y chrom with the following formula:
Xchrom(t)=3xr(t)-2xg(t) (2)X chrom (t)=3x r (t)-2x g (t) (2)
Ychrom(t)=1.5xr(t)+xg(t)-1.5xb(t) (3)Y chrom (t)=1.5x r (t)+x g (t)-1.5x b (t) (3)
最后输出S(t)为:The final output S(t) is:
S(t)=Xf-αYf; (4)S(t)= Xf - αYf ; (4)
其中,xr表示原始IPPG信号的红色通道分量,xg表示原始IPPG信号的绿色通道分量,xb表示原始IPPG信号的蓝色通道分量,t表示时间,信号波形随时间t变化,Xf、Yf分别是Xchrom,Ychrom经过五阶0.7Hz-4Hz巴特沃斯带通滤波器滤波后的信号;α是Xf、Yf标准差的比值,S(t)为经过CHROM算法处理过的IPPG信号。Among them, x r represents the red channel component of the original IPPG signal, x g represents the green channel component of the original IPPG signal, x b represents the blue channel component of the original IPPG signal, t represents time, and the signal waveform changes with time t, X f , Y f are the signals of X chrom and Y chrom filtered by the fifth-order 0.7Hz-4Hz Butterworth bandpass filter; α is the ratio of the standard deviations of X f and Y f , and S(t) is the The IPPG signal.
在经过CHROM算法后,原始IPPG信号中大部分噪声得到消除。再对S(t)进行VMD算法以得到更精准的心率信号。After the CHROM algorithm, most of the noise in the original IPPG signal is eliminated. Then perform the VMD algorithm on S(t) to obtain a more accurate heart rate signal.
VMD算法中涉及的约束变分模型如下:The constrained variational models involved in the VMD algorithm are as follows:
其中,{uk}={u1,u2,...,uk}表示第k个模态分量,{wk}={w1,w2,...,wk}表示第k个模态分量的中心频率,K表示模态分量的个数,表示偏导运算,δ(t)表示单位脉冲函数,j表示虚数单位,*表示卷积运算,f表示目标信号,e表示超越数。Among them, {u k }={u 1 ,u 2 ,...,u k } means the kth modal component, {w k }={w 1 ,w 2 ,...,w k } means the The center frequency of k modal components, K represents the number of modal components, Represents the partial derivative operation, δ(t) represents the unit impulse function, j represents the imaginary number unit, * represents the convolution operation, f represents the target signal, and e represents the transcendental number.
引入惩罚因子α和Lagrange乘子λ以求解变分约束问题。所得增广Lagrange表达式如下:A penalty factor α and a Lagrange multiplier λ are introduced to solve the variational constrained problem. The resulting augmented Lagrange expression is as follows:
采用交替方式乘子算法更新迭代求解(7)式中的鞍点,在频域迭代更新uk、wk、λ。The saddle point in equation (7) is iteratively solved by using the alternate multiplier algorithm to update iteratively, and u k , w k , λ are iteratively updated in the frequency domain.
VMD算法将信号分解为3个模态分量(模态分量数量由实验确定),惩罚因子α为2000,分解步骤如下:The VMD algorithm decomposes the signal into three modal components (the number of modal components is determined by experiments), and the penalty factor α is 2000. The decomposition steps are as follows:
(1)初始化n为零;(1) Initialization n is zero;
(2)uk和wk分别由(8)式和(9)式迭代更新:(2) u k and w k are iteratively updated by equations (8) and (9) respectively:
其中,ω表示频率,i表示第i模态分量,d表示求导。Among them, ω represents the frequency, i represents the i-th modal component, and d represents the derivative.
(3)通过(10)式更新λ:(3) Update λ through formula (10):
其中,τ表示保真系数,∧表示傅里叶变换,n表示迭代次数。Among them, τ represents the fidelity coefficient, ∧ represents the Fourier transform, and n represents the number of iterations.
(4)重复步骤2和3,至满足迭代终止条件,终止条件由(11)式给出。(4) Repeat steps 2 and 3 until the iteration termination condition is met, which is given by (11).
其中,ε表示判别精度,且ε>0,上标n为迭代步数,下标k表示当前模态数。Among them, ε represents the discrimination accuracy, and ε>0, the superscript n is the number of iteration steps, and the subscript k represents the current mode number.
(5)输出3个模态分量。(5) Output 3 modal components.
本实施例4所述的人脸图像的处理过程示意图如图3所示,先由landmark人脸识别返回标记点后根据图2中左上角的图绘制感兴趣区域,后通过肤色检测剔去边缘的环境信息,然后对脉搏波进行RGB三通道处理,对RGB三通道信号进行CHROM算法得到去除光强和颜色的脉搏波信号,再通过VDM进行模态分解去噪,重构得到心率信号波形以及傅里叶频谱图。The schematic diagram of the processing process of the human face image described in
本实施例4中,通过landmark模型对人脸的精准定位,使用CHROM算法和VMD算法对原始IPPG信号消噪处理,从而得到了精准的心率,实现了以非接触检测的方式获取心率。In Example 4, through the precise positioning of the face by the landmark model, the CHROM algorithm and the VMD algorithm are used to denoise the original IPPG signal, thereby obtaining an accurate heart rate and realizing the acquisition of the heart rate in a non-contact detection manner.
其解决了以下几个主要技术问题:It solves the following main technical problems:
面部追踪检测对于人脸大幅度移动的跟踪效果较好,但在人脸相对静止的情况下,由于视频的每一帧图片都是相对独立的,导致人脸识别标记点的抖动,从而额外的引入噪声;人脸的移动会导致光线入射角度和肤色的变化,从而引入噪声,通过CHROM算法可将像素值的强度和光强以及颜色分离,消除噪声;对脉搏波信号进行VMD,根据心跳频率特征,使用VMD算法将主要信号分解为不同模态,保证了各模态之间信号频率范围互不重叠,分离出较为完整且无谐波残留的心跳信号。Face tracking detection has a better tracking effect on large-scale movement of the face, but when the face is relatively still, each frame of the video is relatively independent, resulting in the jitter of the face recognition marker points, resulting in additional Introduce noise; the movement of the face will cause changes in the incident angle of light and skin color, thereby introducing noise. The intensity, light intensity and color of the pixel value can be separated through the CHROM algorithm to eliminate noise; VMD is performed on the pulse wave signal, according to the heartbeat frequency Features, using the VMD algorithm to decompose the main signal into different modes, ensuring that the signal frequency ranges between the modes do not overlap each other, and separating a relatively complete heartbeat signal without harmonic residue.
实施例5Example 5
本实施例5中,提供一种非接触式心率测量方法,该方法包括如下步骤:In Embodiment 5, a non-contact heart rate measurement method is provided, which method includes the following steps:
获取待测者的多帧人脸图像;Obtain multiple frames of face images of the person to be tested;
确定每一帧人脸图像中的人脸感兴趣区域;Determine the face region of interest in each frame of face image;
对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;Accumulate and average the skin pixels in the region of interest of all faces to obtain the IPPG signal;
基于IPPG信号获取色度信号;Obtain a chrominance signal based on the IPPG signal;
对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。A variational mode decomposition algorithm is performed on the chrominance signal to obtain multiple modal components, and the modal component with the largest peak value in the spectrum is the heart rate signal.
如图1所示,本实施例5所述的非接触是心率测量方法中,首先对获取的人脸图像通过landmark人脸识别模型进行人脸检测,获取感兴趣区域(ROI),然后再进行肤色检测剔去边缘环境像素,再获取得到原始脉搏波信号(IPPG),提取生成RGB三通道信号,再利用Chrom算法得到色度信号,利用变分模态分解(VDM算法)对色度信号得到去噪后的IPPG信号,最后进行傅里叶变换得到心率。As shown in Figure 1, in the non-contact heart rate measuring method described in the present embodiment 5, at first, face detection is carried out to the acquired face image by the landmark face recognition model, and the region of interest (ROI) is obtained, and then Skin color detection removes the edge environment pixels, and then obtains the original pulse wave signal (IPPG), extracts and generates RGB three-channel signals, then uses the Chrom algorithm to obtain the chroma signal, and uses the variational mode decomposition (VDM algorithm) to obtain the chroma signal The denoised IPPG signal is finally subjected to Fourier transform to obtain the heart rate.
本实施例5中,通过工业相机获取受试者的人脸视频图像,结合卤素灯(其光波范围包括可见光和不可见光范围)用来对人脸进行补光,以获得较好图像质量。将捕捉到的人脸视频序列通过USB3.0数据传输线输入到PC端中等待PC端对图像进行处理。首先对捕获到的视频进行帧处理,获取每一帧人脸图像。In this embodiment 5, the human face video image of the subject is obtained by an industrial camera, and a halogen lamp (whose light wave range includes visible light and invisible light range) is used to supplement the light on the human face to obtain better image quality. Input the captured face video sequence to the PC through the USB3.0 data transmission line and wait for the PC to process the image. First, frame processing is performed on the captured video to obtain each frame of face image.
人脸识别程序使用的是基于梯度提高学习的回归树方法(Ensemble ofRegression Trees,ERT)生成的landmark人脸识别模型。然后通过landmark模型获取68个人脸标记点,使用标记点0、8、16新生成标记点HL和标记点HR,其中HL和HR的坐标点计算如下:The face recognition program uses the landmark face recognition model generated by the regression tree method (Ensemble of Regression Trees, ERT) based on gradient enhancement learning. Then obtain 68 face marker points through the landmark model, use marker points 0, 8, and 16 to generate marker points HL and marker points HR, and the coordinate points of HL and HR are calculated as follows:
其中,yp8为标记点8的纵坐标,yp0为标记点0的纵坐标,xp0为标记点0的横坐标,yp0为标记点0的纵坐标,xp16为标记点16的横坐标,yp16为标记点16的纵坐标;xHR、yHR和xHL、yHL分解为新标记点HR的横纵坐标和新标记点HL的横纵坐标;通过将标记点0到标记点16、HR、HL依次连接获得人脸区域,将标记点48到标记点59依次连接剔除嘴部区域,最后获得人脸掩膜图,即人脸感兴趣区域,如图2中左上角的图所示。Among them, y p8 is the ordinate of marking point 8, y p0 is the ordinate of marking point 0, x p0 is the abscissa of marking point 0, y p0 is the ordinate of marking point 0, x p16 is the abscissa of marking point 16 Coordinates, y p16 is the vertical coordinate of the marker point 16; x HR , y HR and x HL , y HL are decomposed into the horizontal and vertical coordinates of the new marker point HR and the horizontal and vertical coordinates of the new marker point HL; Points 16, HR, and HL are sequentially connected to obtain the face area, and the mark point 48 to mark point 59 are sequentially connected to remove the mouth area, and finally the face mask map is obtained, that is, the face area of interest, as shown in the upper left corner of Figure 2 As shown in the figure.
在检测过程中,难免会遇到人脸边缘包含少部分环境信息,在后续使用肤色检测器,将感兴趣区域通过肤色检测器剔除掉人脸边缘的环境信息。具体的,肤色检测器使用多色彩空间肤色检测算法在保留皮肤区域信息的同时尽可能地剔除非皮肤干扰,其核心方法是:使用RGB、YcrCb和CMYK三种不同的色彩空间肤色阈值进行准确的肤色像素判断。In the detection process, it is inevitable that the edge of the face contains a small amount of environmental information. In the subsequent use of the skin color detector, the area of interest is eliminated by the skin color detector to remove the environmental information of the edge of the face. Specifically, the skin color detector uses a multi-color space skin color detection algorithm to remove non-skin interference as much as possible while retaining skin area information. The core method is: use RGB, YcrCb and CMYK three different color space skin color thresholds for accurate Skin color pixel judgment.
多色彩空间肤色检测算法具体为:The multi-color space skin color detection algorithm is specifically:
(1)RGB色彩空间中肤色阈值条件如下:(1) Skin color threshold conditions in the RGB color space are as follows:
R>95∩G>40∩B>20∩R>G∩R>B∩|R-G|>15R>95∩G>40∩B>20∩R>G∩R>B∩|R-G|>15
其中,R为红色通道值,G为绿色通道值,B为蓝色通道值;Among them, R is the value of the red channel, G is the value of the green channel, and B is the value of the blue channel;
(2)YCrCb色彩空间中肤色阈值条件如下:(2) The skin color threshold condition in the YCrCb color space is as follows:
Cr>135∩Cb>85∩Yl>80∩Cr<=(1.5874*Cb)+20∩Cr>135∩Cb>85∩Yl>80∩Cr<=(1.5874*Cb)+20∩
Cr>=(0.3447*Cb)+76.2068∩Cr>=(-4.5653*Cb)+234.5652∩Cr>=(0.3447*Cb)+76.2068∩Cr>=(-4.5653*Cb)+234.5652∩
Cr<=(-1.15*Cb)+301.78∩Cr<=(-2.2868*Cb)+433.85Cr<=(-1.15*Cb)+301.78∩Cr<=(-2.2868*Cb)+433.85
其中,Yl为颜色亮度值,Cr为红色的浓度偏移量值,Cb为蓝色成分偏移量值;Wherein, Yl is the color brightness value, Cr is the concentration offset value of red, and Cb is the blue component offset value;
(3)CMYK色彩空间中肤色阈值条件如下:(3) Skin color threshold conditions in CMYK color space are as follows:
K<0.8∩0<=C<0.05∩0.1<=Y/M<4.8K<0.8∩0<=C<0.05∩0.1<=Y/M<4.8
∩0.088<Y<1∩0<C/Y<1∩0.088<Y<1∩0<C/Y<1
其中,C是青色通道值,M是品红色通道值,Y是黄色通道值,K是黑色通道值;Among them, C is the cyan channel value, M is the magenta channel value, Y is the yellow channel value, and K is the black channel value;
对人脸感兴趣区域,使用(1)-(3)的阈值进行计算,对人脸感兴趣区域中符合RGB色彩空间中肤色阈值条件、YCrCb色彩空间中肤色阈值条件和CMYK色彩空间中肤色阈值条件的像素给予保留,对不符合阈值条件的像素的RGB值设为(0,0,0),以剔除掉人脸边缘的环境信息,得到准确的人脸感兴趣区域。For the face area of interest, use the threshold value of (1)-(3) to calculate, and the skin color threshold condition in the RGB color space, the skin color threshold condition in the YCrCb color space and the skin color threshold in the CMYK color space in the face interest area Conditional pixels are reserved, and the RGB values of pixels that do not meet the threshold conditions are set to (0,0,0), so as to eliminate the environmental information of the edge of the face and obtain an accurate region of interest on the face.
对处理过后的所有皮肤像素进行累加平均获得IPPG信号。The IPPG signal is obtained by accumulating and averaging all the processed skin pixels.
利用CHROM算法,对原始的IPPG信号进行处理,其步骤如下:Using the CHROM algorithm to process the original IPPG signal, the steps are as follows:
对原始IPPG进行RGB三通道提取,再对RGB通道信号进行归一化处理。The RGB three-channel extraction is performed on the original IPPG, and then the RGB channel signal is normalized.
将归一化的RGB值投射到两个正交色度向量Xchrom和Ychrom。Project the normalized RGB values to two orthogonal chrominance vectors X chrom and Y chrom .
在经过CHROM算法后,原始IPPG信号中大部分噪声得到消除。再对S(t)进行VMD算法以得到更精准的心率信号。After the CHROM algorithm, most of the noise in the original IPPG signal is eliminated. Then perform the VMD algorithm on S(t) to obtain a more accurate heart rate signal.
VMD算法将信号分解为K个模态分量。The VMD algorithm decomposes the signal into K modal components.
与实施例4的区别为,模态分量不再定值为3,惩罚因子α不再为定值为2000。在进行模态分解之前需要先设定参数,模态分量的个数K和惩罚因子α。不恰当的参数可能会导致信号的模态混叠,信号频率成分丢失等情况。为了解决以上情况,本发明提出了对模态分量的个数K和惩罚因子α自动寻优的算法,进行自动的参数确认。The difference from
模态分量的个数K和惩罚因子α的自动寻优过程包括:The automatic optimization process of the number K of modal components and the penalty factor α includes:
①由于心率主要频域范围较小(大约在0.7-4Hz之间),所以,设置模态分量的个数K∈[1,4],步长为1,得到4个K值;设置惩罚因子α的范围为α∈[0,2000],惩罚因子α的步长为400,得到6个惩罚因子α值。α选择恰当,各模态分量之间的相关性较小,α选择不恰当,会导致各模态分量之间的相关性变大。①Because the main frequency domain range of heart rate is small (about 0.7-4Hz), so, set the number of modal components K∈[1, 4], and the step size is 1, and get 4 K values; set the penalty factor The range of α is α∈[0, 2000], the step size of penalty factor α is 400, and 6 values of penalty factor α are obtained. If α is properly selected, the correlation between the modal components is small, and if α is not selected properly, the correlation between the modal components will become larger.
②将4个K值和6个惩罚因子α值进行组合,得到24个参数对,判断每种参数对得到的模态分量是否满足寻优相关性限制条件和频率损失的限制条件,保留满足寻优相关性限制条件和频率损失的限制条件的参数对:②Combine 4 K values and 6 penalty factor α values to obtain 24 parameter pairs, judge whether the modal components obtained by each parameter pair meet the optimization correlation constraints and frequency loss constraints, and keep Parameter pairs for the optimal correlation constraint and the frequency loss constraint:
寻优相关性限制条件为:The optimal correlation constraints are:
其中,C(·)表示相关性函数,k是第k模态分量,K是模态分量的个数;MC是固定模态数K下相邻两个模态之间的相关性平均值;C表示参数α的寻优次数,公式表示第c次寻优和第c-1次寻优相关性的比值;当α设置过大后,或导致模态分量之间的相关性突然上升,所以,将判断阈值设定为了0.5,当相关性比值小于0.5时,保留c-1次寻优值α为该模态数K值下的α;最后得到4对参数对,即4对K和α。例如,[K=1,α=400],[K=2,α=400],[K=3,α=400],[K=4,α=400]。其中α是不确定的,当无法满足条件时,α迭代到2000停止,并使用2000为α值。Among them, C( ) represents the correlation function, k is the k-th modal component, and K is the number of modal components; MC is the average correlation value between two adjacent modes under a fixed modal number K; C represents the optimization times of parameter α, the formula Indicates the ratio of the correlation between the cth optimization and the c-1th optimization; when α is set too large, it may cause the correlation between the modal components to rise suddenly, so the judgment threshold is set to 0.5, when When the correlation ratio is less than 0.5, retain the c-1 optimization value α as the α under the value of the modal number K; finally get 4 pairs of parameters, that is, 4 pairs of K and α. For example, [K=1, α=400], [K=2, α=400], [K=3, α=400], [K=4, α=400]. Where α is uncertain, when the condition cannot be met, α iterations stop at 2000, and 2000 is used as the value of α.
在进行模态分解的过程中,可能会出现频率损失,频率损失的限制条件为:In the process of modal decomposition, frequency loss may occur, and the limiting conditions of frequency loss are:
其中,S(t)为色度算法处理过后的IPPG信号,||·||2为二范数;保留小于阈值条件的参数对。Among them, S(t) is the IPPG signal processed by the chroma algorithm, and ||·|| 2 is the two-norm; keep the parameter pairs smaller than the threshold condition.
③使用最大包络峰度的方法在步骤②保留下来的参数对中来选择最优的参数对:③Use the method of maximum envelope kurtosis to select the optimal parameter pair among the parameter pairs retained in step ②:
其中,k是第k模态分量,时模态数K下第k模态分量的希尔伯特变换的模;需要注意的是,因为步骤②保留下来的参数对中,每个模态数K下,只有一对参数对,所以在数量上,参数对的数量和模态数K的数量是等价的。where k is the kth modal component, The modulus of the Hilbert transform of the k-th modal component under the modal number K; it should be noted that, because of the parameter pairs retained in step ②, there is only one pair of parameter pairs under each modal number K, so Quantitatively, the number of parameter pairs is equivalent to the number of modal numbers K.
其中,分子为的四阶中心矩,σ(·)为平方差,ekk为第k模态分量希尔伯特变换取模后的峰度值;Among them, the molecule for The fourth-order central moment of , σ( ) is the square difference, ek k is the kurtosis value after the modulo Hilbert transform of the k-th modal component;
其中,为K模态数下,所有模态分量希尔伯特变换取模后的峰度值组成的向量,为中最大的峰度值,为所有参数对中最大峰度值;in, is a vector composed of the kurtosis values of all modal components after Hilbert transform modulo under the K mode number, for The largest kurtosis value in , Maximum kurtosis value for all parameter pairs;
④最后返回中模态数K值和α,就完成了对参数的自动寻优。④ Return at last The automatic optimization of the parameters is completed when the K value and α of the mode number are determined.
自动寻优的VMD算法输出的K个模态分量中,其中,频谱中具有最大峰值的模态分量即为心率信号;通过傅里叶变换求解最大峰值频率,就可以得到最终的心率值。Among the K modal components output by the automatic optimization VMD algorithm, the modal component with the largest peak value in the frequency spectrum is the heart rate signal; the final heart rate value can be obtained by solving the maximum peak frequency through Fourier transform.
本实施例5涉及的具体步骤与实施例4一致,这里不再累述。The specific steps involved in Embodiment 5 are consistent with
实施例6Example 6
本发明实施例6提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质用于存储计算机指令,所述计算机指令被处理器执行时,实现非接触式心率测量方法的指令,该方法包括:Embodiment 6 of the present invention provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, a non-contact heart rate measurement method is implemented instructions, the method includes:
获取待测者的多帧人脸图像;Obtain multiple frames of face images of the person to be tested;
确定每一帧人脸图像中的人脸感兴趣区域;Determine the face region of interest in each frame of face image;
对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;Accumulate and average the skin pixels in the region of interest of all faces to obtain the IPPG signal;
基于IPPG信号获取色度信号;Obtain a chrominance signal based on the IPPG signal;
对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。A variational mode decomposition algorithm is performed on the chrominance signal to obtain multiple modal components, and the modal component with the largest peak value in the spectrum is the heart rate signal.
实施例7Example 7
本发明实施例7提供一种计算机程序(产品),包括计算机程序,所述计算机程序当在一个或多个处理器上运行时,用于实现如上所述的非接触式心率测量方法,该方法包括:Embodiment 7 of the present invention provides a computer program (product), including a computer program. When the computer program is run on one or more processors, it is used to implement the non-contact heart rate measurement method as described above. The method include:
获取待测者的多帧人脸图像;Obtain multiple frames of face images of the person to be tested;
确定每一帧人脸图像中的人脸感兴趣区域;Determine the face region of interest in each frame of face image;
对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;Accumulate and average the skin pixels in the region of interest of all faces to obtain the IPPG signal;
基于IPPG信号获取色度信号;Obtain a chrominance signal based on the IPPG signal;
对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。A variational mode decomposition algorithm is performed on the chrominance signal to obtain multiple modal components, and the modal component with the largest peak value in the spectrum is the heart rate signal.
实施例8Example 8
本发明实施例8提供一种电子设备,包括:处理器、存储器以及计算机程序;其中,处理器与存储器连接,计算机程序被存储在存储器中,当电子设备运行时,所述处理器执行所述存储器存储的计算机程序,以使电子设备执行如上所述的非接触式心率测量方法,该方法包括:Embodiment 8 of the present invention provides an electronic device, including: a processor, a memory, and a computer program; wherein, the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the A computer program stored in the memory to cause the electronic device to perform the non-contact heart rate measurement method as described above, the method comprising:
获取待测者的多帧人脸图像;Obtain multiple frames of face images of the person to be tested;
确定每一帧人脸图像中的人脸感兴趣区域;Determine the face region of interest in each frame of face image;
对所有人脸感兴趣区域内的皮肤像素进行累加平均,获得IPPG信号;Accumulate and average the skin pixels in the region of interest of all faces to obtain the IPPG signal;
基于IPPG信号获取色度信号;Obtain a chrominance signal based on the IPPG signal;
对色度信号进行变分模态分解算法,得到多个模态分量,频谱中具有最大峰值的模态分量即为心率信号。A variational mode decomposition algorithm is performed on the chrominance signal to obtain multiple modal components, and the modal component with the largest peak value in the spectrum is the heart rate signal.
综上所述,本发明实施例所述的非接触式心率检测方法及系统通过CHROM算法可将像素值的强度和光强以及颜色分离,消除噪声;对信号进行VMD算法,根据心跳频率特征,使用VMD算法将主要信号分解为不同模态,保证了各模态之间信号频率范围互不重叠,分离出较为完整且无谐波残留的心跳信号。In summary, the non-contact heart rate detection method and system described in the embodiments of the present invention can separate the intensity of the pixel value from the light intensity and color through the CHROM algorithm, and eliminate noise; the VMD algorithm is performed on the signal, and according to the heartbeat frequency characteristics, The VMD algorithm is used to decompose the main signal into different modes, which ensures that the signal frequency ranges between the modes do not overlap each other, and separates a relatively complete heartbeat signal without harmonic residue.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device Steps are provided for implementing the functions specified in the flow chart or flow charts and/or block diagram block or blocks.
上述虽然结合附图对本发明的具体实施方式进行了描述,但并非对本发明保护范围的限制,所属领域技术人员应该明白,在本发明公开的技术方案的基础上,本领域技术人员在不需要付出创造性劳动即可做出的各种修改或变形,都应涵盖在本发明的保护范围之内。Although the specific implementation of the present invention has been described above in conjunction with the accompanying drawings, it does not limit the protection scope of the present invention. Those skilled in the art should understand that on the basis of the technical solutions disclosed in the present invention, those skilled in the art do not need to pay Various modifications or deformations that can be made through creative labor shall be covered within the scope of protection of the present invention.
Claims (10)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2021115252062 | 2021-12-14 | ||
CN202111525206 | 2021-12-14 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115376179A true CN115376179A (en) | 2022-11-22 |
Family
ID=84060087
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210416920.6A Pending CN115376179A (en) | 2021-12-14 | 2022-04-20 | Non-contact heart rate measuring method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115376179A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115956890A (en) * | 2023-02-07 | 2023-04-14 | 中促(杭州)信息科技有限公司 | Remote light volume method blood pressure real-time identification method based on signal variation modal decomposition |
CN116999044A (en) * | 2023-09-07 | 2023-11-07 | 南京云思创智信息科技有限公司 | Real-time motion full-connection bidirectional consistent optical flow field heart rate signal extraction method |
-
2022
- 2022-04-20 CN CN202210416920.6A patent/CN115376179A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115956890A (en) * | 2023-02-07 | 2023-04-14 | 中促(杭州)信息科技有限公司 | Remote light volume method blood pressure real-time identification method based on signal variation modal decomposition |
CN115956890B (en) * | 2023-02-07 | 2024-09-03 | 杭州微帮忙智慧科技有限公司 | Remote light volume method blood pressure real-time identification method based on signal variation modal decomposition |
CN116999044A (en) * | 2023-09-07 | 2023-11-07 | 南京云思创智信息科技有限公司 | Real-time motion full-connection bidirectional consistent optical flow field heart rate signal extraction method |
CN116999044B (en) * | 2023-09-07 | 2024-04-16 | 南京云思创智信息科技有限公司 | Real-time motion full-connection bidirectional consistent optical flow field heart rate signal extraction method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Casado et al. | Face2PPG: An unsupervised pipeline for blood volume pulse extraction from faces | |
CN115376179A (en) | Non-contact heart rate measuring method and system | |
CN108399611A (en) | Multi-focus image fusing method based on gradient regularisation | |
CN112819790B (en) | Heart rate detection method and device | |
CN108596237B (en) | A color- and vessel-based LCI laser endoscopic device for colon polyp classification | |
Das et al. | Bvpnet: Video-to-bvp signal prediction for remote heart rate estimation | |
CN113052866B (en) | Ultrasonic image tongue contour extraction method based on local binary fitting model | |
CN113693573B (en) | Video-based non-contact multi-physiological-parameter monitoring system and method | |
CN109325421A (en) | A kind of eyelashes minimizing technology and system based on edge detection | |
CN114628020A (en) | Model construction, detection method, device and application of remote plethysmographic signal detection | |
CN111767788A (en) | Non-interactive monocular in vivo detection method | |
CN106651981A (en) | Method and device for correcting ring artifact | |
CN112200099A (en) | A video-based dynamic heart rate detection method | |
Nowara et al. | Combining magnification and measurement for non-contact cardiac monitoring | |
CN114580464A (en) | Human heart rate variability and respiratory rate measurement method based on variational modal decomposition and constraint independent component analysis | |
CN114557685A (en) | Non-contact motion robust heart rate measuring method and measuring device | |
CN118350991A (en) | Endoscopic image stitching method, endoscopic image stitching device, storage medium, and computer device | |
Ben Salah et al. | Contactless heart rate estimation from facial video using skin detection and multi-resolution analysis | |
CN114246570B (en) | Near-infrared heart rate detection method by fusing peak signal-to-noise ratio and Peerson correlation coefficient | |
CN108629780B (en) | Tongue image segmentation method based on color decomposition and threshold technology | |
CN112330575B (en) | Convolution neural network medical CT image denoising method | |
CN115063633A (en) | A Skin Cancer Image Classification Method Based on Improved DenseNet Network | |
CN114652287A (en) | Non-contact blood pressure monitoring system, readable storage medium and electronic device | |
CN115429246B (en) | Heart rate detection method and device based on BVP signal, electronic equipment and storage medium | |
Rahman et al. | A filter-based method to calculate heart rate from near infrared video |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |