flappy init
This commit is contained in:
@@ -158,10 +158,11 @@ class Vision:
|
||||
|
||||
if mask is not None:
|
||||
result = cv.matchTemplate(haystack_img, needle_img, cv.TM_CCORR_NORMED, None, mask)
|
||||
_minVal, _maxVal, minLoc, maxLoc = cv.minMaxLoc(result, None)
|
||||
else:
|
||||
result = cv.matchTemplate(haystack_img, needle_img, self.method)
|
||||
|
||||
_minVal, _maxVal, minLoc, maxLoc = cv.minMaxLoc(result, None)
|
||||
|
||||
if normalize:
|
||||
cv.normalize(result, result, 0, 1, cv.NORM_MINMAX, -1)
|
||||
# Get the all the positions from the match result that exceed our threshold
|
||||
|
||||
Reference in New Issue
Block a user