def MatchTemplate(template, target):
"""Returns match score for given template"""
res = cv2.matchTemplate(target, template, cv2.TM_CCOEFF_NORMED)
min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(res)
return max_val
文章目录