diff --git a/samples/python/asift.py b/samples/python/asift.py index e21ef5b07a..6f40dd7b22 100755 --- a/samples/python/asift.py +++ b/samples/python/asift.py @@ -143,7 +143,7 @@ def main(): def match_and_draw(win): with Timer('matching'): - raw_matches = matcher.knnMatch(desc1, trainDescriptors = desc2, k = 2) #2 + raw_matches = matcher.knnMatch(desc1, trainDescriptors=desc2, k=2) if desc2.size else [] p1, p2, kp_pairs = filter_matches(kp1, kp2, raw_matches) if len(p1) >= 4: H, status = cv.findHomography(p1, p2, cv.RANSAC, 5.0) diff --git a/samples/python/find_obj.py b/samples/python/find_obj.py index c5783bf456..27662deaf4 100755 --- a/samples/python/find_obj.py +++ b/samples/python/find_obj.py @@ -174,7 +174,7 @@ def main(): def match_and_draw(win): print('matching...') - raw_matches = matcher.knnMatch(desc1, trainDescriptors = desc2, k = 2) #2 + raw_matches = matcher.knnMatch(desc1, trainDescriptors=desc2, k=2) if desc2 is not None else [] p1, p2, kp_pairs = filter_matches(kp1, kp2, raw_matches) if len(p1) >= 4: H, status = cv.findHomography(p1, p2, cv.RANSAC, 5.0)