[−][src]Function opencv::core::polar_to_cart
pub fn polar_to_cart(
magnitude: &dyn ToInputArray,
angle: &dyn ToInputArray,
x: &mut dyn ToOutputArray,
y: &mut dyn ToOutputArray,
angle_in_degrees: bool
) -> Result<()>
Calculates x and y coordinates of 2D vectors from their magnitude and angle.
The function cv::polarToCart calculates the Cartesian coordinates of each 2D vector represented by the corresponding elements of magnitude and angle:
The relative accuracy of the estimated coordinates is about 1e-6.
Parameters
- magnitude: input floating-point array of magnitudes of 2D vectors; it can be an empty matrix (=Mat()), in this case, the function assumes that all the magnitudes are =1; if it is not empty, it must have the same size and type as angle.
- angle: input floating-point array of angles of 2D vectors.
- x: output array of x-coordinates of 2D vectors; it has the same size and type as angle.
- y: output array of y-coordinates of 2D vectors; it has the same size and type as angle.
- angleInDegrees: when true, the input angles are measured in degrees, otherwise, they are measured in radians.
See also
cartToPolar, magnitude, phase, exp, log, pow, sqrt
C++ default parameters
- angle_in_degrees: false