Camera-Based Heart Rate (rPPG)
Remote photoplethysmography (rPPG) extracts heart rate from subtle skin color changes visible in a standard webcam feed. No wearable device required — just a camera.
How It Works
- The user's webcam captures their face
- A client-side processing engine detects the face and tracks skin regions
- Proprietary signal processing extracts the blood volume pulse from pixel color variations
- Heart rate and HRV metrics are derived from the extracted pulse signal
- Results are sent to Nefesh via
/v1/ingest— no video leaves the device
Privacy by Design
All video processing happens entirely on the client device. No video frames, images, or facial data are ever sent to Nefesh servers. Only the extracted heart rate, HRV, and confidence values are transmitted.
Integration
// After rPPG processing on the client:
await fetch('https://api.nefesh.ai/v1/ingest', {
method: 'POST',
headers: {
'X-Nefesh-Key': 'YOUR_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
session_id: 'your-session-id',
timestamp: new Date().toISOString(),
heart_rate: 78,
rmssd: 36.2,
confidence: 0.82,
source_device: 'webcam_rppg',
}),
});
Requirements
- Good, consistent lighting (avoid backlighting)
- User's face visible and relatively still
- Minimum 10 seconds of signal for reliable readings
- Works best at 30 FPS camera resolution
Accuracy
Camera-based heart rate is less accurate than chest straps or clinical devices. Nefesh accounts for this by including a confidence score with each reading. Low-confidence readings are weighted accordingly in the fusion engine.