getHatThreshold method

int getHatThreshold()

Gets the threshold for confirming that the person is wearing a hat. Hint: Default value is 98.

return Threshold for confirming that the person is wearing a hat. throws FaceException An error has occurred during Face Library execution.

Implementation

int getHatThreshold() {
  Pointer<Int> pHatThreshold = calloc();
  try {
    var err = faceSDK.id3FacePortraitProcessor_GetHatThreshold(_pHandle.value, pHatThreshold);
    if (err != FaceError.success.value) {
      throw FaceException(err);
    }
    final vHatThreshold = pHatThreshold.value;
    return vHatThreshold;
  } finally {
    calloc.free(pHatThreshold);
  }
}