Alarm Low Attention
Analyzes alarm low attention in a video stream. The event listener keeps getting the data in the JSON object as FaceAI keeps analyzing alarm low attention.
Method
To analyze alarm low attention in a video stream.
Method: EnxFaceAI.startAlarmLowAttention(callback)
Parameter
callback
: Callback to know that the processing request has been accepted.
Event Listener
alarm-low-attention
: This event notification is received repeatedly with the Alarm Low Attention Analysis report as a JSON object.
JSON Object: Received with Alarm Low Attention Analysis data.
{ output: {lowAttention: Boolean}}
Analysis Data Explanation
output
: Alarm Low Attention ReportlowAttention
: Boolean. It is true when the alarm is ON, false otherwise.
Sample Code
// Start Alarm Low AttentionfaceAI.startAlarmLowAttention((res) => {if (res.result === 0) {window.addEventListener("alarm-low-attention", (evt) => {console.log(evt.detail, "alarm-low-attention");});}});