Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/xfeatures2d/include/opencv2/xfeatures2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ CV_EXPORTS_W void matchGMS(const Size& size1, const Size& size2, const std::vect
*/
CV_EXPORTS_W void matchLOGOS(const std::vector<KeyPoint>& keypoints1, const std::vector<KeyPoint>& keypoints2,
const std::vector<int>& nn1, const std::vector<int>& nn2,
std::vector<DMatch>& matches1to2);
CV_OUT std::vector<DMatch>& matches1to2);

//! @}

Expand Down
12 changes: 12 additions & 0 deletions modules/xfeatures2d/misc/python/test/test_descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ def test_create(self):
img1 = np.zeros((100, 100, 3), dtype=np.uint8)
kp1_ = msd.detect(img1, None)

class matchLOGOS_test(NewOpenCVTests):

def test_basic(self):

frame = self.get_sample('python/images/baboon.png', cv.IMREAD_COLOR)
detector = cv.AKAZE_create(threshold = 0.003)

keypoints1, descrs1 = detector.detectAndCompute(frame, None)
keypoints2, descrs2 = detector.detectAndCompute(frame, None)
matches1to2 = cv.xfeatures2d.matchLOGOS(keypoints1, keypoints2, range(len(keypoints1)), range(len(keypoints2)))
self.assertFalse(matches1to2 is None)


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