magnitude

Function magnitude 

Source
pub fn magnitude(
    x: &impl ToInputArray,
    y: &impl ToInputArray,
    magnitude: &mut impl ToOutputArray,
) -> Result<()>
Expand description

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: block formula

§Parameters

  • x: floating-point array of x-coordinates of the vectors.
  • y: floating-point array of y-coordinates of the vectors; it must have the same size as x.
  • magnitude: output array of the same size and type as x.

§See also

cartToPolar, polarToCart, phase, sqrt