magnitude
import { magnitude } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
ARGUMENTSx, y, magnitude
FUNCTIONmagnitude
RETURN TYPEvoid
Calculates the magnitude of 2D vectors.
The function cv::magnitude calculates the magnitude of 2D vectors formed from the corresponding elements of x and y arrays:
\texttt{dst} (I) = \sqrt{\texttt{x}(I)^2 + \texttt{y}(I)^2}
See: cartToPolar, polarToCart, phase, sqrt
magnitude(x: Mat, y: Mat, magnitude: Mat): void;xfloating-point array of x-coordinates of the vectors.
yfloating-point array of y-coordinates of the vectors; it must have the same size as x.
magnitudeOutput destination, filled by the native operation. output array of the same size and type as x.
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.