Cannot get Emscripten path, please specify it either by EMSCRIPTEN environment variable or --emscripten_dir option.
Hello guys.I am totally new for opencv.js.I have some problems on building opencv.js I am using Windows 10.I follow below steps for setup opencv.js.The problem look like "EMPSCRÄ°PTEN cannot set the path properly and part 5 fail to execute".How can i solve this problem?
https://docs.opencv.org/3.3.1/d4/da1/...
1-)First I used below link to download the Empscripten https://kripken.github.io/emscripten-...
2-)And execute this line son command propmpt(in empscripten folder)
emsdk
emsdk_env.bat
After this Execution , Empscripten set the path
EMSDK = C:/Users/q/Desktop/web/opencv.js/emsdk-portable-64bit
EM_CONFIG = C:\Users\q\.emscripten
3-)Download phyton 3
4-)Clone opencv
git clone https://github.com/opencv/opencv.git
5-)Execute this code to build opencv.js but i get following error
python C:\Users\q\opencv\platforms\js\build_js.py C:\OpencvJS
C:\Users\q>python C:\Users\q\opencv\platforms\js\build_js.py C:\OpencvJS
Args: Namespace(build_dir='C:\\OpencvJS', build_doc=False, build_test=False, build_wasm=False, clean_build_dir=False, config_only=False, emscripten_dir=None, enable_exception=False, opencv_dir='C:\\Users\\q\\opencv', skip_config=False)
Cannot get Emscripten path, please specify it either by EMSCRIPTEN environment variable or --emscripten_dir option.
cd into C:\Users\q\opencv\platforms\js ( so it finds the opencv code ), then
try either:
(on the cmdline) or add it to the build_js.py args:
try, and report back, please !
After execute this code , i get this : https://anotepad.com/notes/6pnq5j
i find emcc https://imgur.com/Zej042e
Place emcc in my PATH: https://imgur.com/CMcPeQt
And type : python build_js.py C:\OpencvJS --emscripten_dir=C:/Users/q/Desktop/web/opencv.js/emsdk-portable-64bit
I get this: https://anotepad.com/notes/jphh3f
hmm, it's actually
emcc.bat
, in your sdk folder right ?there might be a bug, since subprocess cannot guess, that you want to start
emcc.bat
, notemcc
. (which is the corresponding linux shell script)can you try to change this line
to:
???
I change this file :C:\Users\q\opencv\platforms\js\build_js.py
Now my file like this: https://anotepad.com/notes/jn5m7p
I am getting this error: https://anotepad.com/notes/fh3qxf
My emcc file path:C:\Users\q\Desktop\web\opencv.js\emsdk-portable-64bit
My emsdk file path:C:\Users\q\Desktop\web\opencv.js\emsdk-portable-64bit
apologies, out of ideas then. ;(
thank you for your interest :) Can you use this opencv.js file without building it?(like jquery) Where can i find this file?
yes, you can take utils.js and opencv.js it from the docs webpages (just follow the iframes !)
woww.Thank you a lot.It is definitely huge library(32MB).How can i minify this file?I tried to copy code and minify this javascript file by following sites and my browser have crashed and cannot respond.
woww, last time i looked, it had grown from 6mb to 12mb ;)
(and no idea, sorry.)