compute1Async static method

Future<(Scalar, Mat)> compute1Async(
  1. Mat img,
  2. Mat cmp, {
  3. Mat? qualityMap,
  4. double maxPixelValue = 255,
})

async version of compute1

Implementation

static Future<(Scalar, Mat qualityMap)> compute1Async(
  Mat img,
  Mat cmp, {
  Mat? qualityMap,
  double maxPixelValue = 255,
}) async {
  final p = calloc<cvg.Scalar>();
  qualityMap ??= Mat.empty();
  return cvRunAsync0(
      (callback) => ccontrib.cv_quality_QualityPSNR_compute_static(
            img.ref,
            cmp.ref,
            maxPixelValue,
            qualityMap!.ref,
            p,
            callback,
          ), (c) {
    return c.complete((Scalar.fromPointer(p), qualityMap!));
  });
}