affdex-sdk: SDK FaceTracking для Unity3D

Может кто-нибудь сослаться на любой ресурс/проект, который использует http://www.affectiva.com/ для отслеживания лица и извлекать ориентиры в Unity3D

Учебник здесь относится только к извлечению эмоций http://developer.affectiva.com/v2_2/unity/


person Anshul Jhawar    schedule 08.09.2016    source источник


Ответы (1)


Попробуйте что-то вроде этого (от http://developer.affectiva.com/v2_2/unity/analyze-camera/).

using Affdex;
using System.Collections.Generic;

public class PlayerEmotions : ImageResultsListener
{
    public FeaturePoint[] featurePointsList;

    public override void onFaceFound(float timestamp, int faceId)
    {
        Debug.Log("Found the face");
    }

    public override void onFaceLost(float timestamp, int faceId)
    {
        Debug.Log("Lost the face");
    }

    public override void onImageResults(Dictionary<int, Face> faces)
    {
        foreach (KeyValuePair<int, Face> pair in faces)
        {
            int FaceId = pair.Key;  // The Face Unique Id.
            Face face = pair.Value;    // Instance of the face class containing emotions, and facial expression values.

            //Retrieve the coordinates of the facial landmarks (face feature points)
            featurePointsList = face.FeaturePoints;

            // do something with the feature points
        }
    }
}
person Andy Dennie    schedule 08.09.2016
comment
Аншул Джавар, если это ответило на ваш вопрос, пожалуйста, примите его. Спасибо. - person Andy Dennie; 02.01.2017