Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Keep opencv.js and opencv_js.wasm in the same directory. Then simply include opencv.js in your HTML

<script src="./opencv.js"></script>

It will automatically load the opencv_js.wasm.

Please NOTE if you just open your HTML file by double clicking on it you will not see opencv_js.wasm in the network tab. To make this work you need to run a local server. For example, if you already have installed nodeJS in your computer, and also have installed http-server globally then run http-server command in the directory where your HTML file is. Then open http://localhost:8080/ (or in whichever port you run) and you will be able to see that opencv_js.wasm is loaded