cartToPolar function

(Mat, Mat) cartToPolar(
  1. InputArray x,
  2. InputArray y, {
  3. OutputArray? magnitude,
  4. OutputArray? angle,
  5. bool angleInDegrees = false,
})

CartToPolar calculates the magnitude and angle of 2D vectors.

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

Implementation

(Mat magnitude, Mat angle) cartToPolar(
  InputArray x,
  InputArray y, {
  OutputArray? magnitude,
  OutputArray? angle,
  bool angleInDegrees = false,
}) {
  magnitude ??= Mat.empty();
  angle ??= Mat.empty();
  cvRun(() => ccore.cv_cartToPolar(x.ref, y.ref, magnitude!.ref, angle!.ref, angleInDegrees, ffi.nullptr));
  return (magnitude, angle);
}