Skip to content

Commit 24c8f65

Browse files
committed
use slicing to prevent issue with tuple
1 parent 82f708d commit 24c8f65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MTM/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ def findMatches(listTemplates, image, method=cv2.TM_CCOEFF_NORMED, N_object=floa
118118
listHit = []
119119
for tempTuple in listTemplates:
120120

121-
if len(tempTuple)==3 and method in (0,3): templateName, template, mask = tempTuple
121+
if len(tempTuple)==3 and method in (0,3): templateName, template, mask = tempTuple[:3]
122122
else:
123-
templateName, template = tempTuple
123+
templateName, template = tempTuple[:2]
124124
mask = None
125125
#print('\nSearch with template : ',templateName)
126126

0 commit comments

Comments
 (0)