FrameSource Interface
All frame sources implement this interface:MediaPipeFrameSource
Captures camera frames and uses MediaPipe for face detection, providing a face ROI with each frame:MediaPipeFaceFrameSource
A more specialized variant that uses MediaPipe FaceMesh for precise facial landmark detection. Provides multiple ROIs for forehead, cheeks, etc.:loadFaceMesh
Helper to load the MediaPipe FaceMesh model:DemoRunner
DemoRunner orchestrates a frame source and RppgProcessor together, handling ROI extraction, skin masking, and stats reporting:
DemoRunnerOptions
| Option | Type | Default | Description |
|---|---|---|---|
roi | ROI | null | null | Fixed ROI override (null = use face detection) |
sampleRate | number | - | Override sample rate |
roiSmoothingAlpha | number | - | Exponential smoothing for ROI jitter |
useSkinMask | boolean | false | Apply YCbCr skin tone mask |
skinRatioSmoothingAlpha | number | - | Smooth the skin ratio metric |
onStats | function | - | Callback with per-frame statistics |
ROI Helper
Extract average green channel intensity from a region of interest:Next
Calibration and Fusion
Muse PPG calibration models
rppg-web Getting Started
Install and configure rppg-web