﻿ Intensity and Evidence

# Intensity and Evidence

Top  Previous  Next

Intensity and Evidence

Use the QueryEmotionData function to query data for a specific emotion of a face or the QueryAllEmotionData function to retrieve data for all emotions of a face.

Among the detected emotion parameters (see the Emotion structure for definitions,) the two parameters intensity and evidence determine how likely the face might perform the emotion:

 • Evidence:  This value represents the odds in 10-based logarithmic scale of a target expression being present. For instance, the value 2 indicates that an emotion is 100 (=102) times more likely to be categorized as present than not present; while the value -2 indicates that an emotion is 100 times more likely to be categorized as not present than present.

Evidence is more useful when an application needs to know whether a particular emotion is present.

 • Intensity: This value shows the perceived intensity of the emotion as estimated by human experts as follows:
 Value Interval Description of Emotion Expression [0.0, 0.2) expression is likely absent [0.2, 0.4) expression is of low intensity [0.4, 0.6) expression is of medium intensity [0.6, 0.8) expression is of high intensity [0.8, 1.0] expression is of high intensity

Intensity is more useful when an application needs to quantify the strength of the emotions.

Intensity has a non-linear relationship with evidence. As intensity increases, evidence increases. As a subjective scale, intensity is more intuitive than evidence but it is more sensitive to variations. It is recommended that the application uses evidence to determine an outstanding emotion state out of all emotion data, as illustrated in Example 60.

The module exposes scores for multiple emotion states. It is possible that a person in the picture expresses more than a single emotion state, for example, surprising with joy. Thus it is also recommended to take all detected emotion data into consideration, rather than simply taking the outstanding one.

C++ Example 60: Retrieve Emotion Detection Result

 pxcI32 num_faces = em->QueryNumFaces(); for (pxcI32 fid=0; fidQueryAllEmotionData(fid, arrData);      // find the emotion with maximum evidence    int idx_outstanding_emotion = 0;    int max_evidence = arrData[0].evidence;    for (pxcI32 k=1; k<7; k++) {        if (arrData[k].evidence < max_evidence) continue;        max_evidence = arrData[k].evidence;        idx_outstanding_emotion=k;    }      // do something with the outstanding primary emotion    .... }

 Int32 num_faces = em.QueryNumFaces(); for (int fid=0; fid

 int num_faces = em.QueryNumFaces(); for (int fid=0; fid