Skip to content

patchNaNs

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

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

ARGUMENTSa, val
FUNCTIONpatchNaNs
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Replaces NaNs (Not-a-Number values) in a matrix with the specified value.

This function modifies the input matrix in-place. The input matrix must be of type CV_32F or CV_64F; other types are not supported.

patchNaNs(a: Mat, val: number): void;
2 available overloads
patchNaNs(a: Mat): void;
patchNaNs(a: Mat, val: number): void;
a

Input/output value, modified by the native operation. Input/output matrix (CV_32F or CV_64F type).

val

Value used to replace NaNs (defaults to 0).

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.