Integration guide for the rPPG-based real-time physiological monitoring service
Call the official Ignis cloud API directly; no server deployment required.
wss://health.yanshutech.com/ws/Enterprise License pricing is based on authorized terminals/instances within the contracted scope, separate from self-service Cloud API credits per connection. A 100,000 completed scans package can also be negotiated separately; the contract must define completed scans, failed/retried scans, validity and pricing. One connection does not equal one measurement. Contact wuac@yanshutech.com.
Run inside your own intranet server or Docker container.
ws://YOUR_LOCAL_IP:9100ws://{HOST}/ws/?token={API_KEY}
Available clients: the official web product (browser camera), the official Android app (APK), and WebSocket clients on any platform (frame streaming can be implemented on Linux / Windows / macOS / iOS / Android). White-labeling is offered via the WebSocket API and the Android app; there is no off-the-shelf native iOS/Android SDK — native SDKs are delivered per project.
The files below provide complete integration examples. Right-click a link and choose "Save as" to download.
| File | Type | Description | Action |
|---|---|---|---|
| js_simple.html | Web frontend | Minimal HTML+JS client demonstrating camera capture and streaming | View / Download |
| python_simple.py | Python script | Python example using OpenCV to capture and push a binary stream | Download |
| rtsp_simple.html | Web tool | RTSP stream test console for sending start/stop commands | View / Download |
| metrics.html | Documentation | Detailed mapping of physiological metrics and JSON fields | View |
The client (browser / Python / Android) captures camera frames and sends frame data to the server over WebSocket as binary messages.
| Byte offset | Data type | Endianness | Description |
|---|---|---|---|
| Byte 0 | Uint8 | - | Type flag (fixed to 0, indicating a video frame) |
| Byte 1-8 | Float64 | Little Endian | Timestamp (in seconds, double precision) |
| Byte 9... | Bytes | - | JPEG image data (complete file stream) |
Python (OpenCV + struct)
import struct
import time
import cv2
# 1. Compress the frame
_, jpeg = cv2.imencode('.jpg', frame, [int(cv2.IMWRITE_JPEG_QUALITY), 90])
# 2. Build the header: Type(0) + Timestamp(double)
# < means little-endian, B=uchar, d=double
header = struct.pack('<Bd', 0, time.time())
# 3. Send
ws.send(header + jpeg.tobytes(), opcode=2)
JavaScript (Browser)
// Assume jpegBuffer is an image ArrayBuffer
const timestamp = Date.now() / 1000;
const totalLen = 1 + 8 + jpegBuffer.byteLength;
const buffer = new ArrayBuffer(totalLen);
const view = new DataView(buffer);
// 1. Write type and timestamp (true = little-endian)
view.setUint8(0, 0);
view.setFloat64(1, timestamp, true);
// 2. Write image data
new Uint8Array(buffer, 9).set(new Uint8Array(jpegBuffer));
ws.send(buffer);
The server pushes analysis results in real time over WebSocket as JSON. The structure is as follows:
| JSON path | Unit | Description |
|---|---|---|
spo2 | % | Blood oxygen saturation (estimate). If it stays below 95%, re-measure with a medical device and consult a doctor. |
hrv.meanHr | bpm | Mean heart rate. |
hrv.sdnn | ms | SDNN (Standard Deviation of NN intervals). |
hrv.rmssd | ms | RMSSD. Mainly reflects parasympathetic activity. |
SBP / DBP | mmHg | Estimated systolic / diastolic blood pressure (wellness estimate, not a cuff replacement). |
Breathing_RATE | rpm | Respiratory rate. |
| JSON path | Description |
|---|---|
emotion_short_res | Real-time emotion trend. Enum values: Neutral, Happy, Sad, etc. |
stress_score | Stress index (0-100), a trend score. |
attention_score | Attention trend score. |