diff --git a/modules/core/misc/python/pyopencv_rotationwarper.hpp b/modules/core/misc/python/pyopencv_rotationwarper.hpp deleted file mode 100644 index 0fac1854fb..0000000000 --- a/modules/core/misc/python/pyopencv_rotationwarper.hpp +++ /dev/null @@ -1,8 +0,0 @@ -#ifdef HAVE_OPENCV_STITCHING - -typedef std::vector vector_ImageFeatures; -typedef std::vector vector_MatchesInfo; -typedef std::vector vector_CameraParams; - - -#endif diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp index d46b50327b..df1608be27 100644 --- a/modules/python/src2/cv2.cpp +++ b/modules/python/src2/cv2.cpp @@ -1378,47 +1378,6 @@ template<> struct pyopencvVecConverter } }; -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 -{ - 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 -{ - 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 { static bool to(PyObject* obj, std::vector& value, const ArgInfo info) diff --git a/modules/stitching/misc/python/pyopencv_stitching.hpp b/modules/stitching/misc/python/pyopencv_stitching.hpp index 634e8dd1d5..13ebfc9c95 100644 --- a/modules/stitching/misc/python/pyopencv_stitching.hpp +++ b/modules/stitching/misc/python/pyopencv_stitching.hpp @@ -3,4 +3,47 @@ typedef Stitcher::Status Status; typedef Stitcher::Mode Mode; +typedef std::vector vector_ImageFeatures; +typedef std::vector vector_MatchesInfo; +typedef std::vector vector_CameraParams; + +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 +{ + 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 +{ + 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); + } +}; + #endif