Forked from Use 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.
Type Name Latest commit message Commit time
Failed to load latest commit information.

opencv project to javascript compiler

Forked from opencvjs.

How to Build

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