match method

double match(
  1. Mat faceFeature1,
  2. Mat faceFeature2, {
  3. int disType = FR_COSINE,
})

Calculates the distance between two face features.

faceFeature1 the first input feature faceFeature2 the second input feature of the same size and the same type as face_feature1 disType defines how to calculate the distance between two face features with optional values "FR_COSINE" or "FR_NORM_L2"

https://docs.opencv.org/4.x/da/d09/classcv_1_1FaceRecognizerSF.html#a2f0362ca1e64320a1f3ba7e1386d0219

Implementation

double match(Mat faceFeature1, Mat faceFeature2, {int disType = FR_COSINE}) {
  final distance = calloc<ffi.Double>();
  cvRun(
    () => cobjdetect.cv_FaceRecognizerSF_match(
      ref,
      faceFeature1.ref,
      faceFeature2.ref,
      disType,
      distance,
      ffi.nullptr,
    ),
  );
  final rval = distance.value;
  calloc.free(distance);
  return rval;
}