Ask Your Question

How to use the C++ functions of OpenCV from Python?

asked 2013-02-26 09:11:16 -0600

b_m gravatar image

I'm using the Python bindings of OpenCV and it's really great. However, there are functions in the C++ version that are missing from the Python bindings, BackgroundSubstractorMOG2 for example. I wonder what would be the easiest way for me to use the BackgroundSubstractorMOG2 or other C++ functions. I know that are existing techniques with SWIG and BOOST, also I found this answer about how the Python binding are generated. It's nice, but it's nowhere near detailed enough for me to follow.

I guess The missing functons will be implemented eventually, but I'm looking to use this one in the meantime. I'd be happy to contribute to the Python bindings if I knew how.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-02-27 08:14:25 -0600

Guanta gravatar image

As a quick fix you could maybe generate the Pythonbinding using Boostpython

edit flag offensive delete link more


you obviously did not read the answer mentioned above

berak gravatar imageberak ( 2013-02-27 09:16:02 -0600 )edit

I have read it and I didn't mean that he should use boost-python in general but as a quick fix he could use it (of couse not submitting it in the current release). So I don't understand your down-vote here.

Guanta gravatar imageGuanta ( 2013-02-27 11:05:35 -0600 )edit

could not revert it until there is an answer

berak gravatar imageberak ( 2013-02-27 11:12:16 -0600 )edit

Question Tools

1 follower


Asked: 2013-02-26 09:11:16 -0600

Seen: 769 times

Last updated: Feb 27 '13