mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
prevent index error in find_obj sample
This commit is contained in:
parent
19ac54277b
commit
ada16fd188
@ -86,6 +86,7 @@ def explore_match(win, img1, img2, kp_pairs, status = None, H = None):
|
|||||||
|
|
||||||
if status is None:
|
if status is None:
|
||||||
status = np.ones(len(kp_pairs), np.bool_)
|
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
|
p1, p2 = [], [] # python 2 / python 3 change of zip unpacking
|
||||||
for kpp in kp_pairs:
|
for kpp in kp_pairs:
|
||||||
p1.append(np.int32(kpp[0].pt))
|
p1.append(np.int32(kpp[0].pt))
|
||||||
|
Loading…
Reference in New Issue
Block a user