Forked from https://github.com/ucisysarch/opencvjs. Use n_make.py to build and link OpenCV and your project before compiling to javascript.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
web_build
.gitignore
.gitmodules
LICENSE
README.md
n_make.py
package.json

README.md

opencv project to javascript compiler

Forked from opencvjs.

How to Build

  1. Get the source code
git clone https://github.com/biggzlar/opencv_js_compiler.git
cd opencv_js_compiler
git clone https://github.com/opencv/opencv
  1. Install emscripten. You can obtain emscripten by using Emscripten SDK.
./emsdk update
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
  1. Compile OpenCV and your source file.
  python n_make.py example/example.cpp
  1. Add the compiled javascript module to your .html file.
  <script type='text/javascript'>
    var Module = {
      preRun: [],
      postRun: []
    };
  </script>
  <script async src='example.js'></script>