Merge remote-tracking branch 'upstream/3.4' into merge-3.4
authorAlexander Alekhin <alexander.a.alekhin@gmail.com>
Sat, 19 Jun 2021 18:36:27 +0000 (18:36 +0000)
committerAlexander Alekhin <alexander.a.alekhin@gmail.com>
Sat, 19 Jun 2021 18:44:16 +0000 (18:44 +0000)
1  2 
modules/core/src/norm.cpp
modules/core/test/test_arithm.cpp
modules/dnn/src/tensorflow/tf_importer.cpp
modules/features2d/include/opencv2/features2d.hpp
modules/features2d/src/draw.cpp
modules/highgui/src/window_gtk.cpp

Simple merge
Simple merge
@@@ -1334,9 -1311,16 +1334,16 @@@ CV_EXPORTS_W void drawMatches( InputArr
                               InputArray img2, const std::vector<KeyPoint>& keypoints2,
                               const std::vector<DMatch>& matches1to2, InputOutputArray outImg,
                               const Scalar& matchColor=Scalar::all(-1), const Scalar& singlePointColor=Scalar::all(-1),
 -                             const std::vector<char>& matchesMask=std::vector<char>(), int flags=DrawMatchesFlags::DEFAULT );
 +                             const std::vector<char>& matchesMask=std::vector<char>(), DrawMatchesFlags flags=DrawMatchesFlags::DEFAULT );
  
  /** @overload */
 -                             int flags=DrawMatchesFlags::DEFAULT );
+ CV_EXPORTS_W void drawMatches( InputArray img1, const std::vector<KeyPoint>& keypoints1,
+                              InputArray img2, const std::vector<KeyPoint>& keypoints2,
+                              const std::vector<DMatch>& matches1to2, InputOutputArray outImg,
+                              const int matchesThickness, const Scalar& matchColor=Scalar::all(-1),
+                              const Scalar& singlePointColor=Scalar::all(-1), const std::vector<char>& matchesMask=std::vector<char>(),
++                             DrawMatchesFlags flags=DrawMatchesFlags::DEFAULT );
  CV_EXPORTS_AS(drawMatchesKnn) void drawMatches( InputArray img1, const std::vector<KeyPoint>& keypoints1,
                               InputArray img2, const std::vector<KeyPoint>& keypoints2,
                               const std::vector<std::vector<DMatch> >& matches1to2, InputOutputArray outImg,
@@@ -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,8 -207,23 +207,23 @@@ void drawMatches( InputArray img1, cons
                    InputArray img2, const std::vector<KeyPoint>& keypoints2,
                    const std::vector<DMatch>& matches1to2, InputOutputArray outImg,
                    const Scalar& matchColor, const Scalar& singlePointColor,
 -                  const std::vector<char>& matchesMask, int flags )
 +                  const std::vector<char>& matchesMask, DrawMatchesFlags flags )
  {
 -                  int flags )
+     drawMatches( img1, keypoints1,
+                  img2, keypoints2,
+                  matches1to2, outImg,
+                  1, matchColor,
+                  singlePointColor, matchesMask,
+                  flags);
+ }
+ void drawMatches( InputArray img1, const std::vector<KeyPoint>& keypoints1,
+                   InputArray img2, const std::vector<KeyPoint>& keypoints2,
+                   const std::vector<DMatch>& matches1to2, InputOutputArray outImg,
+                   const int matchesThickness, const Scalar& matchColor,
+                   const Scalar& singlePointColor, const std::vector<char>& matchesMask,
++                  DrawMatchesFlags flags )
+ {
      if( !matchesMask.empty() && matchesMask.size() != matches1to2.size() )
          CV_Error( Error::StsBadSize, "matchesMask must have the same size as matches1to2" );
  
Simple merge