# Heartbeat: Measuring heart rate using remote photoplethysmography (rPPG)
This is a simple implementation of rPPG, a way to measure heart rate without skin contact. It uses a video recording or live feed of the face to analyse subtle changes in skin color.
Here's how it works:
- The face is detected and continuously tracked
- Signal series is obtained by determining the facial color in every frame
- Heart rate is estimated using frequency analysis and filtering of the series
If you are interested in the specifics, feel free to have a read of my publications on the topic:
- [Remote Photoplethysmography: Evaluation of Contactless Heart Rate Measurement in an Information Systems Setting][aitic]
- [Using Contactless Heart Rate Measurements for Real-Time Assessment of Affective States][gmunden]
- [Remote heart rate measurement using low-cost RGB face video: A technical literature review][fcs]
See also my minimal [JavaScript implementation](https://github.com/prouast/heartbeat-js) and [Browser Demo](https://prouast.github.io/heartbeat-js/).
### Demo
* [Real-time rPPG in action][video1]
* [Offline rPPG With physiological baseline measurements][video2]
### Dependencies
The following libraries are required to run Heartbeat:
* [OpenCV]
They must be installed on the system such that headers and libraries are found on the compiler's standard search path.
### Installation
For building a Makefile is available that works on macOS:
```sh
$ make
```
Alternative compilation for Ubuntu. Works with opencv 3.1:
```sh
$ g++ -std=c++11 Heartbeat.cpp opencv.cpp RPPG.cpp `pkg-config --cflags --libs opencv` -o Heartbeat
```
### Settings
After building, the app can be run via
```
$ ./Heartbeat
```
Several command line arguments are available:
| Argument | Options | Description |
| --- | --- | --- |
| -i | Filepath to input video | Omit flag to use webcam |
| -rppg | g, pca (default: g) | Specify rPPG algorithm variant - only green channel or rgb channels with pca |
| -facedet | haar, deep (default: haar) | Specify face detection classifier - Haar cascade or deep neural network |
| -r | Re-detection interval (default: 1 s) | Interval for face re-detection; tracking is used frame-to-frame |
| -f | Sampling frequency (default: 1 Hz) | Frequency for heart rate estimation |
| -max | default: 5 | Maximum size of signal sliding window |
| -min | default: 5 | Minimum size of signal sliding window |
| -gui | true, false (default: true) | Display the GUI |
| -log | true, false (default: false) | Detailed logging |
| -ds | default: 1 | If using video from file: Downsample by using every ith frame |
License
----
GPL-3.0
[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)
[aitic]: <https://www.rouast.com/pdf/rouast2016remote_b.pdf>
[fcs]: <https://www.researchgate.net/profile/Raymond_Chiong/publication/306285292_Remote_heart_rate_measurement_using_low-cost_RGB_face_video_A_technical_literature_review/links/58098ac808ae1c98c252637d.pdf>
[gmunden]: <http://link.springer.com/chapter/10.1007/978-3-319-41402-7_20>
[OpenCV]: <http://opencv.org/downloads.html>
[ffmpeg]: <https://ffmpeg.org/download.html>
[video1]: <https://www.youtube.com/watch?v=D_KYv7pXAvQ>
[video2]: <https://www.youtube.com/watch?v=4RKor-O5bQ8>
没有合适的资源?快使用搜索试试~ 我知道了~
远程光电体积描记法的桌面实施 -使用面部视频测量心率_C++_代码_相关文件_下载
共15个文件
hpp:3个
cpp:3个
license:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 6 下载量 176 浏览量
2022-07-11
23:26:44
上传
评论 2
收藏 9.7MB ZIP 举报
温馨提示
心跳:使用远程光电体积描记法 (rPPG) 测量心率 这是 rPPG 的简单实现,一种无需皮肤接触即可测量心率的方法。它使用视频录制或面部实时馈送来分析肤色的细微变化。 以下是它的工作原理: 人脸被检测并持续跟踪 通过确定每一帧中的面部颜色来获得信号序列 使用频率分析和序列过滤估计心率 更多详情、使用方法,请下载后阅读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
heartbeat-master (1).zip (15个子文件)
heartbeat-
contributors.txt 15B
opencv.cpp 8KB
haarcascade_frontalface_alt.xml 898KB
RPPG.hpp 3KB
LICENSE 34KB
opencv
deploy.prototxt 27KB
LICENSE 2KB
res10_300x300_ssd_iter_140000.caffemodel 10.17MB
Heartbeat.hpp 689B
opencv.hpp 2KB
Heartbeat.cpp 8KB
RPPG.cpp 20KB
.gitignore 231B
Makefile 660B
README.md 3KB
共 15 条
- 1
快撑死的鱼
- 粉丝: 2w+
- 资源: 9148
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 没用333333333333333333333333333333
- 基于Vue和SpringBoot的企业员工管理系统2.0版本设计源码
- 【C++初级程序设计·配套源码】第2期-基本数据类型
- 基于Java和Vue的kopsoftKANBAN车间电子看板设计源码
- 影驰战将PS3111 东芝芯片TT18G23AIN开卡成功分享,图片里面画线的选项很重要
- 【C++初级程序设计·配套源码】第1期-语法基础
- 基于JavaScript、CSS、HTML的简易DOM版飞机游戏设计源码
- 基于Java开发的日程管理FlexTime应用设计源码
- SM2258XT-BGA144-4BGA180-6L-R1019 三星KLUCG4J1CB B0B1颗粒开盘工具 , EC, 3A, 94, 43, A4, CA 七彩虹SL300这个固件有用
- GJB 5236-2004 军用软件质量度量
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页