@jtkkempower/opencv-js
v4.11.2-release.1
Published
OpenCV.js patched for uni-app environment (based on @techstark/opencv-js)
Downloads
200
Maintainers
Readme
@jtkkempower-opencv-js
This is a modified version based on @techstark/opencv-js, with compatibility fixes for the uni-app environment (removing Node dependencies and adjusting ENVIRONMENT detection logic).
The original project is licensed under the Apache License 2.0.
OpenCV JavaScript version (NPM package) for node.js or browser. Get started guide OpenCV.js Tutorials.
The file opencv.js was downloaded from https://docs.opencv.org/4.11.0/opencv.js
TypeScript is supported (thanks to mirada).
Basic Usage
>=4.11
import cvReadyPromise from "@jtkkempower/opencv-js";
async function main() {
const cv = await cvReadyPromise;
console.log("OpenCV.js is ready!");
// You can now use OpenCV functions here
console.log(cv.getBuildInformation());
}<=4.10
import cv from "@jtkkempower/opencv-js";
cv.onRuntimeInitialized = () => {
console.log("OpenCV.js is ready!");
// You can now use OpenCV functions here
console.log(cv.getBuildInformation());
};What methods and properties are available
The TypeScript type declarations may not be up to date with the latest OpenCV.js. Refer to cvKeys.json to check the available methods and properties at runtime.
