Skip to content

Commit ab4bfc2

Browse files
authored
Merge pull request #3594 from asmorkalov:as/matchLOGOS_bindining_fix
Binding fix for matchLOGOS with python test.
2 parents 0bcbc73 + daded36 commit ab4bfc2

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

modules/xfeatures2d/include/opencv2/xfeatures2d.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ CV_EXPORTS_W void matchGMS(const Size& size1, const Size& size2, const std::vect
12691269
*/
12701270
CV_EXPORTS_W void matchLOGOS(const std::vector<KeyPoint>& keypoints1, const std::vector<KeyPoint>& keypoints2,
12711271
const std::vector<int>& nn1, const std::vector<int>& nn2,
1272-
std::vector<DMatch>& matches1to2);
1272+
CV_OUT std::vector<DMatch>& matches1to2);
12731273

12741274
//! @}
12751275

modules/xfeatures2d/misc/python/test/test_descriptors.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ def test_create(self):
1919
img1 = np.zeros((100, 100, 3), dtype=np.uint8)
2020
kp1_ = msd.detect(img1, None)
2121

22+
class matchLOGOS_test(NewOpenCVTests):
23+
24+
def test_basic(self):
25+
26+
frame = self.get_sample('python/images/baboon.png', cv.IMREAD_COLOR)
27+
detector = cv.AKAZE_create(threshold = 0.003)
28+
29+
keypoints1, descrs1 = detector.detectAndCompute(frame, None)
30+
keypoints2, descrs2 = detector.detectAndCompute(frame, None)
31+
matches1to2 = cv.xfeatures2d.matchLOGOS(keypoints1, keypoints2, range(len(keypoints1)), range(len(keypoints2)))
32+
self.assertFalse(matches1to2 is None)
33+
2234

2335
if __name__ == '__main__':
2436
NewOpenCVTests.bootstrap()

0 commit comments

Comments
 (0)