OpenCV for JavaScript (mjyc's fork)
npm install @mjyc/opencv.js_This is a fork published to npm. See the original for support etc._
To use solvePnP and projectPoints methods in calib3d module that was not exposed to OpenCV.js v3.4.5, I made the these modifications.
Then, I built a asm.js version of opencv.js by following the instructions (essentially, this command: python ./platforms/js/build_js.py build_js) and copied the output
--disable_wasm./build_js/bin/opencv.js file into ./platforms/js/opencv.js/ folder.
Finally, I copied other informative files from the original opencv.js npm pkg and updated README.md file.
I thank ganwenyao for demonstrating how to export a module in JavaScript and huningxin and ucisysarch for leaving handful of notes, e.g., here and here.