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