diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp index 9369f297a2..3bb98e4f8c 100644 --- a/modules/python/src2/cv2.cpp +++ b/modules/python/src2/cv2.cpp @@ -967,6 +967,24 @@ template static inline PyObject* pyopencv_from_generic_vec(const s return seq; } +template<> +PyObject* pyopencv_from(const std::pair& src) +{ + return Py_BuildValue("(id)", src.first, src.second); +} + +template struct pyopencvVecConverter > +{ + static bool to(PyObject* obj, std::vector >& value, const ArgInfo info) + { + return pyopencv_to_generic_vec(obj, value, info); + } + + static PyObject* from(const std::vector >& value) + { + return pyopencv_from_generic_vec(value); + } +}; template struct pyopencvVecConverter > {