OpenCV JavaScript version (NPM package) for node.js or browser. The file opencv.js
was downloaded from https://docs.opencv.org/4.5.3/opencv.js
TypeScript is supported (thanks to mirada
).
- See live demo and code here
- Get the test image from here Lenna.png
npm install @techstark/opencv-js
- or
yarn add @techstark/opencv-js
If you use this package for browsers, you need to set some polyfills. In the file "webpack.config.js", set
module.exports = {
resolve: {
modules: [...],
fallback: {
fs: false,
path: false,
crypto: false
}
}
};