From ada16fd188ecdb45424f2398fc89479eaaa61f22 Mon Sep 17 00:00:00 2001 From: APrigarina Date: Thu, 23 Dec 2021 10:00:25 +0300 Subject: [PATCH] prevent index error in find_obj sample --- samples/python/find_obj.py | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/python/find_obj.py b/samples/python/find_obj.py index 14dfa74902..c5783bf456 100755 --- a/samples/python/find_obj.py +++ b/samples/python/find_obj.py @@ -86,6 +86,7 @@ def explore_match(win, img1, img2, kp_pairs, status = None, H = None): if status is None: status = np.ones(len(kp_pairs), np.bool_) + status = status.reshape((len(kp_pairs), 1)) p1, p2 = [], [] # python 2 / python 3 change of zip unpacking for kpp in kp_pairs: p1.append(np.int32(kpp[0].pt))