addWeighted function

Mat addWeighted(
  1. InputArray src1,
  2. double alpha,
  3. InputArray src2,
  4. double beta,
  5. double gamma, {
  6. OutputArray? dst,
  7. int dtype = -1,
})

AddWeighted calculates the weighted sum of two arrays.

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

Implementation

Mat addWeighted(
  InputArray src1,
  double alpha,
  InputArray src2,
  double beta,
  double gamma, {
  OutputArray? dst,
  int dtype = -1,
}) {
  dst ??= Mat.empty();
  cvRun(() => ccore.Mat_AddWeighted(src1.ref, alpha, src2.ref, beta, gamma, dst!.ref, dtype));
  return dst;
}