normAsync function

Future<double> normAsync(
  1. InputArray src1, {
  2. int normType = NORM_L2,
  3. InputArray? mask,
})

Norm calculates the absolute norm of an array.

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

Implementation

Future<double> normAsync(
  InputArray src1, {
  int normType = NORM_L2,
  InputArray? mask,
}) async {
  mask ??= Mat.empty();
  final p = calloc<ffi.Double>();
  return cvRunAsync0(
    (callback) => ccore.cv_norm(src1.ref, normType, mask!.ref, p, callback),
    (c) {
      final rval = p.value;
      calloc.free(p);
      return c.complete(rval);
    },
  );
}