Skip to content

norm1

Core and matricesfunctionOpenCV 5.0.0
import { norm1 } from '@banou/opencv-wasm'

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

ARGUMENTSsrc1, src2, normType, mask
FUNCTIONnorm1
RETURN TYPEnumber
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Calculates an absolute difference norm or a relative difference norm.

This version of cv::norm calculates the absolute difference norm or the relative difference norm of arrays src1 and src2. The type of norm to calculate is specified using #NormTypes.

norm1(src1: Mat, src2: Mat, normType: number, mask: Mat): number;
3 available overloads
norm1(src1: Mat, src2: Mat): number;
norm1(src1: Mat, src2: Mat, normType: number): number;
norm1(src1: Mat, src2: Mat, normType: number, mask: Mat): number;
src1

first input array.

src2

second input array of the same size and the same type as src1.

normType

type of the norm (see #NormTypes).

mask

optional operation mask; it must have the same size as src1 and type CV_8UC1, CV_8S1 or CV_BoolC1.

Returns

The number result.

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.