WVR_GetEyeExpData

WVR_EXPORT WVR_Result WVR_GetEyeExpData(WVR_EyeExp_t * data)

Use this function to get the eye expression data.

Version
API Level 10
Parameters
Return Value
  • WVR_Success: Successfully retrieved data.
  • Others: WVR_Result mean failure.

struct WVR_EyeExp

the eye expression data

Public Members

float weights[WVR_EYEEXPRESSION_MAX]
int64_t timestamp

How to use

Sample function:

#include <wvr/wvr_eyeexp.h>
#include <wvr/wvr_device.h>

if (WVR_StartEyeExp() == WVR_Success) {
    if(WVR_IsDeviceConnected(WVR_DeviceType::WVR_DeviceType_EyeExpression)) {
        WVR_EyeExp_t eyeExpData;
        WVR_Result resultEyeExp = WVR_GetEyeExpData(&eyeExpData);
        if(resultEyeExp == WVR_Result::WVR_Success) {
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_LEFT_BLINK = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_LEFT_BLINK]);
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_LEFT_WIDE = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_LEFT_WIDE]);
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_RIGHT_BLINK = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_RIGHT_BLINK]);
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_RIGHT_WIDE = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_RIGHT_WIDE]);
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_LEFT_SQUEEZE = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_LEFT_SQUEEZE]);
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_RIGHT_SQUEEZE = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_RIGHT_SQUEEZE]);
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_LEFT_DOWN = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_LEFT_DOWN]);
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_RIGHT_DOWN = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_RIGHT_DOWN]);
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_LEFT_OUT = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_LEFT_OUT]);
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_RIGHT_IN = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_RIGHT_IN]);
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_LEFT_IN = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_LEFT_IN]);
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_RIGHT_OUT = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_RIGHT_OUT]);
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_LEFT_UP = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_LEFT_UP]);
            LOGI("WVR_GetEyeExpData WVR_EYEEXPRESSION_RIGHT_UP = %f", eyeExpData.weights[WVR_EyeExpression::WVR_EYEEXPRESSION_RIGHT_UP]);
            LOGI("WVR_GetEyeExpData timestamp = %lld", eyeExpData.timestamp);
        } else {
            // get eye expression failed!
        }
    }
    //WVR_StopEyeExp
} else {
    // start eye expression failed!
}