gapi_normL1
import { gapi_normL1 } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Calculates the absolute L1 norm of a matrix.
This version of normL1 calculates the absolute L1 norm of src.
As example for one array consider the function r(x)= \begin{pmatrix} x \\ 1-x \end{pmatrix}, x \in [-1;1].
The L_{1} norm for the sample value r(-1) = \begin{pmatrix} -1 \\ 2 \end{pmatrix}
is calculated as follows
f:{align*}
| r(-1) |{L_1} &= |-1| + |2| = 3 \
f:}
and for r(0.5) = \begin{pmatrix} 0.5 \\ 0.5 \end{pmatrix} the calculation is
f:{align*}
| r(0.5) |{L_1} &= |0.5| + |0.5| = 1 \
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.norml1"
See: normL2, normInf
gapi_normL1(src: GMat): GScalar;srcinput matrix.
The GScalar result. Release returned native handles with using or delete(), including handles nested in results.
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.