Giter VIP home page Giter VIP logo

opencv's Introduction

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

Test

JS test suite is put in module/js/test. There are many tests in test suite, and those tests are good reference of how to using opencv module by javascript.

Sample

I am constructing a js app, in sample/js folder, which demostrate the usage of image-proc module.

Next step

  1. Automatic binding code generator. I don't want to manually generate bind code for each function that we want to export onto javascript.
  2. Matrix operation.(MatExpr)

opencv's People

Contributors

23pointsnorth avatar a-wi avatar abak avatar abidrahmank avatar akarsakov avatar alalek avatar albenoit avatar asmorkalov avatar berak avatar bitwangyaoyao avatar bloodaxe avatar edgarriba avatar ernest-galbrun avatar exocoder avatar f-morozov avatar ilya-lavrenov avatar lluisgomez avatar mbarnach avatar mshabunin avatar nailbiter avatar nghiaho12 avatar oresths avatar ovidiuparvu avatar ozantonkal avatar pclove1 avatar pengx17 avatar siddharthk avatar vpisarev avatar vrabaud avatar znah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

wychi guest271314

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.