Issues with installing OpenCV JS on Windows 10

asked 2019-02-15 14:50:05 -0500

  • OpenCV => 4.0.1 and previous versions
  • Operating System / Platform => Windows 10 64 Bit
  • Compiler => Visual Studio 2017

I am on the process of installing OpenCV JS and I've encountered simple errors here and there that can be found by searching via Google. However, I'm currently on an error that is irresolvable at the moment and is something out of my limit. I'm about to build opencv.js with this:

python build_js --emscripten_dir=C:\Users\schma\Documents\DulChunCinn\opencv-js\emsdk

And this is the error I get:

CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:186 (message): OpenCV 4.x requires C++11 Call Stack (most recent call first):
CMakeLists.txt:156 (include)

-- Configuring incomplete, errors occurred! See also "C:/Users/schma/Documents/DulChunCinn/opencv-js/opencv/platforms/js/build_js/CMakeFiles/CMakeOutput.log". See also "C:/Users/schma/Documents/DulChunCinn/opencv-js/opencv/platforms/js/build_js/CMakeFiles/CMakeError.log". Traceback (most recent call last):
File "", line 227, in <module> builder.config() File "", line 167, in config execute(cmd) File "", line 23, in execute raise Fail("Child returned: %s" % retcode) __main__.Fail: Child returned: 1

I tried running with the latest versions of OpenCV (i.e. 4.0.1), of Emscripten SDK and also of CMake. Moreover, I tried it with their previous versions as well.

Any kind of help would be highly appreciated. Thanks in advance.

edit retag flag offensive close merge delete


just as a sidenote:

if you only want to use opencv.js, you can download the nightly build from here:

berak gravatar imageberak ( 2019-02-16 01:43:19 -0500 )edit


Do we need utils.js too?

Also, can we just simply call/include/require/import the js file without the need of compiling it any more? :0

and we can access the methods like houghTransform ,canny etc?????

shariq_azim gravatar imageshariq_azim ( 2019-03-28 15:11:13 -0500 )edit