Skip to main content

What is rPPG?

Remote photoplethysmography (rPPG) extracts heart rate from subtle color changes in facial skin captured by a standard camera. No contact sensor is needed, just a webcam.

When To Use This Package

Use @elata-biosciences/rppg-web when your app needs:
  • camera-based biosignal processing in the browser
  • a higher-level rPPG session API instead of raw WASM orchestration
  • diagnostics and app-facing helpers around rPPG sessions

Installation

Requirements: Node.js 20+, browser with camera access and WebAssembly support.
For most browser apps, start with createRppgSession(). It handles WASM init, frame capture, ROI orchestration, diagnostics, and cleanup.
Use createManagedRppgSession() if you also want automatic restart after terminal processor failures.

Diagnostics Guidance

Every session diagnostics payload includes state, issue codes, sampling stats, and processor failure information.
  • If session.state.status becomes failed, treat the underlying processor as terminal and recreate the session.
  • If backend: "auto" falls back to an unavailable backend mode, diagnostics report that state instead of failing silently.

Advanced: RppgProcessor

For custom orchestration, drop to RppgProcessor directly. Only use this when you need something createRppgSession() does not provide. If you are debugging, compare against createRppgSession() first.

Constructor

Pushing Samples

Metrics


Key Exports

  • createRppgSession
  • createManagedRppgSession
  • RppgProcessor
  • loadWasmBackend
  • createRppgAppAdapter
  • createRppgAppMonitor
  • normalizeRppgError
  • computeTraceWaveformDebug
  • ensureVideoPlaying

Next

rPPG Existing App Tutorial

Step-by-step integration guide

Frame Sources

MediaPipe face detection and camera capture

Calibration

Muse fusion and calibration models

Camera Integration Guide

End-to-end rPPG setup