Ask Your Question

lazywei's profile - activity

2017-10-17 23:58:45 -0600 received badge  Notable Question (source)
2016-07-13 07:26:15 -0600 received badge  Popular Question (source)
2015-02-20 03:19:07 -0600 received badge  Self-Learner (source)
2015-02-20 03:17:17 -0600 received badge  Scholar (source)
2015-02-20 03:17:08 -0600 answered a question Golang binding for C++ API

I finally found a way to use SWIG to build C++ wrapper for Go. In case someone is interested in it, please refer to the gocvpackage under https://github.com/lazywei/go-opencv. Thanks.

2015-02-16 00:27:48 -0600 received badge  Supporter
2015-02-16 00:25:02 -0600 received badge  Enthusiast
2015-02-15 00:03:17 -0600 asked a question Syntax error in core.hpp (missing semicolon)

Hi,

I'm trying to use SWIG to wrap OpenCV's C++ API. However, when I compile, I got this error:

/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core.hpp:123: Error: Syntax error - possibly a missing semicolon.

and here is my swig file:

%module example

%{
#include "opencv2/core/core.hpp"
%}

%include "opencv2/core/core.hpp"

I'm not sure if this is an error from SWIG or from OpenCV. Is it OK to only include core.hpp?

Thanks.

2015-02-07 06:51:28 -0600 received badge  Student (source)
2015-02-07 06:51:18 -0600 asked a question Golang binding for C++ API

Hi,

I maintain a Golang binding for OpenCV, see https://github.com/lazywei/go-opencv. It uses CGO for bridging C & Go, which means I can only use C API interface.

However, I notice that in OpenCV 2 (and afterward), there is only C++ API. After some googling, I know that you're not gonna support C API anymore after 2.x. Therefore, I decide to try to make a wrapper for C++ API instead. I'm wondering if you could give me suggestion on how I can make it or how I can start with?

Currently, I'm looking into SWIG. My concern is ... when I make a repository (or Go package) for OpenCV wrapper, do I must include the header files of OpenCV if I want to use SWIG? Can I use SWIG without include OpenCV's header files (e.g., leave them in /usr/local/opt/opencv/include)?

Thanks.