Writing Python bindings for C++ code that use OpenCV

后端 未结 3 2041
野趣味
野趣味 2020-12-02 07:57

I\'m trying to write a python wrapper for some C++ code that make use of OpenCV but I\'m having difficulties returning the result, which is a OpenCV C++ Mat object, to the p

3条回答
  •  -上瘾入骨i
    2020-12-02 08:41

    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.

    [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.

提交回复
热议问题