Introduction
The Vitals SDK provides real-time, camera-based wellness estimation using remote photoplethysmography (rPPG) technology. This innovative approach allows you to estimate physiological wellness indicators from facial video streams captured through a device camera.
What is rPPG?
Remote photoplethysmography (rPPG) is a non-contact optical measurement technique that detects blood volume changes in the microvascular tissue bed. Unlike traditional contact-based PPG methods that require sensors attached to the skin, rPPG analyzes subtle color changes in facial skin caused by blood circulation using standard camera equipment.
The technology works by measuring the absorption and reflection of light by blood vessels in the skin. As blood flows through the microvasculature, the optical properties of the skin change rhythmically with each heartbeat. These changes, though imperceptible to the human eye, can be captured and analyzed using computer vision algorithms.
How It Works
The Vitals SDK implements a sophisticated signal processing pipeline that transforms raw video frames into meaningful wellness metrics:
- Video Capture: The SDK captures a continuous video stream from the device camera
- ROI Detection: Identifies the region of interest (typically the forehead) for optimal signal extraction
- Signal Processing: Applies CHROM-based color processing to extract the rPPG signal
- Preprocessing: Detrends, filters, and normalizes the signal for reliable analysis
- Estimation: Uses FFT-based frequency analysis and machine learning to estimate vital signs
- Quality Assessment: Evaluates signal quality and rejects low-quality frames
Non-Contact System
The Vitals SDK is designed as a completely non-contact wellness estimation system. Users simply need to position themselves in front of a camera, and the SDK will automatically:
- Detect and track the face in real-time
- Extract physiological signals from facial skin tone variations
- Process and analyze the signals to estimate wellness indicators
- Provide continuous measurements throughout the session
Important Disclaimer
Intended Use Cases
The Vitals SDK is intended for wellness, research, screening, and digital health experiences. Common use cases include:
- Wellness Monitoring: Track general wellness trends and patterns over time
- Fitness Apps: Provide heart rate and stress indicators during workouts
- Research Studies: Collect physiological data for academic or clinical research
- Digital Health: Enhance telemedicine and remote patient monitoring experiences
- Corporate Wellness: Implement stress management and wellness programs
- Gaming & Entertainment: Create immersive biofeedback experiences
System Architecture
The SDK follows a modular architecture that separates concerns for flexibility and maintainability:
// High-level architecture flow
Video Stream → ROI Detection → Signal Extraction
→ Preprocessing → Feature Extraction → Estimation
→ Quality Assessment → Output
// Each module can be configured independently
const config = {
roiDetection: { region: 'forehead' },
signalProcessing: {
method: 'chrom',
windowSize: 45 // seconds
},
qualityThresholds: {
brightness: { min: 50, max: 200 },
sharpness: { min: 0.5 }
}
};Key Features
- Real-Time Processing: Analyzes video frames in real-time with minimal latency
- WebSocket Streaming: Efficient data transfer using WebSocket protocol
- Quality Gating: Automatic rejection of low-quality frames to ensure accuracy
- Window Aggregation: 45-second default window for stable, averaged results
- Signal Confidence: Provides confidence scores for each measurement
- Multi-Metric Support: Estimates 9+ wellness indicators simultaneously
Technical Approach
The SDK combines classical signal processing with machine learning to achieve accurate wellness estimation:
- Heart Rate: FFT-based frequency domain estimation with peak validation
- HRV: RMSSD calculation from R-R intervals
- Respiratory Rate: Frequency band isolation in the respiratory range
- SpO₂: Red/green channel AC ratio analysis
- Blood Pressure & Glucose: Classical linear estimation with ML refinement using RandomForestRegressor
Getting Started
Ready to integrate the Vitals SDK into your application? Check out our Getting Started guide for detailed installation and setup instructions.