subtractAsync function

Future<Mat> subtractAsync(
  1. InputArray src1,
  2. InputArray src2, {
  3. OutputArray? dst,
  4. InputArray? mask,
  5. int dtype = -1,
})

Subtract calculates the per-element subtraction of two arrays or an array and a scalar.

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

Implementation

Future<Mat> subtractAsync(
  InputArray src1,
  InputArray src2, {
  OutputArray? dst,
  InputArray? mask,
  int dtype = -1,
}) async {
  dst ??= Mat.empty();
  mask ??= Mat.empty();
  return cvRunAsync0(
    (callback) => ccore.cv_subtract(src1.ref, src2.ref, dst!.ref, mask!.ref, dtype, callback),
    (c) {
      return c.complete(dst);
    },
  );
}