WVR_GetLipExpData¶
-
WVR_EXPORT WVR_Result WVR_GetLipExpData(float * value)
Use this function to get the lip expression data.
- Version
- API Level 9
- Parameters
value
: The lip expression data WVR_LipExpression
- Return Value
WVR_Success
: Successfully retrieved data.Others
: WVR_Result mean failure.
How to use¶
Sample function:
#include <wvr/wvr_lip.h>
if (WVR_StartLipExp() == WVR_Success) {
if(WVR_IsDeviceConnected(WVR_DeviceType::WVR_DeviceType_Lip)) {
float lp[WVR_LipExpression_Max];
if (WVR_GetLipExpData(lp) == WVR_Success) {
// get lip expression data success
LOGI("JAW_RIGHT=%f", lp[WVR_LipExpression_Jaw_Right]);
LOGI("JAW_LEFT=%f", lp[WVR_LipExpression_Jaw_Left]);
LOGI("JAW_FORWARD=%f", lp[WVR_LipExpression_Jaw_Forward]);
LOGI("JAW_OPEN=%f", lp[WVR_LipExpression_Jaw_Open]);
LOGI("MOUTH_APE_SHAPE=%f", lp[WVR_LipExpression_Mouth_Ape_Shape]);
LOGI("MOUTH_UPPER_RIGHT=%f", lp[WVR_LipExpression_Mouth_Upper_Right]);
LOGI("MOUTH_UPPER_LEFT=%f", lp[WVR_LipExpression_Mouth_Upper_Left]);
LOGI("MOUTH_LOWER_RIGHT=%f", lp[WVR_LipExpression_Mouth_Lower_Right]);
LOGI("MOUTH_LOWER_LEFT=%f", lp[WVR_LipExpression_Mouth_Lower_Left]);
LOGI("MOUTH_UPPER_OVERTURN=%f", lp[WVR_LipExpression_Mouth_Upper_Overturn]);
LOGI("MOUTH_LOWER_OVERTURN=%f", lp[WVR_LipExpression_Mouth_Lower_Overturn]);
LOGI("MOUTH_POUT=%f", lp[WVR_LipExpression_Mouth_Pout]);
LOGI("MOUTH_SMILE_RIGHT=%f", lp[WVR_LipExpression_Mouth_Smile_Right]);
LOGI("MOUTH_SMILE_LEFT=%f", lp[WVR_LipExpression_Mouth_Smile_Left]);
LOGI("MOUTH_SAD_RIGHT=%f", lp[WVR_LipExpression_Mouth_Sad_Right]);
LOGI("MOUTH_SAD_LEFT=%f", lp[WVR_LipExpression_Mouth_Sad_Left]);
LOGI("CHEEK_PUFF_RIGHT=%f", lp[WVR_LipExpression_Cheek_Puff_Right]);
LOGI("CHEEK_PUFF_LEFT=%f", lp[WVR_LipExpression_Cheek_Puff_Left]);
LOGI("CHEEK_SUCK=%f", lp[WVR_LipExpression_Cheek_Suck]);
LOGI("MOUTH_UPPER_UPRIGHT=%f", lp[WVR_LipExpression_Mouth_Upper_Upright]);
LOGI("MOUTH_UPPER_UPLEFT=%f", lp[WVR_LipExpression_Mouth_Upper_Upleft]);
LOGI("MOUTH_LOWER_DOWNRIGHT=%f", lp[WVR_LipExpression_Mouth_Lower_Downright]);
LOGI("MOUTH_LOWER_DOWNLEFT=%f", lp[WVR_LipExpression_Mouth_Lower_Downleft]);
LOGI("MOUTH_UPPER_INSIDE=%f", lp[WVR_LipExpression_Mouth_Upper_Inside]);
LOGI("MOUTH_LOWER_INSIDE=%f", lp[WVR_LipExpression_Mouth_Lower_Inside]);
LOGI("MOUTH_LOWER_OVERLAY=%f", lp[WVR_LipExpression_Mouth_Lower_Overlay]);
LOGI("TONGUE_LONGSTEP1=%f", lp[WVR_LipExpression_Tongue_Longstep1]);
LOGI("TONGUE_LEFT=%f", lp[WVR_LipExpression_Tongue_Left]);
LOGI("TONGUE_RIGHT=%f", lp[WVR_LipExpression_Tongue_Right]);
LOGI("TONGUE_UP=%f", lp[WVR_LipExpression_Tongue_Up]);
LOGI("TONGUE_DOWN=%f", lp[WVR_LipExpression_Tongue_Down]);
LOGI("TONGUE_ROLL=%f", lp[WVR_LipExpression_Tongue_Roll]);
LOGI("TONGUE_LONGSTEP2=%f", lp[WVR_LipExpression_Tongue_Longstep2]);
LOGI("TONGUE_UPRIGHT_MORPH=%f", lp[WVR_LipExpression_Tongue_Upright_Morph]);
LOGI("TONGUE_UPLEFT_MORPH=%f", lp[WVR_LipExpression_Tongue_Upleft_Morph]);
LOGI("TONGUE_DOWNRIGHT_MORPH=%f", lp[WVR_LipExpression_Tongue_Downright_Morph]);
LOGI("TONGUE_DOWNLEFT_MORPH=%f", lp[WVR_LipExpression_Tongue_Downleft_Morph]);
} else {
// get lip expression failed!
}
}
WVR_StopLipExp();
} else {
// start lip expression failed!
}