accumulateWeightedAsync function

Future<Mat> accumulateWeightedAsync(
  1. InputArray src,
  2. InputOutputArray dst,
  3. double alpha, {
  4. InputArray? mask,
})

Updates a running average.

For further details, please see: https:///docs.opencv.org/master/d7/df3/group__imgproc__motion.html#ga4f9552b541187f61f6818e8d2d826bc7

Implementation

Future<Mat> accumulateWeightedAsync(
  InputArray src,
  InputOutputArray dst,
  double alpha, {
  InputArray? mask,
}) async =>
    mask == null
        ? cvRunAsync0(
            (callback) => cimgproc.Mat_AccumulatedWeighted_Async(src.ref, dst.ref, alpha, callback),
            (c) => c.complete(dst),
          )
        : cvRunAsync0(
            (callback) =>
                cimgproc.Mat_AccumulatedWeightedWithMask_Async(src.ref, dst.ref, alpha, mask.ref, callback),
            (c) => c.complete(dst),
          );