Video measurement


The SDK outputs results once required success conditions were satisfied for 1 minute.

Success conditions

The following conditions are required for a successful measurement:

  • the extracted photoplethysmographic signal quality must be above a threshold that enables unambigous interpretation
  • human face must be stable and properly positioned within the camera frame

Final metrics

Final measurement metrics are provided based on all full heart cycles observed during the last 1 minute of the measurement. The measurement itself may take longer if some conditions were not satisfied (such as lighting issue or user leaving the view of the camera).

Base metrics

IBI (interbeat intervals) are computed based on advanced filtering and analysis of the extracted dense photoplethysmographic signal. Start and end time of each detected heartbeat is provided, as well as it's duration rounded to full milliseconds.

HR (heart rate) is computed based on the average duration of observed heart cycles.

HRV (heart rate variability) metrics are computed as statistical measures of the observed heart cycles. The SDNN and lnRMSDD metrics are provided.

SI (cardiac stress index) is computed based on the statistical distribution of time intervals between the successive heartbeats detected during the video measurement. It is similar to the Baevsky stress index but has been adapted for short measurements (1 minute).

Our cardiac stress index is an indirect measure of the physiological stress experienced by the body as assessed by the way the heart beats. Its values are usually in the range 0-10, although higher values, corresponding to particularly high levels of physiological stress, are also possible.

Cardiac stress mainly reflects the state of the autonomic nervous system (ANS), which controls the heart rhythm as well as various other involuntary physiological processes. It is determined based on the analysis of heart rate during our video-based measurement. In general, the lower the cardiac stress, the better, as it suggests a relaxed state of a well-rested body, a good level of fitness, overall health, and/or young biological age.

BR (breathing rate) is computed based on advanced analysis of the observed heart cycles.


Breathing rate will only be available if the SDK has high confidence about the computed result, so it might not be returned for some measurements (for example in cases of very slow, very fast or highly irregular breath). Breathing rate will always be returned if the measurement is done in the Relaxed precision mode.

Beta metrics

BP (blood pressure) is computed using a custom-trained deep-learning AI model (beta feature).

Accessing the results

The results can be obtained with getMeasurementResults() call providing metrics computed for the latest measurement (invalid if no measurement was finished successfully) of the following structure:

class MeasurementResults {
  double heart_rate_bpm;                   // Heart rate, rounded to 1 BPM   
  double? hrv_sdnn_ms;                     // Heart rate variability, SDNN metric, rounded to 1 ms
  double? hrv_lnrmssd_ms;                  // Heart rate variability, lnRMSSD metric, rounded to 0.1 ms
  double? stress_index;                    // Cardiac Stress, rounded to 0.1
  double? breathing_rate_bpm;              // Breathing rate, rounded to 1 BPM       
  double? systolic_blood_pressure_mmhg;    // Systolic blood pressure, rounded to 1 mmHg                 
  double? diastolic_blood_pressure_mmhg;   // Diastolic blood pressure, rounded to 1 mmHg                   
  List<Heartbeat?> heartbeats;             // Heartbeat locations
  double average_signal_quality;           // Average signal quality metric
class Heartbeat {
  double start_location_sec;  // exact start location in seconds
  double end_location_sec;    // exact end location in seconds
  double duration_ms;         // heartbeat duration, rounded to 1 ms
var results = await ShenaiSDK.getMeasurementResults();

Additional outputs

Some additional outputs are provided, which may be used to better instruct the user about how the measurement process works. Note that the outputs will only be available after a successful measurement.

rPPG signal

You can access the final rPPG signal from the measurement by calling the getFullPpgSignal() method:

var ppgSignal = await ShenaiSDK.getFullPpgSignal();

The signal will be returned as a list of floating point values, where each value represents the intensity of the signal at a given point in time. The signal is sampled at the camera frame rate, which is usually 30 FPS.

Facial regions visualizations

You can access an image of the region of the face which was used to extract the rPPG signal, as well as the signal intensity map.

var faceImage = await ShenaiSDK.getFaceTexturePng();
var signalImage = await ShenaiSDK.getSignalQualityMapPng();

The images will be returned as PNG-encoded byte arrays which you can decode and display as you wish, for example along with explaining the measurement results.


The facial texture image may be personally identifiable, so you should not save/upload it without permission from the user. No personally identifiable data leaves the SDK by itself as all processing is done locally on the device.