• Congxiang Pan's avatar
    Merge pull request #9466 from huningxin:js · 89b6e68e
    Congxiang Pan authored
    GSoC 2017: Improve and Extend the JavaScript Bindings for OpenCV (#9466)
    
    * Initial support for build with emscripten
    
    mkdir build_js
    cd build_js
    cmake -D CMAKE_TOOLCHAIN_FILE=/path/to/emsdk/emsdk-portable/emscripten/master/cmake/Modules/Platform/Emscripten.cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
    
    * Add js module
    
    The output is build/bin/opencv_js.js
    
    * Fix opencv2/calib3d.hpp not found issue
    
    * Add module name
    
    Usage:
    var cv = cv();
    
    * Add total memory as 128MB and allow growth
    
    * Add compilation flags for emscripten
    
    * Use EMSCRIPTEN build target
    
    * Disable js module for non emscripten build
    
    * Bind the preload file path to root
    
    Usage:
    face_cascade.load('haarcascade_frontalface_default.xml');
    
    * add test folder
    
    * fix test files
    
    * Copy js module test to bin
    
    * Support to run tests on Node.js
    
    Fix tests to import cv Module when runtime is node.
    Add tests.js to use qunit to auto run tests....
    89b6e68e