meanStdDevAsync function

Future<(Scalar, Scalar)> meanStdDevAsync(
  1. InputArray src, {
  2. InputArray? mask,
})

MeanStdDev calculates a mean and standard deviation of array elements.

For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga846c858f4004d59493d7c6a4354b301d

Implementation

Future<(Scalar mean, Scalar stddev)> meanStdDevAsync(InputArray src, {InputArray? mask}) async => cvRunAsync2(
      (callback) => mask == null
          ? ccore.core_MeanStdDev_Async(src.ref, callback)
          : ccore.core_MeanStdDevWithMask_Async(src.ref, mask.ref, callback),
      (c, p, p1) =>
          c.complete((Scalar.fromPointer(p.cast<ccore.Scalar>()), Scalar.fromPointer(p1.cast<ccore.Scalar>()))),
    );