Python wrapper for C++ function taking cv::Mat arguments
How can I write my own python wrapper function for a C++ function, which does the automatic numpy->cv::Mat conversion for its arguments in the same way as the OpenCV python wrappers do?
As near as I can tell, the (generated) OpenCV python wrappers use pyopencv_to
and pyopencv_from
from modules/python/cv2.cpp
. Should I just copy these (with appropriate licensing)? Or is there a library I can link against which provides such helper functions?
Excellent question. I would also like to know how to exploit these facilities.