Blink Detection
As discussed in the Error Handling guide, Vitals™ can perform blink detection throughout the Vitals™ Health Assessment (aka VHA) process. When blink detection is enabled, during the 25-second Collecting Data stage, the user should blink at least once, otherwise, a No Blink error will be thrown by the Vitals™ SDK through the onVideoFrameProcessed callback function at the start of the Analyzing Data stage.
There are both advantages and disadvantages to implementing blink detection, and you have the flexibility to enable or disable it:
AdvantageAdvantage | DisadvantageDisadvantage |
|---|---|
| Helps prevent fraudulent scans, such as scanning with a photo. | Individuals with relatively smaller eyes may fail the scan even if they have blinked. |
Target SDK
TIP
You can refer to the sample code and the API Reference for more details. Most related API(s) include: VitalSignEngineConfig and BlinkDetectorType.
By default, blink detection is disabled. To enable blink detection, set the blinkDetectorType property to BlinkDetectorType.default in the VitalSignEngineConfig when creating the Vital Sign Camera. Else, if you want to disable blink detection, set it to BlinkDetectorType.dummy (default).
/* Vitals™ Cloud Service Config */
const config : VitalSignEngineConfig = {
// ...
blinkDetectorType: BlinkDetectorType.default // Enable blink detection
}
window.onload = () => {
/* Create and initialize Vital Sign Camera */
const video = document.querySelector("video")!;
const cam = createVitalSignCamera({ isActive: true, config });
cam.bind(video);
}/* Vitals™ Cloud Service Config */
const config = {
// ...
blinkDetectorType: BlinkDetectorType.default // Enable blink detection
}
window.onload = () => {
/* Create and initialize Vital Sign Camera */
const video = document.querySelector("video");
const cam = createVitalSignCamera({ isActive: true, config });
cam.bind(video);
}