fromFileAsync static method
Implementation
static Future<Net> fromFileAsync(String path, {String config = "", String framework = ""}) async {
final cPath = path.toNativeUtf8().cast<ffi.Char>();
final cConfig = config.toNativeUtf8().cast<ffi.Char>();
final cFramework = framework.toNativeUtf8().cast<ffi.Char>();
final p = calloc<cvg.Net>();
final rval = cvRunAsync0<Net>(
(callback) => cdnn.cv_dnn_Net_readNet(cPath, cConfig, cFramework, p, callback),
(c) {
final net = Net.fromPointer(p);
return c.complete(net);
},
);
calloc.free(cPath);
calloc.free(cConfig);
calloc.free(cFramework);
return rval;
}