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, and a lots of feature detection algorithms for example. What would be the easiest way to call them from Python?
I hope this helps people looking for a fast and easy way.
Here is the github repo with the open C++ code I wrote for exposing code using OpenCV's Mat class with as little pain as possible. It was originally inspired by Yati Sagade's example.
[Update] This code now works for OpenCV 2.X and OpenCV 3.X. CMake and experimental support for Python 3.X are now also available.
I also found that a few months after my original utility was written, Sudeep Pillai also wrote a similar thing for C++/CMake. There seems to be OpenCV 2 and OpenCV 3 support as well. May be worth a try.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With