opencvjs-wasm-webworker-webpack-demo
opencvjs-wasm-webworker-webpack-demo copied to clipboard
A demo of in-browser face detection using WASM-built OpenCV.js, Web Worker and webpack.
opencvjs-wasm-webworker-webpack-demo
A demo of in-browser face detection, using OpenCV.js built as WebAssembly (WASM), running through Web Worker and bundled by webpack.
Hopefully to be a good scaffold to start any OpenCV.js projects.

Live Demo
https://mecab.github.io/opencvjs-facedetect-livedemo
How to run
$ npm install
$ npm run debug
(Debug/development purpose. Your modification will show up soon by
webpack --watch and node-dev)
or
$ npm install
$ npm run build
$ npm start
(Production purpose. Produces minified JS, however you will need to build the assets to reflect your edit.)
Where opencv.js, opencv_js.js and opencv_js.wasm come from
These compiled js and wasm files are built from OpenCV v3.4.2 source through OpenCV.js offical build instruction.
I pushed a Docker image to generate them so that you can easily build them by yourself. Dockerfile is also available.
LICENSE
This is available as open source under the terms of the MIT License.