From: Alexander Alekhin Date: Sat, 19 Jun 2021 18:36:27 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/3.4' into merge-3.4 X-Git-Tag: submit/tizen/20220120.021815~1^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=735a79ae8305cd24c064e1719c197c2092611765;p=platform%2Fupstream%2Fopencv.git Merge remote-tracking branch 'upstream/3.4' into merge-3.4 --- 735a79ae8305cd24c064e1719c197c2092611765 diff --cc modules/features2d/include/opencv2/features2d.hpp index 16016082a2,cff09170c5..e51bd92044 --- a/modules/features2d/include/opencv2/features2d.hpp +++ b/modules/features2d/include/opencv2/features2d.hpp @@@ -1334,9 -1311,16 +1334,16 @@@ CV_EXPORTS_W void drawMatches( InputArr InputArray img2, const std::vector& keypoints2, const std::vector& matches1to2, InputOutputArray outImg, const Scalar& matchColor=Scalar::all(-1), const Scalar& singlePointColor=Scalar::all(-1), - const std::vector& matchesMask=std::vector(), int flags=DrawMatchesFlags::DEFAULT ); + const std::vector& matchesMask=std::vector(), DrawMatchesFlags flags=DrawMatchesFlags::DEFAULT ); /** @overload */ + CV_EXPORTS_W void drawMatches( InputArray img1, const std::vector& keypoints1, + InputArray img2, const std::vector& keypoints2, + const std::vector& matches1to2, InputOutputArray outImg, + const int matchesThickness, const Scalar& matchColor=Scalar::all(-1), + const Scalar& singlePointColor=Scalar::all(-1), const std::vector& matchesMask=std::vector(), - int flags=DrawMatchesFlags::DEFAULT ); ++ DrawMatchesFlags flags=DrawMatchesFlags::DEFAULT ); + CV_EXPORTS_AS(drawMatchesKnn) void drawMatches( InputArray img1, const std::vector& keypoints1, InputArray img2, const std::vector& keypoints2, const std::vector >& matches1to2, InputOutputArray outImg, diff --cc modules/features2d/src/draw.cpp index 84fb0aca39,e4c75144fb..86f06dc885 --- a/modules/features2d/src/draw.cpp +++ b/modules/features2d/src/draw.cpp @@@ -183,7 -183,8 +183,8 @@@ static void _prepareImgAndDrawKeypoints } static inline void _drawMatch( InputOutputArray outImg, InputOutputArray outImg1, InputOutputArray outImg2 , - const KeyPoint& kp1, const KeyPoint& kp2, const Scalar& matchColor, DrawMatchesFlags flags ) - const KeyPoint& kp1, const KeyPoint& kp2, const Scalar& matchColor, int flags, ++ const KeyPoint& kp1, const KeyPoint& kp2, const Scalar& matchColor, DrawMatchesFlags flags, + const int matchesThickness ) { RNG& rng = theRNG(); bool isRandMatchColor = matchColor == Scalar::all(-1); @@@ -206,7 -207,22 +207,22 @@@ void drawMatches( InputArray img1, cons InputArray img2, const std::vector& keypoints2, const std::vector& matches1to2, InputOutputArray outImg, const Scalar& matchColor, const Scalar& singlePointColor, - const std::vector& matchesMask, int flags ) + const std::vector& matchesMask, DrawMatchesFlags flags ) + { + drawMatches( img1, keypoints1, + img2, keypoints2, + matches1to2, outImg, + 1, matchColor, + singlePointColor, matchesMask, + flags); + } + + void drawMatches( InputArray img1, const std::vector& keypoints1, + InputArray img2, const std::vector& keypoints2, + const std::vector& matches1to2, InputOutputArray outImg, + const int matchesThickness, const Scalar& matchColor, + const Scalar& singlePointColor, const std::vector& matchesMask, - int flags ) ++ DrawMatchesFlags flags ) { if( !matchesMask.empty() && matchesMask.size() != matches1to2.size() ) CV_Error( Error::StsBadSize, "matchesMask must have the same size as matches1to2" );