setHatThreshold method

void setHatThreshold(
  1. int hatThreshold
)

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

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

Implementation

void setHatThreshold(int hatThreshold) {
  var err = faceSDK.id3FacePortraitProcessor_SetHatThreshold(_pHandle.value, hatThreshold);
  if (err != FaceError.success.value) {
    throw FaceException(err);
  }
}