Skip to content

checkHardwareSupport

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

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

ARGUMENTSfeature
FUNCTIONcheckHardwareSupport
RETURN TYPEboolean
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

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;
feature

The 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.