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}) {
  return using<double>((arena) {
    final distance = arena<ffi.Double>();
    cvRun(
      () => cobjdetect.FaceRecognizerSF_Match(
        ref,
        faceFeature1.ref,
        faceFeature2.ref,
        disType,
        distance,
      ),
    );
    return distance.value;
  });
}