Home - huningxin/opencv GitHub Wiki
Installing Emscripten
To Install Emscripten, follow instructions of Emscripten SDK
Downloading code
$ git clone https://github.com/huningxin/opencv.git
Build
$ python ./platforms/js/build_js.py build_js
Test
In browser
$ python ./platforms/js/build_js.py build_js --build_test
$ cd bin
$ http-server
Launch browser to http://localhost:8080
.
Tests include:
- tests.html
In Node.js
$ cd bin
$ npm install
$ node tests.js
Build Documentation
This will create offline version of OpenCV's complete official documentation in HTML. First, install Doxygen (a documentation generation tool).
$ apt-get install doxygen
Then, execute command
$ python ./platforms/js/build_js.py build_js --build_doc
After build succeeds, open build_js/doc/doxygen/html/index.html
in the browser.
Lint
Install eslint
, eslint-config-google
and eslint-plugin-html
:
$ npm install -g eslint
$ npm install -g eslint-config-google
$ npm install -g eslint-plugin-html
Lint tests:
$ cd modules/js/test
$ eslint *.js
Lint docs:
$ cd doc/js_tutorials/js_assets
$ eslint *.html
API list
https://docs.google.com/spreadsheets/d/1uUbKcXBRVDX9oHp6cTCvvSqozqz42BaRcznwxwGFUEM/edit#gid=0