checkRange
import { checkRange } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
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;ainput array.
quieta flag, indicating whether the functions quietly return false when the array elements are out of range or they throw an exception.
minValinclusive lower boundary of valid values range.
maxValexclusive upper boundary of valid values range.
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.