Calculates cartesian coordinates of 2d vectors represented in polar form
void cvPolarToCart( const CvArr* magnitude, const CvArr* angle,
CvArr* x, CvArr* y, int angle_in_degrees=0 );
magnitude
The array of magnitudes. If it is NULL, the magnitudes are assumed all 1’s.
angle
The array of angles, whether in radians or degrees.
x
The destination array of x-coordinates, may be set to NULL if it is not needed.
y
The destination array of y-coordinates, may be set to NULL if it is not needed.
angle_in_degrees
The flag indicating whether the angles are measured in radians, which is default mode, or in degrees.
The function cvPolarToCart calculates either x-coodinate, y-coordinate or both of every vector magnitude(I)*exp(angle(I)*j), j=sqrt(-1):
x(I)=magnitude(I)*cos(angle(I)),
y(I)=magnitude(I)*sin(angle(I))
Partager