compute1Async static method

Future<Scalar> compute1Async(
  1. String modelFile,
  2. String rangeFile,
  3. Mat img
)

async version of compute1

Implementation

static Future<Scalar> compute1Async(String modelFile, String rangeFile, Mat img) async {
  final p = calloc<cvg.Scalar>();
  final cm = modelFile.toNativeUtf8().cast<ffi.Char>();
  final cr = rangeFile.toNativeUtf8().cast<ffi.Char>();
  return cvRunAsync0(
    (callback) => ccontrib.cv_quality_QualityBRISQUE_compute_static(img.ref, cm, cr, p, callback),
    (c) {
      calloc.free(cm);
      calloc.free(cr);
      return c.complete(Scalar.fromPointer(p));
    },
  );
}