accumulateWeighted function

Mat accumulateWeighted(
  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

Mat accumulateWeighted(InputArray src, InputOutputArray dst, double alpha, {InputArray? mask}) {
  if (mask == null) {
    cvRun(() => cffi.Mat_AccumulatedWeighted(src.ref, dst.ref, alpha));
  } else {
    cvRun(() => cffi.Mat_AccumulatedWeightedWithMask(src.ref, dst.ref, alpha, mask.ref));
  }
  return dst;
}