opencv::gapi

Function norm_l2

source
pub fn norm_l2(src: &impl GMatTraitConst) -> Result<GScalar>
Expand description

Calculates the absolute L2 norm of a matrix.

This version of normL2 calculates the absolute L2 norm of src.

As example for one array consider the function inline formula. The inline formula norm for the sample value inline formula is calculated as follows \f{align*} | r(-1) |{L_2} &= \sqrt{(-1)^{2} + (2)^{2}} = \sqrt{5} \ \f} and for inline formula the calculation is \f{align*} | r(0.5) |{L_2} &= \sqrt{(0.5)^{2} + (0.5)^{2}} = \sqrt{0.5} \ \f}

Supported matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1].

Note: Function textual ID is “org.opencv.core.matrixop.norml2”

§Parameters

  • src: input matrix.

§See also

normL1, normInf