Reputation: 1062
I would like to wrap a c++ project using cython for using inside a python code. The main class has instances from other local classes. Do I have to write pyx files for every class that has been used or wrapping only the main class is enough?
Thank you in advance!
Edit:
Here is the code that I want to wrap: https://github.com/vojirt/asms/tree/master/src I would like to wrap colortracker function, as other classes are used in this class, do I need to wrap them as well?
Upvotes: 2
Views: 260
Reputation: 1062
Thanks to DavidW, the problem is solved. I used this code for wrapping cv::Mat:
cdef extern from "opencv2/core/core.hpp" namespace "cv":
cdef cppclass Mat:
Mat() except +
void create(int, int, int)
void* data
It was only needed to wrap classes and functions directly used in public functions of colortracker class.
Upvotes: 1