Node bindings for opencv.js (https://docs.opencv.org/4.5.3/d5/d10/tutorial_js_root.html)
Current opencv.js version 4.5.4
Check github repo's README for the latest updates. README available on npm may be out-of-date.
npm install --save opencv-bindings
Runs as a simple node.js container (built from vscode). Specify the environment variable OPENCV_VERSION
and run the command fetch-opencv-js.sh
. This will download the opencv version available at https://github.com/opencv/opencv/releases/tag/4.5.4
Once downloaded, run the commands:
npm install # make sure you're in the project directory
npm run test
Tests are based off the opencv.js node.js tutorial https://docs.opencv.org/4.5.4/dc/de6/tutorial_js_nodejs.html
const cv = require('opencv-bindings');
// set a timeout, it takes some time for opencv.js to load since it's just one massive file
setTimeout(() => {
console.log(cv.getBuildInformation());
}, 1000);