diff --git a/modules/features2d/include/opencv2/features2d/features2d.hpp b/modules/features2d/include/opencv2/features2d/features2d.hpp index 84d7547656..debdec8c6e 100644 --- a/modules/features2d/include/opencv2/features2d/features2d.hpp +++ b/modules/features2d/include/opencv2/features2d/features2d.hpp @@ -2137,9 +2137,9 @@ struct CV_EXPORTS DrawMatchesFlags }; // Draws matches of keypints from two images on output image. -CV_EXPORTS void drawMatches( const Mat& img1, const Mat& img2, - const vector& keypoints1, const vector& keypoints2, - const vector& matches, const vector& mask, Mat& outImg, +CV_EXPORTS void drawMatches( const Mat& img1, const vector& keypoints1, + const Mat& img2, const vector& keypoints2, + const vector& matches, Mat& outImg, const vector& mask = vector(), const Scalar& matchColor = Scalar::all(-1), const Scalar& singlePointColor = Scalar::all(-1), int flags = DrawMatchesFlags::DEFAULT ); diff --git a/modules/features2d/src/descriptors.cpp b/modules/features2d/src/descriptors.cpp index 35e0e282ab..c4b6c8ef42 100644 --- a/modules/features2d/src/descriptors.cpp +++ b/modules/features2d/src/descriptors.cpp @@ -45,9 +45,9 @@ using namespace std; namespace cv { -CV_EXPORTS void drawMatches( const Mat& img1, const Mat& img2, - const vector& keypoints1, const vector& keypoints2, - const vector& matches, const vector& mask, Mat& outImg, +CV_EXPORTS void drawMatches( const Mat& img1, const vector& keypoints1, + const Mat& img2,const vector& keypoints2, + const vector& matches, Mat& outImg, const vector& mask, const Scalar& matchColor, const Scalar& singlePointColor, int flags ) { diff --git a/samples/cpp/descriptor_extractor_matcher.cpp b/samples/cpp/descriptor_extractor_matcher.cpp index a2f5a299ec..f070e319fb 100644 --- a/samples/cpp/descriptor_extractor_matcher.cpp +++ b/samples/cpp/descriptor_extractor_matcher.cpp @@ -98,7 +98,7 @@ void doIteration( const Mat& img1, Mat& img2, bool isWarpPerspective, mask[i1] = 1; } // draw inliers - drawMatches( img1, img2, keypoints1, keypoints2, matches, mask, drawImg, CV_RGB(0, 255, 0), CV_RGB(0, 0, 255) ); + drawMatches( img1, keypoints1, img2, keypoints2, matches, drawImg, mask, CV_RGB(0, 255, 0), CV_RGB(0, 0, 255) ); // draw outliers /*for( size_t i1 = 0; i1 < mask.size(); i1++ ) mask[i1] = !mask[i1]; @@ -107,7 +107,7 @@ void doIteration( const Mat& img1, Mat& img2, bool isWarpPerspective, } else { - drawMatches( img1, img2, keypoints1, keypoints2, matches, vector(), drawImg, CV_RGB(0, 255, 0) ); + drawMatches( img1, keypoints1, img2, keypoints2, matches, drawImg, vector(), CV_RGB(0, 255, 0) ); } imshow( winName, drawImg ); diff --git a/samples/cpp/matcher_simple.cpp b/samples/cpp/matcher_simple.cpp index b9fd059c12..5e1aefed08 100644 --- a/samples/cpp/matcher_simple.cpp +++ b/samples/cpp/matcher_simple.cpp @@ -42,7 +42,7 @@ int main(int argc, char** argv) // drawing the results namedWindow("matches", 1); Mat img_matches; - drawMatches(img1, img2, keypoints1, keypoints2, matches, vector(), img_matches); + drawMatches(img1, keypoints1, img2, keypoints2, matches, img_matches); imshow("matches", img_matches); waitKey(0);