diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp index 9369f297a2dd9c2d4b0a7ac4e614f9133accb868..3bb98e4f8c1030d8b9aafb52aec697a81182262e 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 > {