Skip to content

checkRange

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

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

ARGUMENTSa, quiet, minVal, maxVal
FUNCTIONcheckRange
RETURN TYPEcheckRangeResult
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Checks every element of an input array for invalid values.

The function cv::checkRange checks that every array element is neither NaN nor infinite. When minVal > -DBL_MAX and maxVal < DBL_MAX, the function also checks that each value is between minVal and maxVal. In case of multi-channel arrays, each channel is processed independently. If some values are out of range, position of the first outlier is stored in pos (when pos != NULL). Then, the function either returns false (when quiet=true) or throws an exception.

checkRange(a: Mat, quiet: boolean, minVal: number, maxVal: number): checkRangeResult;
4 available overloads
checkRange(a: Mat): checkRangeResult;
checkRange(a: Mat, quiet: boolean): checkRangeResult;
checkRange(a: Mat, quiet: boolean, minVal: number): checkRangeResult;
checkRange(a: Mat, quiet: boolean, minVal: number, maxVal: number): checkRangeResult;
a

input array.

quiet

a flag, indicating whether the functions quietly return false when the array elements are out of range or they throw an exception.

minVal

inclusive lower boundary of valid values range.

maxVal

exclusive upper boundary of valid values range.

Returns

The checkRangeResult result. Scalar output parameters are returned as named fields in this object. 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.