diff --git a/samples/python2/digits.png b/samples/python2/data/digits.png similarity index 100% rename from samples/python2/digits.png rename to samples/python2/data/digits.png diff --git a/samples/python2/digits.py b/samples/python2/digits.py index f39591e6f3..b8b9dc5793 100644 --- a/samples/python2/digits.py +++ b/samples/python2/digits.py @@ -29,7 +29,7 @@ from numpy.linalg import norm SZ = 20 # size of each digit is SZ x SZ CLASS_N = 10 -DIGITS_FN = 'digits.png' +DIGITS_FN = 'data/digits.png' def split2d(img, cell_size, flatten=True): h, w = img.shape[:2] diff --git a/samples/python2/find_obj.py b/samples/python2/find_obj.py index 34e6da1df9..8846b511d8 100644 --- a/samples/python2/find_obj.py +++ b/samples/python2/find_obj.py @@ -71,7 +71,7 @@ def explore_match(win, img1, img2, kp_pairs, status = None, H = None): cv2.polylines(vis, [corners], True, (255, 255, 255)) if status is None: - status = np.ones(len(p1), np.bool_) + status = np.ones(len(kp_pairs), np.bool_) p1 = np.int32([kpp[0].pt for kpp in kp_pairs]) p2 = np.int32([kpp[1].pt for kpp in kp_pairs]) + (w1, 0)