gapi_polarToCart
import { gapi_polarToCart } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Calculates x and y coordinates of 2D vectors from their magnitude and angle.
The function polarToCart calculates the Cartesian coordinates of each 2D vector represented by the corresponding elements of magnitude and angle:
\begin{array}{l} \texttt{x} (I) = \texttt{magnitude} (I) \cos ( \texttt{angle} (I)) \\ \texttt{y} (I) = \texttt{magnitude} (I) \sin ( \texttt{angle} (I)) \\ \end{array}
The relative accuracy of the estimated coordinates is about 1e-6.
First output is a matrix of x-coordinates of 2D vectors. Second output is a matrix of y-coordinates of 2D vectors. Both output must have the same size and depth as input matrices.
Note: Function textual ID is "org.opencv.core.math.polarToCart"
See: cartToPolar, exp, log, pow, sqrt
gapi_polarToCart(magnitude: GMat, angle: GMat, angleInDegrees: boolean): tuple_GMat_and_GMat;2 available overloads
gapi_polarToCart(magnitude: GMat, angle: GMat): tuple_GMat_and_GMat;gapi_polarToCart(magnitude: GMat, angle: GMat, angleInDegrees: boolean): tuple_GMat_and_GMat;magnitudeinput floating-point
CV_32FC1matrix (1xN) of magnitudes of 2D vectors;angleinput floating-point
CV_32FC1matrix (1xN) of angles of 2D vectors.angleInDegreeswhen true, the input angles are measured in degrees, otherwise, they are measured in radians.
The tuple_GMat_and_GMat result.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.