fromFileAsync static method
Implementation
static Future<FaceRecognizerSF> fromFileAsync(
String model,
String config, {
int backendId = 0,
int targetId = 0,
}) async {
final cModel = model.toNativeUtf8().cast<ffi.Char>();
final cConfig = config.toNativeUtf8().cast<ffi.Char>();
final rval = await cvRunAsync<FaceRecognizerSF>(
(callback) => cobjdetect.FaceRecognizerSF_New_Async(
cModel,
cConfig,
backendId,
targetId,
callback,
), (c, p) {
return c.complete(FaceRecognizerSF.fromPointer(p.cast<cobjdetect.FaceRecognizerSF>()));
});
calloc.free(cModel);
calloc.free(cConfig);
return rval;
}