Table of Contents

Method CartToPolar

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

CartToPolar(InputArray, InputArray, OutputArray, OutputArray, bool)

Calculates the magnitude and angle of 2D vectors.

public static void CartToPolar(InputArray x, InputArray y, OutputArray magnitude, OutputArray angle, bool angleInDegrees = false)

Parameters

x InputArray

array of x-coordinates; this must be a single-precision or double-precision floating-point array.

y InputArray

array of y-coordinates, that must have the same size and same type as x.

magnitude OutputArray

output array of magnitudes of the same size and type as x.

angle OutputArray

output array of angles that has the same size and type as x; the angles are measured in radians(from 0 to 2*Pi) or in degrees(0 to 360 degrees).

angleInDegrees bool

a flag, indicating whether the angles are measured in radians(which is by default), or in degrees.