Skip to content
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

Support OpenCV 3.2? #102

Open
DeadNumbers opened this issue Apr 10, 2017 · 7 comments
Open

Support OpenCV 3.2? #102

DeadNumbers opened this issue Apr 10, 2017 · 7 comments

Comments

@DeadNumbers
Copy link

No description provided.

@lazywei
Copy link
Member

lazywei commented Apr 10, 2017

I would definitely like to have this. However, it seems OpenCV3.2 only has C++ API, which makes it difficult to build a wrapper in Go (through Cgo). I once tried to use SWIG to build automatically wrapper for OpenCV 3.x API at gocv/, but I feel like it is too tedious and dirty to do so.... Any suggestion would be appreciated!

@DeadNumbers
Copy link
Author

Maybe this https://medium.com/@peterleyssens/using-opencv-3-from-golang-5510c312a3c help?

@juliandroid
Copy link

juliandroid commented Jun 10, 2017

What OpenCV are doing for Java binding?

I left with impression is they are running python generator:
https://github.com/opencv/opencv/blob/05b15943d6a42c99e5f921b7dbaa8323f3c042c6/modules/java/generator/gen_java.py

Is it possible this script to be reused to create go wrapper?

@RichLewis007
Copy link

RichLewis007 commented Jun 23, 2017

Duplicate issue. And it seems that Matt started to work on this issue:
https://github.com/mlehner/go-opencv/commit/6e6733402a9e71b47c31929089f9892f005e13ec

@denismakogon
Copy link

Hi, what's current status for supporting OpenCV 3.X? Would be nice to see this soon enough.
@lazywei @mlehner @RichLewis007

@deadprogram
Copy link

The python script for generating wrappers is a bit simpler than the Java one:
https://github.com/opencv/opencv/blob/05b15943d6a42c99e5f921b7dbaa8323f3c042c6/modules/python/src2/gen2.py

The high-level process, according to comments in that code is:

  • step 1: scan the headers and build more descriptive maps of classes, consts, functions
  • step 1.5 check if all base classes exist
  • step 2: generate code for the classes and their methods
  • step 3: generate the code for all the global functions
  • step 4: generate the code for constants
  • That's it. Now save all the files

It certainly would be a lot of work, but less work than trying to manually maintain the wrappers each time there is a change to OpenCV. Any convenience functions or other Go specific sugar could be added to the script or to supplemental files.

Anyone interested in this?

@deadprogram
Copy link

Hello, everyone.

Just wanted to let you all know about my new project GoCV: http://gocv.io/

Inspired by the work done in this project, I am hopeful that with a fresh start and different approach, much more progress can be made on OpenCV 3+.

I'd love to collaborate with all of you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants