Skip to content

Visualization Options ​

The Vitals™ SDK provides several visualization overlays that enhance the user experience during vital sign scanning. These options give real-time visual feedback about face detection, signal quality, and measurement progress.

Available Visualizations ​

FeatureDescriptionDocumentation
HeatmapPPG amplitude heatmap overlay on the face region, with 10 visual presetsHeatmap Guide
Signal VisualizerReal-time scrolling PPG/respiratory waveform displaySignal Visualizer Guide
Bounding BoxFace detection boundary rectangleBounding Box Guide
Face Mesh468-point facial landmark wireframe overlay with animationFace Mesh Guide
Thermal MaskThermal-style overlay tracked to the face regionThermal Mask Guide
Scanning SequenceStage-aware orchestrator that animates the overlays through a scan sequenceScanning Sequence Guide
Model Loading ProgressProgress overlay during AI model initializationModel Loading Progress Guide

Configuration ​

Visualization options are configured through the visualizationOptions property when creating the camera instance:

typescript
import { createVitalSignCamera } from 'ts-vital-sign-camera';

const camera = createVitalSignCamera({
  // ... other config
  visualizationOptions: {
    heatmap: { enabled: true, mode: 'field' },
    boundingBox: { enabled: true, color: 'red' },
    faceMesh: { enabled: true, color: 'lightgreen', animate: true }
  }
});
tsx
import { VitalSignCamera } from 'react-vital-sign-camera';

const App = () => (
  <VitalSignCamera
    visualizationOptions={{
      heatmap: { enabled: true, mode: 'field' },
      boundingBox: { enabled: true },
      faceMesh: { enabled: true }
    }}
  />
);
vue
<template>
  <VitalSignCamera
    :visualizationOptions="visualizationOptions"
  />
</template>

<script setup>
const visualizationOptions = {
  heatmap: { enabled: true, mode: 'field' },
  boundingBox: { enabled: true },
  faceMesh: { enabled: true }
};
</script>

Runtime Updates ​

Visualization options can be updated at runtime using the visualizationOptions setter:

typescript
// Disable heatmap
camera.visualizationOptions = {
  ...camera.visualizationOptions,
  heatmap: { enabled: false }
};

// Change heatmap preset
camera.visualizationOptions = {
  ...camera.visualizationOptions,
  heatmap: { mode: 'neon' }
};

VisualizationOptions Interface ​

typescript
interface VisualizationOptions {
  boundingBox?: BoundingBoxOptions;
  faceMesh?: FaceMeshOptions;
  thermalMask?: ThermalMaskOptions;
  scanningSequence?: ScanningSequenceOptions;
  modelLoadingProgress?: ModelLoadingProgressOptions;
  heatmap?: HeatmapOptions;
}

Each sub-option is lazy-initialized when first enabled and destroyed when disabled.