magnitude function

Mat magnitude(
  1. InputArray x,
  2. InputArray y, {
  3. OutputArray? magnitude,
})

Magnitude calculates the magnitude of 2D vectors.

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

Implementation

Mat magnitude(InputArray x, InputArray y, {OutputArray? magnitude}) {
  magnitude ??= Mat.empty();
  cvRun(() => ccore.cv_magnitude(x.ref, y.ref, magnitude!.ref, ffi.nullptr));
  return magnitude;
}