match method
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"
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;
}