getExpression method

FaceExpression getExpression()

Gets the estimated expression of the subject (angriness, disgust, fear, happiness, sadness, surprise, or neutral). Unknown if not computed.

return Estimated expression of the subject (angriness, disgust, fear, happiness, sadness, surprise, or neutral). Unknown if not computed. throws FaceException An error has occurred during Face Library execution.

Implementation

FaceExpression getExpression() {
  Pointer<Int32> pExpression = calloc();
  try {
    var err = faceSDK.id3FacePortrait_GetExpression(_pHandle.value, pExpression);
    if (err != FaceError.success.value) {
      throw FaceException(err);
    }
    final vExpression = FaceExpressionX.fromValue(pExpression.value);
    return vExpression;
  } finally {
    calloc.free(pExpression);
  }
}