heartbeat

prouastGPL-3.0更新放缓

用普通摄像头拍摄人脸视频就能测心率,基于远程光电容积描记(rPPG)技术的桌面端实现,适合做非接触式生理监测。

Desktop implementation of Remote Photoplethysmography – Measuring heart rate using facial video.

暂无版本627star146fork同步于 2026-11-07 07:33 UTC

怎么上手

由 README 提炼,执行前请确认
make
硬件要求按 README 说明

README 未说明具体 CPU/GPU 或显存要求;需系统安装 OpenCV,且头文件与库需位于编译器标准搜索路径。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用面部视频做非接触式心率测量的 C++ 桌面实现,基于 rPPG 分析肤色细微变化

用普通摄像头拍摄人脸视频就能测心率,基于远程光电容积描记(rPPG)技术的桌面端实现,适合做非接触式生理监测。

核心能力

  • 检测并逐帧跟踪人脸,提取每帧面部颜色构成信号序列
  • 用频率分析与滤波从信号序列估计心率
  • 支持绿通道与 RGB+PCA 两种 rPPG 算法变体
  • 可选 Haar 级联或深度神经网络人脸检测器
  • 支持摄像头实时输入或读取视频文件并降采样

容易踩的坑

必须先自行安装 OpenCV 并确保编译器能找到其头文件和库;Makefile 仅适用于 macOS,Ubuntu 需用 README 给出的 g++ 命令手动编译(对应 opencv 3.1);不传 -i 参数时默认调用摄像头。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Heartbeat: Measuring heart rate using remote photoplethysmography (rPPG)

    Looking for more powerful and up-to-date rPPG tools?
    Check out our latest libraries and apps!

    📌 Tool🚀 Features⚡ Methods🔗 Get Started
    Python LibraryFile analysis (HR, RR, HRV)G, POS, CHROM, VitalLens APIGitHub
    JavaScript LibraryWebcam or file analysis (HR, RR, HRV)G, POS, CHROM, VitalLens APIGitHub
    iOS SDKWebcam or file analysis (HR, RR, HRV)VitalLens APIGitHub
    iOS AppWebcam processing (HR, RR)VitalLensApp Store
    Rouast LabsMore about our research & techVitalLensWebsite

    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:

    See also my minimal JavaScript implementation and Browser Demo.

    Demo

    Dependencies

    The following libraries are required to run Heartbeat:

    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:

    $ make
    

    Alternative compilation for Ubuntu. Works with opencv 3.1:

    $ 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:

    ArgumentOptionsDescription
    -iFilepath to input videoOmit flag to use webcam
    -rppgg, pca (default: g)Specify rPPG algorithm variant - only green channel or rgb channels with pca
    -facedethaar, deep (default: haar)Specify face detection classifier - Haar cascade or deep neural network
    -rRe-detection interval (default: 1 s)Interval for face re-detection; tracking is used frame-to-frame
    -fSampling frequency (default: 1 Hz)Frequency for heart rate estimation
    -maxdefault: 5Maximum size of signal sliding window
    -mindefault: 5Minimum size of signal sliding window
    -guitrue, false (default: true)Display the GUI
    -logtrue, false (default: false)Detailed logging
    -dsdefault: 1If using video from file: Downsample by using every ith frame

    License

    GPL-3.0