-
Notifications
You must be signed in to change notification settings - Fork 809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more bindings for GUI - e.g. im.moveWindow
#18
Comments
Alright. Only moveWindow? |
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? |
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. |
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. |
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. |
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 |
added moveWindow, destroyWindow, destroyAllWindows
Last merged pr from justadudewhohacks/opencv4nodejs
https://docs.opencv.org/3.3.0/d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563
The text was updated successfully, but these errors were encountered: