Face Wish
Analyzes face wish in a video stream. The event listener keeps getting the data in a JSON object as FaceAI keeps analyzing the face wish.
Method
To analyze face wish in a video stream.
Method: EnxFaceAI.startFaceWish(callback)
Parameter
callback
: Callback to know that processing request has been accepted.
Event Listener
face-wish
: This event notification is received repeatedly with the Face Wish Analysis report as a JSON object.
JSON Object: Received with Face Wish Analysis data.
{ output: {wish: Number}}
Analysis Data Explanation
output
: Face Wish Report-
wish
: Filtered value (smoothened) in range [0, 1.0]. A value closer to 0 represents a lower wish, a value closer to 1.0 represents a higher wish.
-
Sample Code
// Start Face WishfaceAI.startFaceWish((res) => {if (res.result === 0) {window.addEventListener("face-wish", (evt) => {console.log(evt.detail, "face-wish");});}});