checkHardwareSupport
import { checkHardwareSupport } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
ARGUMENTSfeature
FUNCTIONcheckHardwareSupport
RETURN TYPEboolean
Returns true if the specified feature is supported by the host hardware.
The function returns true if the host hardware supports the specified feature. When user calls setUseOptimized(false), the subsequent calls to checkHardwareSupport() will return false until setUseOptimized(true) is called. This way user can dynamically switch on and off the optimized code in OpenCV.
checkHardwareSupport(feature: number): boolean;featureThe feature of interest, one of cv::CpuFeatures
Returns
The boolean 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.