diff --git a/modules/features2d/include/opencv2/features2d.hpp b/modules/features2d/include/opencv2/features2d.hpp index 1ba9f9b90240..1f0a92c18839 100644 --- a/modules/features2d/include/opencv2/features2d.hpp +++ b/modules/features2d/include/opencv2/features2d.hpp @@ -1404,15 +1404,15 @@ CV_EXPORTS_W void drawKeypoints( const Mat& image, const std::vector& const Scalar& color=Scalar::all(-1), int flags=DrawMatchesFlags::DEFAULT ); // Draws matches of keypints from two images on output image. -CV_EXPORTS void drawMatches( const Mat& img1, const std::vector& keypoints1, +CV_EXPORTS_W void drawMatches( const Mat& img1, const std::vector& keypoints1, const Mat& img2, const std::vector& keypoints2, - const std::vector& matches1to2, Mat& outImg, + const std::vector& matches1to2, CV_OUT Mat& outImg, const Scalar& matchColor=Scalar::all(-1), const Scalar& singlePointColor=Scalar::all(-1), const std::vector& matchesMask=std::vector(), int flags=DrawMatchesFlags::DEFAULT ); -CV_EXPORTS void drawMatches( const Mat& img1, const std::vector& keypoints1, +CV_EXPORTS_AS(drawMatchesKnn) void drawMatches( const Mat& img1, const std::vector& keypoints1, const Mat& img2, const std::vector& keypoints2, - const std::vector >& matches1to2, Mat& outImg, + const std::vector >& matches1to2, CV_OUT Mat& outImg, const Scalar& matchColor=Scalar::all(-1), const Scalar& singlePointColor=Scalar::all(-1), const std::vector >& matchesMask=std::vector >(), int flags=DrawMatchesFlags::DEFAULT ); diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp index e68da59cf842..43fd5369502b 100644 --- a/modules/python/src2/cv2.cpp +++ b/modules/python/src2/cv2.cpp @@ -97,6 +97,7 @@ using namespace cv; typedef cv::softcascade::ChannelFeatureBuilder softcascade_ChannelFeatureBuilder; typedef std::vector vector_uchar; +typedef std::vector vector_char; typedef std::vector vector_int; typedef std::vector vector_float; typedef std::vector vector_double; @@ -112,6 +113,8 @@ typedef std::vector vector_KeyPoint; typedef std::vector vector_Mat; typedef std::vector vector_DMatch; typedef std::vector vector_String; + +typedef std::vector > vector_vector_char; typedef std::vector > vector_vector_Point; typedef std::vector > vector_vector_Point2f; typedef std::vector > vector_vector_Point3f; @@ -830,7 +833,7 @@ template struct pyopencvVecConverter } }; -template +template bool pyopencv_to(PyObject* obj, std::vector<_Tp>& value, const ArgInfo info) { return pyopencvVecConverter<_Tp>::to(obj, value, info); @@ -888,9 +891,9 @@ template static inline PyObject* pyopencv_from_generic_vec(const s template struct pyopencvVecConverter > { - static bool to(PyObject* obj, std::vector >& value, const char* name="") + static bool to(PyObject* obj, std::vector >& value, const ArgInfo info) { - return pyopencv_to_generic_vec(obj, value, name); + return pyopencv_to_generic_vec(obj, value, info); } static PyObject* from(const std::vector >& value)