subtract function

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

Mat subtract(
  InputArray src1,
  InputArray src2, {
  OutputArray? dst,
  InputArray? mask,
  int dtype = -1,
}) {
  dst ??= Mat.empty();
  mask ??= Mat.empty();
  cvRun(() => ccore.Mat_Subtract(src1.ref, src2.ref, dst!.ref, mask!.ref, dtype));
  return dst;
}