compute1Async static method

Future<(Scalar, Mat)> compute1Async(
  1. Mat ref,
  2. Mat cmp, {
  3. Mat? qualityMap,
})

async version of compute1

Implementation

static Future<(Scalar, Mat qualityMap)> compute1Async(
  Mat ref,
  Mat cmp, {
  Mat? qualityMap,
}) =>
    cvRunAsync<(Scalar, Mat)>(
      (callback) {
        qualityMap ??= Mat.empty();
        final status = cffi.QualitySSIM_compute_static_async(ref.ref, cmp.ref, qualityMap!.ref, callback);
        return status;
      },
      (c, p) => c.complete((Scalar.fromPointer(p.cast<cvg.Scalar>()), qualityMap!)),
    );