cv.cartToPolar - MATLAB File Help
cv.cartToPolar

Calculates the magnitude and angle of 2D vectors

[mag, ang] = cv.cartToPolar(x, y)
[...] = cv.cartToPolar(..., 'OptionName',optionValue, ...)

Input

Output

Options

The function cv.cartToPolar calculates either the magnitude, angle, or both for every 2D vector (x(I),y(I)):

magnitude(I) = sqrt(x(I)^2 + y(I)^2)
angle(I) = atan2(y(I), x(I)) [* (180/pi)]

The angles are calculated with accuracy about 0.3 degrees. For the point (0,0), the angle is set to 0.

See also