Giter Site home page Giter Site logo

Comments (6)

vjpr avatar vjpr commented on May 21, 2024 1

What if you parse the OpenCV API Docs and generate the entire api?

A quick search found some other people looking for the same thing over in peterbraden/node-opencv#290.

Great ideas here: http://answers.opencv.org/question/6618/how-python-api-is-generated/

Also, this project looks interesting: https://github.com/charto/nbind. But I have never tried it out.

from opencv4nodejs.

vjpr avatar vjpr commented on May 21, 2024 1

I don't think using emscripten/asm is a good idea. Rather, its about generating the bindings from the c code.

The opencv python bindings are generated by parsing the c/cpp headers, and then using some string templates as explained in the answers.opencv.org link.

In the opencv codebase there is some interesting stuff in opencv/modules/{js,python,ts}.

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on May 21, 2024

Alright. Only moveWindow?

from opencv4nodejs.

vjpr avatar vjpr commented on May 21, 2024

For now that was just one function I wanted to use that wasn't available.

I'm wondering if there is not a more automated way to easily implement all the methods?

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on May 21, 2024

Nothing that I am aware of, not for nodejs bindings. There is an approach, which compiles some OpenCV modules to pure javascript via LLVM using emscripten, but the goal of opencv4nodejs is to provide native performance, easy multithreading, async methods and an comfortable to use API.

Implementing the bindings is actually not that hard, the main issue is, you have to know the OpenCV modules, for which you want to add bindings.

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on May 21, 2024

I think that's what I was talking about by compiling it to asm.js using emscripten. Haven't tried any of them yet, but as far as I know asm.js has still considerably less performance than native, maybe that might change with webassembly in future.

However I am also not sure, if it is possible to achieve async methods and multiple workers that way and how one would generate these, but I don't know asm.js well enough. I'm gonna have a look at your links, thanks for sharing.

from opencv4nodejs.

Related Issues (20)

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.