I followed the guide to build the opencv.js with docker, but opencv.js cannot work. It’s some environment or info below:
- The source code is
41a2eb5245583403f4a26ca24ec7ba736d2cca5e
of the master branch, - System: macos big sur 11.5.2
- The build command:
docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk:2.0.10 emcmake python3 ./platforms/js/build_js.py build_js
- I use the
opencv.js
ofbuild_js/bin/opencv.js
to test the scriptexamples.js
below
// Define a global variable 'Module' with a method 'onRuntimeInitialized':
Module = {
onRuntimeInitialized() {
// this is our application:
console.log(cv.getBuildInformation())
}
}
// Load 'opencv.js' assigning the value to the global variable 'cv'
cv = require('./opencv.js')
- run command
node examples.js
but there is no output info
then I use the opencv.js
of this one to run the examples.js
, it works.
I don’t have any ideas about that. Pls give me some advices. Thanks.