Skip to content

wychi/opencv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15,544 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCV with Emscripten

In this branch, we are going to combine opencv with emscripten to enable opencv's rich features in javascript's world.

We are going to

  1. Export Mat by Embinding. (Working)
  2. Export the first layer modules by Embinding.

Setup Emscripten

Emscripten installation guide from Emscripten.org

Version 1.29 and above is recommended for better performance.

Compile

At the root folder of opencv source code.
$ mkdir jsobj
$ cd jsobj
$ emcmake cmake ..
$ emmake make

You will find opencv.js in ${jsobj}/lib folder. By Including this js library in HTML or require it in js, you can start using opencv.

Run

You may use opencv.js in firefox/ chrome or node.js.

In node.js

$ node
> var Module = require('./opencv.js');
> var mat = new Module.Mat(10, 10, Module.CV_8UC3)
> mat.channels()
3

About

Open Source Computer Vision Library

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C++ 83.9%
  • Cuda 5.9%
  • C 3.0%
  • Java 2.5%
  • CMake 2.1%
  • Python 1.7%
  • Other 0.9%