Skip to content

gapi_normalize

gapifunctionOpenCV 5.0.0
import { gapi_normalize } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSsrc, alpha, beta, norm_type
FUNCTIONgapi_normalize
RETURN TYPEGMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Normalizes the norm or value range of an array.

The function normalizes scale and shift the input array elements so that

\| \texttt{dst} \| _{L_p}= \texttt{alpha}

(where p=Inf, 1 or 2) when normType=NORM_INF, NORM_L1, or NORM_L2, respectively; or so that

\min _I  \texttt{dst} (I)= \texttt{alpha} , \, \, \max _I  \texttt{dst} (I)= \texttt{beta}

when normType=NORM_MINMAX (for dense arrays only).

Note: Function textual ID is "org.opencv.core.normalize"

See: norm, Mat::convertTo

gapi_normalize(src: GMat, alpha: number, beta: number, norm_type: number, ddepth: number): GMat;
2 available overloads
gapi_normalize(src: GMat, alpha: number, beta: number, norm_type: number): GMat;
gapi_normalize(src: GMat, alpha: number, beta: number, norm_type: number, ddepth: number): GMat;
src

input array.

alpha

norm value to normalize to or the lower range boundary in case of the range normalization.

beta

upper range boundary in case of the range normalization; it is not used for the norm normalization.

norm_type

normalization type (see cv::NormTypes).

ddepth

when negative, the output array has the same type as src; otherwise, it has the same number of channels as src and the depth =ddepth.

Returns

The GMat 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.