matchAsync method

Future<double> matchAsync(
  1. Mat faceFeature1,
  2. Mat faceFeature2, {
  3. int disType = FaceRecognizerSF.FR_COSINE,
})

Implementation

Future<double> matchAsync(
  Mat faceFeature1,
  Mat faceFeature2, {
  int disType = FaceRecognizerSF.FR_COSINE,
}) async {
  final distance = calloc<ffi.Double>();
  return cvRunAsync0(
    (callback) => cobjdetect.cv_FaceRecognizerSF_match(
      ref,
      faceFeature1.ref,
      faceFeature2.ref,
      disType,
      distance,
      callback,
    ),
    (c) {
      final rval = distance.value;
      calloc.free(distance);
      return c.complete(rval);
    },
  );
}