compareTemplates method

int compareTemplates(
  1. FaceTemplate reference,
  2. FaceTemplate probe
)

Compares two templates and outputs a comparison score.

param reference Reference template. param probe Probe template. return The comparison score, in the range (0;65535). throws FaceException An error has occurred during Face Library execution.

Implementation

int compareTemplates(FaceTemplate reference, FaceTemplate probe) {
  Pointer<Int> pScore = calloc();
  try {
    var err = faceSDK.id3FaceMatcher_CompareTemplates(_pHandle.value, reference.handle, probe.handle, pScore);
    if (err != FaceError.success.value) {
      throw FaceException(err);
    }
    final vScore = pScore.value;
    return vScore;
  } finally {
    calloc.free(pScore);
  }
}