meanAsync method

Future<Scalar> meanAsync({
  1. Mat? mask,
})

Implementation

Future<Scalar> meanAsync({Mat? mask}) async {
  final s = calloc<cvg.Scalar>();
  return cvRunAsync0<Scalar>(
    (callback) {
      return mask == null
          ? ccore.cv_Mat_mean(ref, s, callback)
          : ccore.cv_Mat_mean_1(ref, mask.ref, s, callback);
    },
    (c) => c.complete(Scalar.fromPointer(s)),
  );
}