Alarm More Faces

Analyzes alarm more faces in a video stream. The event listener keeps getting the data in a object JSON as FaceAI keeps analyzing alarm more faces.

Method

To analyze alarm more faces in a video stream.

Method: EnxFaceAI.startAlarmMoreFaces(callback)

Parameter

  • callback Callback to know that the processing request has been accepted.

Event Listener

  • alarm-more-faces: This event notification is received repeatedly with the Alarm More Faces Analysis report as a JSON object.

JSON Object: Received with Alarm More Faces Analysis data.

{ output: {
moreFaces: Boolean
}
}

Analysis Data Explanation

  • output : Alarm More Faces Report
    • moreFaces : Boolean. It is true when the alarm is ON, false otherwise.

Sample Code

// Start Alarm More Faces
faceAI.startAlarmMoreFaces((res) => {
if (res.result === 0) {
window.addEventListener("alarm-more-faces", (evt) => {
console.log(evt.detail, "alarm-more-faces");
});
}
});